xref: /expo/packages/expo-av/ios/EXAV/EXAVObject.h (revision 1f6de6b9)
1 // Copyright 2017-present 650 Industries. All rights reserved.
2 
3 typedef NS_OPTIONS(NSUInteger, EXAVAudioSessionMode)
4 {
5   // These are enumerated in ascending order of priority.
6   // The EXAVAudioSessionMode of the current experience (managed by EXAV) should be
7   // the maximum of the EXAVAudioSessionModes required by each of the live EXAVObjects.
8   EXAVAudioSessionModeInactive    = 0,
9   EXAVAudioSessionModeActiveMuted = 1,
10   EXAVAudioSessionModeActive      = 2
11 };
12 
13 @protocol EXAVObject <NSObject> // For EXAVPlayerData and EXVideoView to interact with the Audio Session properly
14 
15 - (void)pauseImmediately;
16 
17 - (EXAVAudioSessionMode)getAudioSessionModeRequired; // TODO (clarity): is needsAudioSession a better name?
18 
19 - (void)appDidForeground;
20 
21 - (void)appDidBackgroundStayActive:(BOOL)stayActive;
22 
23 - (void)handleAudioSessionInterruption:(NSNotification*)notification;
24 
25 - (void)handleMediaServicesReset:(void (^)(void))finishCallback;
26 
27 @end
28