mirror of
https://github.com/jellyfin/jellyfin-expo.git
synced 2025-02-17 04:49:22 +00:00
Update video fullscreen enum values
This commit is contained in:
parent
94b71f5689
commit
f26b8022bd
@ -3,7 +3,7 @@
|
|||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
import { Audio, InterruptionModeAndroid, InterruptionModeIOS, Video } from 'expo-av';
|
import { Audio, InterruptionModeAndroid, InterruptionModeIOS, Video, VideoFullscreenUpdate } from 'expo-av';
|
||||||
import { observer } from 'mobx-react-lite';
|
import { observer } from 'mobx-react-lite';
|
||||||
import React, { useEffect, useRef, useState } from 'react';
|
import React, { useEffect, useRef, useState } from 'react';
|
||||||
import { Alert } from 'react-native';
|
import { Alert } from 'react-native';
|
||||||
@ -101,17 +101,17 @@ const VideoPlayer = observer(() => {
|
|||||||
}}
|
}}
|
||||||
onFullscreenUpdate={({ fullscreenUpdate }) => {
|
onFullscreenUpdate={({ fullscreenUpdate }) => {
|
||||||
switch (fullscreenUpdate) {
|
switch (fullscreenUpdate) {
|
||||||
case Video.FULLSCREEN_UPDATE_PLAYER_WILL_PRESENT:
|
case VideoFullscreenUpdate.PLAYER_WILL_PRESENT:
|
||||||
setIsPresenting(true);
|
setIsPresenting(true);
|
||||||
rootStore.isFullscreen = true;
|
rootStore.isFullscreen = true;
|
||||||
break;
|
break;
|
||||||
case Video.FULLSCREEN_UPDATE_PLAYER_DID_PRESENT:
|
case VideoFullscreenUpdate.PLAYER_DID_PRESENT:
|
||||||
setIsPresenting(false);
|
setIsPresenting(false);
|
||||||
break;
|
break;
|
||||||
case Video.FULLSCREEN_UPDATE_PLAYER_WILL_DISMISS:
|
case VideoFullscreenUpdate.PLAYER_WILL_DISMISS:
|
||||||
setIsDismissing(true);
|
setIsDismissing(true);
|
||||||
break;
|
break;
|
||||||
case Video.FULLSCREEN_UPDATE_PLAYER_DID_DISMISS:
|
case VideoFullscreenUpdate.PLAYER_DID_DISMISS:
|
||||||
setIsDismissing(false);
|
setIsDismissing(false);
|
||||||
rootStore.isFullscreen = false;
|
rootStore.isFullscreen = false;
|
||||||
rootStore.mediaStore.reset();
|
rootStore.mediaStore.reset();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user