Skip to content

Commit

Permalink
Resize timing bug around webxr-polyfill (getEyeParameters)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Staunton-Lambert committed Aug 13, 2024
1 parent a3145b5 commit 3c9efb8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,13 @@ void main() {
let height = this.player_.currentHeight();

if (this.webVREffect) {
this.webVREffect.setSize(width, height, false);
try {
if (this.webVREffect.getVRDisplay()) {
this.webVREffect.setSize(width, height, false);
}
} catch (error) {
videojs.log.error('videojs-vr: resize: ' + error);
}
} else if (this.currentSession) {
width = window.innerWidth / 2;
height = window.innerHeight;
Expand Down

0 comments on commit 3c9efb8

Please sign in to comment.