Skip to content

Commit

Permalink
Fix login on need_h265webjs. Add codec debugging, and add #evtStream …
Browse files Browse the repository at this point in the history
…on video.js viewing
  • Loading branch information
Isaac Connor committed Jul 5, 2023
1 parent 1f7499f commit cc0ff3c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions web/skins/classic/views/event.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
}
session_write_close();

$need_h265webjs = $Event->DefaultVideo() and (strpos($Event->DefaultVideo(), 'h265') or strpos($Event->DefaultVideo(), 'hevc'));
$need_h265webjs = $Event->DefaultVideo() && (false !== strpos($Event->DefaultVideo(), 'h265') || false !== strpos($Event->DefaultVideo(), 'hevc'));
$has_h265webjs = file_exists(ZM_PATH_WEB.'/js/h265web.js');

$codecs = array(
Expand All @@ -93,7 +93,7 @@
'MJPEG' => translate('MJPEG (zms)'),
);
if ($need_h265webjs and $has_h265webjs) {
$codecs['h265web.js'] = 'h265web.js H265';
$codecs['h265web.js'] = 'h265web.js';
}

$replayModes = array(
Expand Down Expand Up @@ -128,10 +128,9 @@
} else {
$player = 'video.js';
}
} else {
ZM\Debug("Codec: $codec");
}
}
ZM\Debug("Codec: $codec");
// videojs zoomrotate only when direct recording
$Zoom = 1;
$Rotation = 0;
Expand Down Expand Up @@ -264,6 +263,7 @@
<?php
if ($player == 'video.js') {
?>
<div id="evtStream">
<video autoplay id="videoobj" class="video-js vjs-default-skin"
style="transform: matrix(1, 0, 0, 1, 0, 0);"
<?php echo $scale ? 'width="'.reScale($Event->Width(), $scale).'"' : '' ?>
Expand All @@ -279,6 +279,7 @@ function($r){return $r >= 0 ? true : false;}
<track id="monitorCaption" kind="captions" label="English" srclang="en" src='data:plain/text;charset=utf-8,"WEBVTT\n\n 00:00:00.000 --> 00:00:01.000 ZoneMinder"' default/>
Your browser does not support the video tag.
</video>
</div>
<div id="progressBar" style="width: 100%;">
<div id="alarmCues" style="width: 100%;"></div>
<div class="progressBox" id="progressBox" title="" style="width: 0%;"></div>
Expand Down Expand Up @@ -313,7 +314,6 @@ function($r){return $r >= 0 ? true : false;}
?>
<div id="evtStream">
<div id="videoobj" class="glplayer"></div>

</div><!-- evtStream-->
<div id="progressBar" style="width: 100%;">
<div id="alarmCues" style="width: 100%;"></div>
Expand Down

0 comments on commit cc0ff3c

Please sign in to comment.