Add support for App/Python protected video streams
Co-authored-by: mathieumoran1 <[email protected]>
This commit is contained in:
co-authored by
mathieumoran1
parent
53eb7faf06
commit
8590c30596
@@ -430,6 +430,21 @@ async function playVodLink(vodLink) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// App/Python protected video endpoint (no file extension, but it's still a direct <video> stream).
|
||||||
|
if (isApiVideoUrl(raw)) {
|
||||||
|
setSourceLabel('Server video stream (/api/video)');
|
||||||
|
const videoEl = showVideoPlayer();
|
||||||
|
if (!videoEl) return;
|
||||||
|
videoEl.src = raw;
|
||||||
|
videoEl.addEventListener('error', () => {
|
||||||
|
// If the browser can't play it (or CORS blocks), fall back to iframe.
|
||||||
|
setSourceLabel('Embed (fallback)');
|
||||||
|
showEmbedPlayer(raw);
|
||||||
|
}, { once: true });
|
||||||
|
try { videoEl.load(); } catch (_) {}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Direct video file
|
// Direct video file
|
||||||
if (looksLikeVideoFile(raw)) {
|
if (looksLikeVideoFile(raw)) {
|
||||||
setSourceLabel('Direct video file');
|
setSourceLabel('Direct video file');
|
||||||
|
|||||||
Reference in New Issue
Block a user