Skip to content

Commit 8ed3aeb

Browse files
absidueOothecaPickle
authored andcommitted
Only create the VR canvas when it is required (FreeTubeApp#6534)
1 parent aa7a2ac commit 8ed3aeb

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/renderer/components/ft-shaka-video-player/ft-shaka-video-player.vue

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,15 @@
2222
@volumechange="updateVolume"
2323
@timeupdate="handleTimeupdate"
2424
/>
25+
<!--
26+
VR playback is only possible for VR videos with "EQUIRECTANGULAR" projection
27+
This intentionally doesn't use the "useVrMode" computed prop,
28+
as that changes depending on the active format,
29+
but as we initialize the shaka-player UI once per watch page,
30+
the canvas has to exist even in audio-only mode, because the user may switch to DASH later.
31+
-->
2532
<canvas
33+
v-if="vrProjection === 'EQUIRECTANGULAR'"
2634
ref="vrCanvas"
2735
class="vrCanvas"
2836
/>

0 commit comments

Comments
 (0)