@CiberSheep Thank you for sharing this code with me.
I've noticed that the problem seems to exist for this app too, as the developer uses a timer to start playback with a delay.
I applied this in my code and it seems to work. I'll now be able to add a few features to it.
Thanks again.
Here's a code snippet if it helps anyone in the future. Timer interval (1500ms) to be adapted.
Timer {
id: playStarter
interval: 1500
onTriggered: {
musicPlayer.play()
}
}
MediaPlayer {
id: musicPlayer
}
function pause() {
musicPlayer.pause();
}
function play() {
if (musicPlayer.source) {
musicPlayer.pause();
playStarter.restart();
}
}