I am building a NextJS site that plays HLS videos.
TLDR; how to override Safari's native HLS engine? What are the player options needed? Mine (below) did not work!
To switch between qualities, I am using: https://github.com/videojs/videojs-contrib-quality-levels
In other browsers (not Safari), the quality selector works fine, as the player.qualityLevels()
contains the desired qualities.
However, in Safari (desktop), the array (qualityLevels()
) is empty and thus I can't switch between qualities.
I have this playerOption
here:
const videoJsOptions = {
autoplay: false,
preload: "auto",
controls: true,
poster: thumbnailURL,
sources: [
{
src: liveURL,
type: "application/x-mpegURL",
withCredentials: false,
},
],
html5: {
nativeAudioTracks: false,
nativeVideoTracks: false,
hls: {
overrideNative: true,
},
},
};
This works well for this person's project (not react though): https://jsfiddle.net/geukvmhn/
Check it out in Safari; the qualities are shown, but it doesn't work at all for me. Basically, I am struggling to override the native HLS engine in Safari (desktop).