I'm using LBYoutubeView to play YouTube videos, and if the phone is on silent or vibrate, the video will not play sound. Is there a way to force it to play sound on the video anyway?
I know you can play a certain audio file, as described here.
I'm using LBYoutubeView to play YouTube videos, and if the phone is on silent or vibrate, the video will not play sound. Is there a way to force it to play sound on the video anyway?
I know you can play a certain audio file, as described here.
You need to use the AVAudioSession
API to configure the audio playback. The call will look something like:
[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback error:&error];
Make this call before you call the API's that play the audio. This is working for me in an app that plays audio, but not video, so YMMV.
The possible values for the category are described here.