Set original volume from existing stream in dyn-video-swap

This commit is contained in:
pixeltris 2020-12-22 19:04:11 +00:00
parent 1c3b948d5f
commit 99d50821f0

View File

@ -63,6 +63,7 @@ twitch-videoad.js application/javascript
if (tempM3u8 != null) { if (tempM3u8 != null) {
tempVideo = document.createElement('video'); tempVideo = document.createElement('video');
tempVideo.autoplay = true; tempVideo.autoplay = true;
tempVideo.volume = originalVolume;
disabledVideo.parentElement.insertBefore(tempVideo, disabledVideo.nextSibling); disabledVideo.parentElement.insertBefore(tempVideo, disabledVideo.nextSibling);
if (Hls.isSupported()) { if (Hls.isSupported()) {
tempVideo.hls = new Hls(); tempVideo.hls = new Hls();