File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed
packages/video_player/video_player_avfoundation/ios/Classes Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -553,8 +553,10 @@ - (FLTTextureMessage *)onPlayerSetup:(FLTVideoPlayer *)player
553
553
}
554
554
555
555
- (void )initialize : (FlutterError *__autoreleasing *)error {
556
+ // WE HAVE A CUSTOM AUDIO SESSION CONFIGURATION, SO IT SHOULDN'T BE CONFIGURED HERE.
557
+ //
556
558
// Allow audio playback when the Ring/Silent switch is set to silent
557
- [[AVAudioSession sharedInstance ] setCategory: AVAudioSessionCategoryPlayback error: nil ];
559
+ // [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback error:nil];
558
560
559
561
[self .playersByTextureId
560
562
enumerateKeysAndObjectsUsingBlock: ^(NSNumber *textureId, FLTVideoPlayer *player, BOOL *stop) {
@@ -649,13 +651,15 @@ - (void)pause:(FLTTextureMessage *)input error:(FlutterError **)error {
649
651
650
652
- (void )setMixWithOthers : (FLTMixWithOthersMessage *)input
651
653
error : (FlutterError *_Nullable __autoreleasing *)error {
652
- if (input.mixWithOthers .boolValue ) {
653
- [[AVAudioSession sharedInstance ] setCategory: AVAudioSessionCategoryPlayback
654
- withOptions: AVAudioSessionCategoryOptionMixWithOthers
655
- error: nil ];
656
- } else {
657
- [[AVAudioSession sharedInstance ] setCategory: AVAudioSessionCategoryPlayback error: nil ];
658
- }
654
+ // WE HAVE A CUSTOM AUDIO SESSION CONFIGURATION, SO IT SHOULDN'T BE CONFIGURED HERE.
655
+ //
656
+ // if (input.mixWithOthers.boolValue) {
657
+ // [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback
658
+ // withOptions:AVAudioSessionCategoryOptionMixWithOthers
659
+ // error:nil];
660
+ // } else {
661
+ // [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback error:nil];
662
+ // }
659
663
}
660
664
661
665
@end
You can’t perform that action at this time.
0 commit comments