Only create the VR canvas when it is required #6534
Merged
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.
Only create the VR canvas when it is required
Pull Request Type
Related issue
Description
I don't personally have the problem mentioned in the issue or any way to reproduce it, so I can't test if it actually helps in the situation described by the user, however as they mentioned that removing the canvas helped, this PR should improve the situation. This PR only creates the VR canvas when we actually need it, so for VR videos that have equirectangular projection, other projections are not supported by shaka-player.
I've speculated on what the problem could be in a comment here if you would like to read it: #6530 (comment) (TL;DR likely some miscomunication between graphics drivers and Chromium, that Chromium doesn't handle well).
Testing
document.querySelector('canvas')
in the devtools console, if it returnsnull
the canvas doesn't exist.Desktop