mirror of
https://github.com/jellyfin/jellyfin-expo.git
synced 2024-11-23 05:59:39 +00:00
Update interruption mode imports
This commit is contained in:
parent
5e55d29ce6
commit
b9af4c4641
@ -4,7 +4,7 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
import { Audio } from 'expo-av';
|
||||
import { Audio, InterruptionModeAndroid, InterruptionModeIOS } from 'expo-av';
|
||||
import { observer } from 'mobx-react-lite';
|
||||
import React, { useEffect, useState } from 'react';
|
||||
|
||||
@ -21,10 +21,10 @@ const AudioPlayer = observer(() => {
|
||||
useEffect(() => {
|
||||
Audio.setAudioModeAsync({
|
||||
staysActiveInBackground: true,
|
||||
interruptionModeAndroid: Audio.INTERRUPTION_MODE_ANDROID_DO_NOT_MIX,
|
||||
interruptionModeAndroid: InterruptionModeAndroid.DoNotMix,
|
||||
playThroughEarpieceAndroid: false,
|
||||
shouldDuckAndroid: true,
|
||||
interruptionModeIOS: Audio.INTERRUPTION_MODE_IOS_DO_NOT_MIX,
|
||||
interruptionModeIOS: InterruptionModeIOS.DoNotMix,
|
||||
playsInSilentModeIOS: true
|
||||
});
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
* 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/.
|
||||
*/
|
||||
import { Audio, Video } from 'expo-av';
|
||||
import { Audio, InterruptionModeAndroid, InterruptionModeIOS, Video } from 'expo-av';
|
||||
import { observer } from 'mobx-react-lite';
|
||||
import React, { useEffect, useRef, useState } from 'react';
|
||||
import { Alert } from 'react-native';
|
||||
@ -23,8 +23,8 @@ const VideoPlayer = observer(() => {
|
||||
// Set the audio mode when the video player is created
|
||||
useEffect(() => {
|
||||
Audio.setAudioModeAsync({
|
||||
interruptionModeAndroid: Audio.INTERRUPTION_MODE_ANDROID_DO_NOT_MIX,
|
||||
interruptionModeIOS: Audio.INTERRUPTION_MODE_IOS_DO_NOT_MIX,
|
||||
interruptionModeAndroid: InterruptionModeAndroid.DoNotMix,
|
||||
interruptionModeIOS: InterruptionModeIOS.DoNotMix,
|
||||
playsInSilentModeIOS: true
|
||||
});
|
||||
}, []);
|
||||
|
Loading…
Reference in New Issue
Block a user