Hello,
Background mode audio, even after setting a category is not working for me for either iOS or Android.
const playerOptions = {
audioFile: '~/audio/'+info.audio+".png",
loop: true,
autoplay: true
};
player
.initFromFile(playerOptions)
.then( function() {
if(player.ios){
const audioSession = AVAudioSession.sharedInstance();
audioSession.setCategoryError( AVAudioSessionCategoryPlayback );
player.play();
}
})
.catch(function(err) {
console.log('something went wrong...', err);
});
<key>UIBackgroundModes</key>
<array>
<string>audio</string>
<string>fetch</string>
</array>
Hello,
Background mode audio, even after setting a category is not working for me for either iOS or Android.