Skip to content

iOS - AudioPlayer is not playing, no notification, no error #11

Closed Answered by Jakob-SD
miksansegundo asked this question in 4. Bugs
Discussion options

You must be logged in to vote

This works for me on iOS when running through Xcode. I call the init() method from a play button.

async init(){

    const audioId = 'test';
    const useForNotification = true;
    
    await AudioPlayer.create({
      audioId: audioId,
      audioSource: 'https://file-examples.com/storage/feb05093336710053a32bc1/2017/11/file_example_MP3_5MG.mp3,
      friendlyTitle: 'friendlyTitle',
      useForNotification: useForNotification,
      artworkSource: '',
      isBackgroundMusic: false,
      loop: false,
  }).catch(ex => console.log(ex))


  await AudioPlayer.initialize({ audioId: audioId }).catch(ex => console.log(ex));
  AudioPlayer.play({ audioId: audioId }).catch(ex => console.log(ex))

Replies: 4 comments 7 replies

Comment options

You must be logged in to vote
2 replies
@miksansegundo
Comment options

@wsamoht
Comment options

Comment options

You must be logged in to vote
1 reply
@wsamoht
Comment options

Comment options

You must be logged in to vote
3 replies
@wsamoht
Comment options

@Jakob-SD
Comment options

@miksansegundo
Comment options

Comment options

You must be logged in to vote
1 reply
@miksansegundo
Comment options

Answer selected by miksansegundo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants