Skip to content

Commit 19018e1

Browse files
Only list players that are allow for the monitor
1 parent 8f23953 commit 19018e1

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

web/skins/classic/views/watch.php

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -304,12 +304,15 @@
304304
<span id="playerControl">
305305
<label for="player"><?php echo translate('Player') ?></label>
306306
<?php
307-
$players = ['zms'=>'ZMS MJPEG',
308-
'go2rtc' => 'Go2RTC',
309-
'rtsp2web_webrtc' => 'RTSP2Web WEBRTC',
310-
'rtsp2web_mse' => 'RTSP2Web MSE',
311-
'rtsp2web_hls' => 'RTSP2Web HLS',
312-
];
307+
$players = ['zms'=>'ZMS MJPEG'];
308+
if ($monitor->Go2RTC_Enabled()) $players['go2rtc'] = 'Go2RTC';
309+
if ($monitor->RTSP2Web_Enabled()) {
310+
$players = array_merge($players,[
311+
'rtsp2web_webrtc' => 'RTSP2Web WEBRTC',
312+
'rtsp2web_mse' => 'RTSP2Web MSE',
313+
'rtsp2web_hls' => 'RTSP2Web HLS',
314+
]);
315+
} #
313316
$player = $monitor->getStreamMode();
314317

315318
if (isset($_REQUEST['player']) and isset($players[$_REQUEST['player']])) {

0 commit comments

Comments
 (0)