fix: introduce stopped state for CMD_STOP, separating it from paused#4805
Draft
fix: introduce stopped state for CMD_STOP, separating it from paused#4805
Conversation
When CMD_STOP is sent via AJAX using ZMS MJPEG streaming, the response was incorrectly returning paused=true instead of indicating a stopped state (paused=false). Changes: - Add `stopped` boolean to StreamBase (zm_stream.h) - MonitorStream: CMD_STOP now sets stopped=true, paused=false instead of paused=true; run loop skips frame sending when stopped - EventStream: CMD_STOP sets stopped=true (was already setting paused=false); run loop skips frame sending when stopped - All other play/pause commands reset stopped=false - Both streams include stopped field in the status response struct - stream.php unpacks the new stopped field from MSG_DATA_WATCH and MSG_DATA_EVENT responses - MonitorStream.js handles stopped status in UI (shows 'Stopped' mode) - EventStream.js tracks stopped state from server response Fixes issue: CMD_STOP response paused=true should be paused=false Agent-Logs-Url: https://github.com/ZoneMinder/zoneminder/sessions/ba9cb47a-a3e8-4e13-aec7-c9cd258e2a3d Co-authored-by: connortechnology <925519+connortechnology@users.noreply.github.com>
Agent-Logs-Url: https://github.com/ZoneMinder/zoneminder/sessions/ba9cb47a-a3e8-4e13-aec7-c9cd258e2a3d Co-authored-by: connortechnology <925519+connortechnology@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix ZMS MJPEG AJAX response for CMD_STOP command
fix: introduce stopped state for CMD_STOP, separating it from paused
May 6, 2026
Member
|
@copilot while we are here can you document what VARPLAY means vs PLAY? |
Agent-Logs-Url: https://github.com/ZoneMinder/zoneminder/sessions/f82e2bf4-0e4e-48a4-bccd-42c61e66c6b3 Co-authored-by: connortechnology <925519+connortechnology@users.noreply.github.com>
Contributor
Author
Added inline comments to the
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
stoppedboolean toStreamBaseinsrc/zm_stream.hMonitorStream::processCommandinsrc/zm_monitorstream.cppEventStream::processCommandinsrc/zm_eventstream.cppweb/ajax/stream.phpto unpackstoppedfieldweb/js/MonitorStream.jsandEventStream.jsCMD_PLAY,CMD_STOP, andCMD_VARPLAYinMsgCommandenum