Add styling to plyr and fix switcher not hiding
This commit is contained in:
@@ -30,6 +30,20 @@
|
||||
hstreamBtn.classList.remove('player-switcher__btn--active');
|
||||
plyrBtn.classList.add('player-switcher__btn--active');
|
||||
}
|
||||
|
||||
var switcher = document.getElementById('player-switcher');
|
||||
var container = switcher.parentElement;
|
||||
var hideTimer = null;
|
||||
|
||||
function showSwitcher() {
|
||||
switcher.classList.add('player-switcher--visible');
|
||||
clearTimeout(hideTimer);
|
||||
hideTimer = setTimeout(function () {
|
||||
switcher.classList.remove('player-switcher--visible');
|
||||
}, 3000);
|
||||
}
|
||||
|
||||
container.addEventListener('pointerdown', showSwitcher);
|
||||
})();
|
||||
</script>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user