Use Action Cable with MessagePack encoding to deliver video stream frames #153
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.
This PR completes part of #141, closes #149, and refactors some internal code.
Breaking changes:
TURBOSTREAMS_HASH_KEY
environment variable has been renamed toACTIONCABLE_HASH_KEY
(inherited from the upgrade to github/sargassum-world/[email protected])Additions:
<video-cable-player>
), which opens a new custom Turbo Streams-inspired Action Cable channel (Video::StreamsChannel
) over WebSockets, instead of opening the camera stream as MJPEG-over-HTTP. This fixes Turbo Drive continues loading MJPEG stream even after navigating to a different page #149.Video::StreamsChannel
integrates with the videostreams Broker in the same way thatTurbo::StreamsChannel
integrates with the godest framework's turbostreams Broker./video-cable
route which serves Action Cable connections withVideo::Streams
channels. Each camera stream on an instrument opens a separate WebSocket connection to this route (by attaching a per-camera value on a HTTP GET query param) in order to prevent any camera from being starved from writing data on the WebSocket connection.This PR also upgrades dependencies, both to implement the above additions and to keep dependencies up-to-date.