Repository navigation
Viewer SDK for browsers - #88
Merged
Merged
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.
Viewer SDK for browsers
Why
The viewer protocol was spoken only inside
watch.html, and nothing in a browser spoke the relay side, so browser viewers never relayed.Changes
sdk/:@kimsun721/stream-viewer. Joins a room, plays it, follows simulcast layers, sends perf reports, reconnects with backoff, and has a debug log.relay_outgoing. A leaf answers the relay's offer and falls back to the server's stream on a lost link ordemote./stream-viewer.jsserves the SDK as one file, and/watchruns on it.sdk/e2e/: end to end scenarios that start a server and drive headless Chrome.sdkis left out of the docker build context.Tested
cd sdk && npm run check: 21 unit tests.cargo test.cd sdk && npm run e2e: headless Chrome against a release build, with a Chrome publisher sending three layers. Three runs.watch: playback, layer picks, auto, idle and back, a room that is not live. 13/13.relay, the probe answered by the test: pairing, no stall when the relay takes over, the pair holding 10 s, the relay leaving. 12/12. The leaf noticed in 1.2 to 1.3 s and its picture stood still 1.25 to 1.42 s, the rest being the server's keyframe from a publisher that answers requests at once.Part of #87