We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When a track is playing, it is automatically paused when the phone is locked (on IOS).
The text was updated successfully, but these errors were encountered:
Add this to your App_Resources/iOS/Info.plist:
<key>UIBackgroundModes</key> <array> <string>audio</string> </array>
In addition, you need to set some specific configs in your player options:
this._playerOptions = { loop: false, //audioFile: ... }; if(platform.isIOS) { //allow audio to continue on screen lock, app sent to background or silent switch this._playerOptions.sessionCategory = AVAudioSessionCategoryPlayback; this._playerOptions.sessionMode = AVAudioSessionModeDefault; this._playerOptions.sessionRouteSharingPolicy = AVAudioSessionRouteSharingPolicy.Default; } player.initFromUrl(this._playerOptions).then(() => { //... } (e) => { console.log(e); });
Sorry, something went wrong.
No branches or pull requests
When a track is playing, it is automatically paused when the phone is locked (on IOS).
The text was updated successfully, but these errors were encountered: