Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Volume is muted when device is on Silent mode ? #174

Open
fadylateef opened this issue May 26, 2017 · 3 comments
Open

Volume is muted when device is on Silent mode ? #174

fadylateef opened this issue May 26, 2017 · 3 comments

Comments

@fadylateef
Copy link

Tested on all devices , videos mute volume when phone on silent mode and volume comes back when change device ringing mode to general mode.

@DevWiy
Copy link

DevWiy commented Jun 5, 2017

I have the same issue...

@mouness2020
Copy link

mouness2020 commented Aug 18, 2017

just add this code in your player
Swift 3.0 and Xcode > 8

Play sound in Video when device is on RINGER mode and SLIENT mode

import AVFoundation
..........
do {
       try AVAudioSession.sharedInstance().setCategory(AVAudioSessionCategoryPlayback)
       //print("AVAudioSession Category Playback OK")
       do {
           try AVAudioSession.sharedInstance().setActive(true)
           //print("AVAudioSession is Active")
       } catch _ as NSError {
           //print(error.localizedDescription)
       }
   } catch _ as NSError {
       //print(error.localizedDescription)
   }

@thanhBkap
Copy link

thanhBkap commented Nov 10, 2017

@mouness2020 @fadylateef @DevWiy put that code before present function help player work file. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants