andreipitis / ASPVideoPlayer

A simple video player that allow animations to be performed on the view during playback.
MIT License
89 stars 43 forks source link

ASPVideoPlayer has no sounds when play video #41

Closed onusvishal closed 5 years ago

onusvishal commented 5 years ago

Video play but no sound , i add earphone sound is on in earphones.

idrisyildiz7 commented 5 years ago

Have the same issue, video does not play sound!!?

andreipitis commented 5 years ago

Hi @onusvishal, @idrisyildiz7 ,

Since you are hearing audio when you connect your earphones, I am assuming the mute switch on your iPhones was active while using ASPVideoPlayer. If you unmute your phones the sound should play as expected. If you wish to have audio playback even when the mute switch is on, add the following code to your app:

do {
 try AVAudioSession.sharedInstance().setCategory(AVAudioSession.Category.playback, mode: AVAudioSession.Mode.moviePlayback)
 try AVAudioSession.sharedInstance().setActive(true)
} catch {
 print(error)
}
usamabinattique commented 5 years ago

Does not play sound.

andreipitis commented 5 years ago

Hi @usamabinattique ,

I can not reproduce your issue, could you provide a sample app?

usamabinattique commented 5 years ago

Hello @andreipitis No need to reproduce, there was problem in video which was being generated at the backend server. Audio is playing perfectly. Thanks for the response, great library and community work.