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 is a fix to an issue that was unable to be resolved in #60 . Specifically, #60 ended up with a bunch of hardcoded scale factors on pages with the robot's video stream, to attempt to make it consistently render properly. However, hardcoded scale factors is not a good code-writing style and is ripe for bugs. This PR addresses that by consistently adding views that take up the full specified width, and then computing the video stream size from those parent components.
Key insights:
width
andheight
props for the parent element must be set. Furthermore, a reference to the parent must be passed in to the component that is rendering the video.width: 100%
,height: 100%
to have the views themselves fill up the space.This PR was tested on the browser's version of the iPhone 12/13 Pro Max and the iPad iOs 14.7.1, in both portrait and landscape mode.