feat(stream): fitToScreen deep link + re-encode on resize#398
Open
joshfriend wants to merge 1 commit into
Open
feat(stream): fitToScreen deep link + re-encode on resize#398joshfriend wants to merge 1 commit into
joshfriend wants to merge 1 commit into
Conversation
Builds on NetrisTV#390 (Leo Forney). Adds a fitToScreen URL param so a stream can be deep-linked already fit to its container without going through the Configure screen. With the canvas now CSS-fit by NetrisTV#390, also re-encode the stream at the new container bounds (debounced) on window resize when the player is in fit-to-screen mode, so the feed settles at native resolution instead of being CSS-scaled. Inert for fixed-resolution streams.
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.
Adds a
fitToScreenstream URL param and re-encodes the stream to the container size on resize.?fitToScreen=1deep link: start a stream already fit to its container without going through the Configure screen. Useful for embedded/auto-started streams.Important
Requires #390 to work properly. Without #390 the canvas is still pinned to the raw video resolution and letterboxing/scaling doesn't happen, so the re-encode has nothing to fit into. #390 provides the responsive CSS layout (
object-fit: contain) and removes the parent-element size pin; this PR builds on that to keep the feed crisp after a resize settles.