Skip to content

Commit d85c3f4

Browse files
Merge pull request #4401 from IgorA100/patch-855671
Fix: Actions when pressing the Play and Pause buttons (MonitorStream.js)
2 parents 9f10714 + b01cbd9 commit d85c3f4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

web/js/MonitorStream.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,7 @@ function MonitorStream(monitorData) {
645645
};
646646

647647
this.pause = function() {
648-
if (this.RTSP2WebEnabled || this.Go2RTCEnabled) {
648+
if ((this.activePlayer) && (-1 !== this.activePlayer.indexOf('go2rtc') || -1 !== this.activePlayer.indexOf('rtsp2web'))) {
649649
/* HLS does not have "src", WebRTC and MSE have "src" */
650650
this.element.pause();
651651
this.statusCmdTimer = clearInterval(this.statusCmdTimer);
@@ -661,10 +661,10 @@ function MonitorStream(monitorData) {
661661

662662
this.play = function() {
663663
console.log('play');
664-
if (this.Go2RTCEnabled) {
664+
if ((this.activePlayer) && (-1 !== this.activePlayer.indexOf('go2rtc'))) {
665665
this.element.play(); // go2rtc player will handle mute
666666
this.statusCmdTimer = setInterval(this.statusCmdQuery.bind(this), statusRefreshTimeout);
667-
} else if (this.RTSP2WebEnabled) {
667+
} else if ((this.activePlayer) && (-1 !== this.activePlayer.indexOf('rtsp2web'))) {
668668
/* HLS does not have "src", WebRTC and MSE have "src" */
669669
this.element.play().catch(() => {
670670
if (!this.element.muted) {

0 commit comments

Comments
 (0)