iOS - AudioPlayer is not playing, no notification, no error #11
-
Hi there! I'd appreciate some help here. I'm testing on iOS and getting the success callback triggered, then nothing happens. The audio doesn't play, and no notification or error is shown. The code follows the creation as in example at |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 7 replies
-
I tried going to |
Beta Was this translation helpful? Give feedback.
-
Thanks so much for catching that. I have removed the auth and tried again with the same results. The audio does not play, and no notification is shown on iOS. I'm testing in the XCode Simulator iOS 18 on several iPhone and iPad models. Here is the code: async connectedCallback() {
const audioId = 'radio';
await AudioPlayer.create({
audioId,
audioSource: 'https://URL/sound.mp3',
friendlyTitle: 'Radio',
useForNotification: true,
isBackgroundMusic: false,
loop: false,
})
.then( () => console.log('Success' ))
.catch( ex => console.log( ex ) );
} When the config is |
Beta Was this translation helpful? Give feedback.
-
I'm getting the same error. If I call async init(){
const audioId = 'test';
const useForNotification = false;
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))
} |
Beta Was this translation helpful? Give feedback.
-
This works for me on iOS when running through Xcode. I call the 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))
} |
Beta Was this translation helpful? Give feedback.
This works for me on iOS when running through Xcode. I call the
init()
method from a play button.