Attempt for ios
This commit is contained in:
parent
c43e989459
commit
a7c1f13f99
14
index.html
14
index.html
|
@ -38,6 +38,7 @@
|
|||
|
||||
app.ports.initVideo.subscribe(function(arg) {
|
||||
const video = document.getElementById('video');
|
||||
if (Hls.isSupported()) {
|
||||
const hls = new Hls();
|
||||
hls.loadSource(arg);
|
||||
|
||||
|
@ -62,17 +63,8 @@
|
|||
})
|
||||
|
||||
hls.attachMedia(video);
|
||||
|
||||
function updateQuality(newQuality) {
|
||||
if (newQuality === 0) {
|
||||
hls.currentLevel = -1;
|
||||
} else {
|
||||
hls.levels.forEach((level, levelIndex) => {
|
||||
if (level.height === newQuality) {
|
||||
hls.currentLevel = levelIndex;
|
||||
}
|
||||
});
|
||||
}
|
||||
} else if (video.canPlayType('application/vnd.apple.mpegurl')) {
|
||||
video.src = arg;
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue