feat(playback): add opt-in local and remote playback routing - #816
Draft
SHAREN wants to merge 3 commits into
Draft
feat(playback): add opt-in local and remote playback routing#816SHAREN wants to merge 3 commits into
SHAREN wants to merge 3 commits into
Conversation
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.
Why
TorrServer is often opened on a phone while the computer connected to the TV is somewhere else. A normal
vlc://link always opens VLC on the browser's device, so the phone cannot act as a remote control.At the same time, existing users should not get a new playback workflow just because they updated TorrServer.
This change adds remote playback as an explicit opt-in feature. With the default settings, TorrServer behaves exactly as before: every browser opens VLC on itself.
Playback modes
The user can choose one of three modes:
Each browser plays locally (legacy)
vlc://behavior.Always use one primary device
Choose a device in each browser
Remote playback itself is disabled by default. Devices may be configured in advance without enabling routing.
What changed
Server
playback_devices.jsonnext to the TorrServer settings.Web UI
Fullscreen behavior
Each remote device has its own Open VLC in fullscreen checkbox.
vlc://behavior.Agent contract
A registered agent exposes:
TorrServer sends:
{ "path": "Movie.mkv", "hash": "40-character torrent hash", "index": 1, "stream_url": "http://torrserver:8090/stream/Movie.mkv?...&play=", "fullscreen": false }Security
has_token.0600where supported.Compatibility
vlc://behavior.Tested
go test ./playback ./web/apigo test -vet=off -run '^$' ./...yarn lintyarn buildAutomated tests cover:
0600;The upstream full test command currently also runs unrelated tests that require the absent
server/rutor/rutor.lsfixture and hits an existing vet warning inserver/web/api/utils/link.go. The changed packages pass normally, every server package compiles, and the complete server binary builds successfully.