Skip to content

Commit 5b4760e

Browse files
committed
fix: disable VHS override for transcoded fMP4 streams
Video.js VHS (HTTP Streaming) was intercepting transcoded fMP4 streams and trying to parse them as HLS/DASH segments, causing indefinite buffering. VHS is designed for segmented streaming protocols, not raw progressive fMP4. For transcoded streams, we now set overrideNative=false so the native <video> element handles progressive fMP4 playback directly.
1 parent 4e0759e commit 5b4760e

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

‎src/components/video/video-player.tsx‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,19 @@ export function VideoPlayer({
103103
videoRef.current.appendChild(videoElement);
104104

105105
// Merge options - autoplay prop takes precedence over options.autoplay
106+
// For transcoded fMP4 streams, disable VHS override so native <video> handles
107+
// progressive playback. VHS is designed for HLS/DASH, not raw fMP4 streams,
108+
// and will buffer indefinitely trying to parse segment metadata.
109+
const html5Override = videoSource.requiresTranscoding ? {
110+
vhs: { overrideNative: false },
111+
nativeVideoTracks: true,
112+
nativeAudioTracks: true,
113+
nativeTextTracks: true,
114+
} : undefined;
115+
106116
const playerOptions = getDefaultPlayerOptions({
107117
...options,
118+
...(html5Override ? { html5: html5Override } : {}),
108119
poster,
109120
autoplay: autoplay || options?.autoplay,
110121
});

0 commit comments

Comments
 (0)