Skip to content

Commit bc1983b

Browse files
Merge pull request #4298 from IgorA100/patch-48
Fix: Correct display of play/pause button when autoplay==true Event page
2 parents f5f394e + e39984b commit bc1983b

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

web/skins/classic/views/js/event.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@ function vjsPlay() { //catches if we change mode programatically
565565
streamPlay();
566566
}
567567

568-
function streamPlay( ) {
568+
function streamPlay() {
569569
$j('#pauseBtn').show();
570570
$j('#playBtn').hide();
571571
setButtonState('pauseBtn', 'inactive');
@@ -1318,7 +1318,6 @@ function initPage() {
13181318
getAvailableTags();
13191319
getSelectedTags();
13201320

1321-
13221321
// Load the event stats
13231322
getStat();
13241323
zmPanZoom.init();
@@ -1645,7 +1644,12 @@ function initPage() {
16451644
el.addEventListener('dblclick', doubleClickOnStream);
16461645
});
16471646

1648-
streamPause();
1647+
const video = document.querySelector('video');
1648+
if (!vid || (vid && video.autoplay && !video.paused)) {
1649+
streamPlay();
1650+
} else {
1651+
streamPause();
1652+
}
16491653

16501654
if ( parseInt(ZM_OPT_USE_GEOLOCATION) && parseFloat(eventData.Latitude) && parseFloat(eventData.Longitude)) {
16511655
const mapDiv = document.getElementById('LocationMap');

0 commit comments

Comments
 (0)