Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 48979

Play next audios in iOS when app is in background

$
0
0

Using Ionic 5, I am trying to create an app with audio-player which can play current audio and on completion of current track it can play next track even if the app is in background.

I am using cordova-plugin-background-mode plugin to fulfill above requirement which is working as expected in Android but there is an issue in iOS as below.

If I play first track and keep the app in background, next track is not playing automatically. This issue is happening only in iOS.

// I have tried with below code also, but it is not woking.
cordova.plugins.backgroundMode.disableWebViewOptimizations();

Playing audios as below.
audio = new Audio();
audio.src = url;
audio.play();

Can anyone please guide me how can I create an audio-player app using Ionic 5 which can play audio media in background ?

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 48979

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>