I'm on 1.0.0-beta.1 and I'm not getting any audio out of the videos that play. All of the controls work fine, the videos play fine, but no audio. I've tried on both the iOS simulator and physical iOS devices, no audio comes through. I'm positive my volume is cranked up.
Thoughts?
Activated sound when iPhone (iOS) is on vibrate mode
Open AppDelegate.m and add :
[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback error: nil];
in your didFinishLaunchingWithOptions method
Thanks @mayankbaiswar-CSE !
Hey guys! I know this is already closed, but I'm still experiencing this issue:
I'm on 1.1.0 and, even though I've imported <AVFoundation/AVFoundation.h> and added [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback error: nil]; to my AppDelegate.m file, I'm still not getting sound when iPhone (iOS) is on vibrate mode.
Any thoughts? Thanks a lot!
@smaradona I'm having the same issue too with iOS 12
UPDATE: I have to add [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback error: nil];
into loadWithPlayerParams on file YTPlayerView.m for this in order to work.
@deathemperor do you have to also add the previous code into AppDelegate.m or your code fix is enough?
And could you please also this fix in context, otherwise i have no idea where exactly this should go.
Thanks!
@ziyafenn I still keep the code on AppDelegate.m so I don't know if it works without it.
What context do you need? I thought I was clear on how to make it work (I mentioned the file and function you need to edit).
Most helpful comment
Activated sound when iPhone (iOS) is on vibrate mode
Open AppDelegate.m and add :
import
[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback error: nil];
in your didFinishLaunchingWithOptions method