hls: prefer hls.js on iOS too (#6090)

In the embedded HLS reader, use hls.js on iOS, that was previously
disabled due to compatibility issues that should have been solved.
This commit is contained in:
Alessandro Ros
2026-08-16 11:57:13 +02:00
committed by GitHub
parent 337acacd60
commit ef6a74455b
+2 -10
View File
@@ -93,17 +93,9 @@
message.innerText = str;
};
const isIOS = () =>
/iPad|iPhone|iPod/.test(navigator.platform) ||
(navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1);
const loadStream = () => {
// Prefer hls.js over native HLS.
// This is because some Android versions support native HLS
// but don't support fMP4s.
// Skip iPad iOS >= 13 and iPhone iOS >= 17,
// which support hls.js but don't support well maxLiveSyncPlaybackRate.
if (Hls.isSupported() && !isIOS()) {
// Prefer hls.js over native HLS, due to better protocol support.
if (Hls.isSupported()) {
const hls = new Hls({
maxLiveSyncPlaybackRate: 1.5,
});