Skip to content

Fix: Removed extra <source> line when using HLS (event.php)#4801

Open
IgorA100 wants to merge 2 commits intoZoneMinder:masterfrom
IgorA100:patch-916945
Open

Fix: Removed extra <source> line when using HLS (event.php)#4801
IgorA100 wants to merge 2 commits intoZoneMinder:masterfrom
IgorA100:patch-916945

Conversation

@IgorA100
Copy link
Copy Markdown
Contributor

@IgorA100 IgorA100 commented May 5, 2026

Also for the m3u8 playlist, I changed the context type to the correct "application/vnd.apple.mpegurl"

IgorA100 added 2 commits May 5, 2026 20:32
…lication/vnd.apple.mpegurl" (event.php) Отправить отзыв Боковые панели История Сохраненные Нажмите на вкладку

Now there is no error when playing
Possibly a partial fix for issue ZoneMinder#4757
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the classic skin’s event playback markup to use the proper HLS playlist MIME type and removes an additional <source> element when HLS is detected, aiming to clean up/standardize HLS playback in event.php.

Changes:

  • Switch HLS <source> MIME type from application/x-mpegURL to application/vnd.apple.mpegurl.
  • Remove the MP4 <source> element from the $has_hls branch (leaving only the HLS source when HLS is available).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 378 to 381
<?php if ($has_hls): ?>
<source src="<?php echo $hlsSrc; ?>" type="application/x-mpegURL">
<source src="<?php echo $Event->getStreamSrc(array('mode'=>'mp4','format'=>'h264'),'&amp;'); ?>" type="video/mp4">
<source src="<?php echo $hlsSrc; ?>" type="application/vnd.apple.mpegurl">
<?php else: ?>
<source src="<?php echo $Event->getStreamSrc(array('mode'=>'mp4','format'=>'h264'),'&amp;'); ?>" type="video/mp4">
Copy link
Copy Markdown
Contributor Author

@IgorA100 IgorA100 May 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot
If $has_hls is true and we don't remove the extra line
<source src="<?php echo $Event->getStreamSrc(array('mode'=>'mp4','format'=>'h264'),'&amp;'); ?>" type="video/mp4">
then view_video.php will also try to play the video, which will result in an error.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants