Skip to content

Background Mode Audio #160

@LucyTurtle

Description

@LucyTurtle

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>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions