Update user agent string
This commit is contained in:
4
index.js
4
index.js
@@ -54,11 +54,13 @@ const createVidList = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const changeVid = index => {
|
const changeVid = index => {
|
||||||
|
console.log("Switching video to index", index);
|
||||||
titleText.innerHTML = vids[index].name;
|
titleText.innerHTML = vids[index].name;
|
||||||
|
|
||||||
if(!/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent) &&
|
if(!/Android|webOS|iPhone|iPad|iPod|Edge|iOS/i.test(navigator.userAgent) &&
|
||||||
Hls.isSupported() &&
|
Hls.isSupported() &&
|
||||||
vids[index].url.endsWith(".m3u8")) {
|
vids[index].url.endsWith(".m3u8")) {
|
||||||
|
console.log("Using HLS.js");
|
||||||
if(!hls==null) {
|
if(!hls==null) {
|
||||||
hls.detachMedia(vidPlayer);
|
hls.detachMedia(vidPlayer);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user