fix(player): skip reload if same url
This commit is contained in:
@@ -84,6 +84,8 @@
|
|||||||
const mirrorLink = document.getElementById('mirror-link');
|
const mirrorLink = document.getElementById('mirror-link');
|
||||||
const playlistURL = mirrorSelect.value + window.restream_config.playlist;
|
const playlistURL = mirrorSelect.value + window.restream_config.playlist;
|
||||||
|
|
||||||
|
if (window.restream_config.activeURL === playlistURL) return;
|
||||||
|
|
||||||
console.log('Reloading video from', playlistURL);
|
console.log('Reloading video from', playlistURL);
|
||||||
if (Hls.isSupported()) {
|
if (Hls.isSupported()) {
|
||||||
window.restream_config.hls.destroy();
|
window.restream_config.hls.destroy();
|
||||||
@@ -94,6 +96,7 @@
|
|||||||
video.src = playlistURL;
|
video.src = playlistURL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
window.restream_config.activeURL = playlistURL;
|
||||||
mirrorLink.href = playlistURL;
|
mirrorLink.href = playlistURL;
|
||||||
mirrorLink.innerText = '[m3u8]';
|
mirrorLink.innerText = '[m3u8]';
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user