-
Notifications
You must be signed in to change notification settings - Fork 71
No audio when on silent more #7
Comments
I am a little confused by your question. If you put the phone into silent mode, why would the audio still play? Unless you are messing with the player's |
Hope this is clearer. I am using the control in a test app but it only plays audio when the "ringer" is not in silent mode. If the ringer button (upper left) on iPhone is on silent then the audio does not play. I am not sure if that is the default behavior as every other app including Apple's play video and audio fine when the ringer is on silent mode. |
Was there any resolution to this issue? I see it's closed, but I'm running into the same problem with the demo. @adamfisher -- I think what OP was saying is ... it's normal on iPhone for media to play despite the silent switch being on. I actually never turn my silent switch off, but I can still hear media if I want. The silent switch affects most system sounds and the ringer, but if the user requests media playback in an app, etc, the normal behavior is apps know that / are able to tell, and respond by beginning media (in some contexts with the mute on) but they hook the app to "request" media playback audio access from the system despite the mute switch if it's reasonable to conclude the user would want that. For instance: I have no headphones in ... silent mode is engaged, but I select the speakerphone option and push play on a song in the music app. Boom, sound. Or I press play and unmute on a video on Facebook. Boom, sound. This seems different, b/c it isn't normally how Android works, as the silent toggle is usually respected system-wide, but iOS def make exceptions. Here's an example in another project: TheWidlarzGroup/react-native-video#204 |
Just a note for those who may find this thread on the Googles ... I fixed it with this code in the MyApp.iOS/AppDelegate.cs file. I added one line to the
The expected behavior is now in place. FYI - this was mentioned in the Xamarin documentation here: https://developer.xamarin.com/api/member/AVFoundation.AVAudioSession.SetCategory/p/AVFoundation.AVAudioSessionCategory/. |
I only checked this on ios, however, there is no audio when the video is played under silent mode. Is there anything that can be done to resolve this?
The text was updated successfully, but these errors were encountered: