mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-11-30 12:14:36 -05:00
- Escape the emitted stream URLs (mp4Src/hlsSrc/zmsImgSrc) with validJsStr like every other JS string. They carry query params that can include the session username and an auth hash, so an unescaped quote or backslash could break out of the JS string literal. - For codec=auto, offer the HLS source only for a live event. The codec probe that selected the native player tested the recorded mp4, so a finished event plays that mp4 directly; HLS is needed only while the manifest is still growing at the recording edge. Keeps the played source consistent with what was probed. - Drop the meaningless format=h264 from the auto mp4 src: view_video serves the raw recorded file and ignores format. - Give the caption track a valid data URI media type (text/vtt). tests/js/event-player-selection.test.js gains cases for the live-vs-finished HLS source ordering (7 assertions total). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>