Add play button functionality for web player

This commit is contained in:
knotteye
2020-10-25 10:16:18 -05:00
parent 12e868456a
commit 2a5e8d6ec2
2 changed files with 14 additions and 2 deletions

View File

@ -196,6 +196,12 @@ async function initPlayer(usr) {
// Listen for error events.
player.addEventListener('error', onErrorEvent);
video.addEventListener('play', () => {
document.getElementById('playbtn').style.visibility = 'hidden';
});
video.addEventListener('pause', () => {
document.getElementById('playbtn').style.visibility = 'visible';
});
// Try to load a manifest.
// This is an asynchronous process.
try {