Skip to content

Commit

Permalink
Only create the VR canvas when it is required
Browse files Browse the repository at this point in the history
  • Loading branch information
absidue committed Jan 8, 2025
1 parent 85cec5c commit d67d745
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,15 @@
@volumechange="updateVolume"
@timeupdate="handleTimeupdate"
/>
<!--
VR playback is only possible for VR videos with "EQUIRECTANGULAR" projection
This intentionally doesn't use the "useVrMode" computed prop,
as that changes depending on the media format,
but as we initialize the shaka-player UI once per watch page,
the canvas has to exist even in audio-only mode, as the user may switch to DASH later.
-->
<canvas
v-if="vrProjection === 'EQUIRECTANGULAR'"
ref="vrCanvas"
class="vrCanvas"
/>
Expand Down

0 comments on commit d67d745

Please sign in to comment.