@@ -214,7 +214,7 @@ import OmniPlayer from "@/components/players/OmniPlayer.vue";
214
214
import Chat from " @/components/Chat.vue" ;
215
215
import UserList from " @/components/UserList.vue" ;
216
216
import VideoQueue from " @/components/VideoQueue.vue" ;
217
- // import { goTo } from "vuetify/lib/services/goto/index.mjs ";
217
+ import { useGoTo } from " vuetify" ;
218
218
import RoomSettingsForm from " @/components/RoomSettingsForm.vue" ;
219
219
import ShareInvite from " @/components/ShareInvite.vue" ;
220
220
import { granted } from " @/util/grants" ;
@@ -544,22 +544,24 @@ export default defineComponent({
544
544
const queueTab = ref (0 );
545
545
const roomSettingsForm = ref <typeof RoomSettingsForm | null >(null );
546
546
547
+ const goTo = useGoTo ();
547
548
onMounted (() => {
548
549
if (! orientation .isSupported .value ) {
549
550
return ;
550
551
}
551
552
552
- watch (orientation .orientation , newOrientation => {
553
+ watch (orientation .orientation , async newOrientation => {
553
554
if (! newOrientation ) {
554
555
return ;
555
556
}
556
557
if (isMobile .value ) {
557
558
if (newOrientation .startsWith (" landscape" )) {
558
- document .documentElement .requestFullscreen ();
559
- // goTo(0, {
560
- // duration: 250,
561
- // easing: "easeInOutCubic",
562
- // });
559
+ // this promise is rejected if the fullscreen request is denied
560
+ await document .documentElement .requestFullscreen ();
561
+ goTo (0 , {
562
+ duration: 250 ,
563
+ easing: " easeInOutCubic" ,
564
+ });
563
565
} else {
564
566
document .exitFullscreen ();
565
567
}
0 commit comments