Set loop to infinite in Audio element
-
I am looking for something like
@mySoundEffect.loops = SoundEffect.Infinite@
for the Audio element.
I cannot use SoundEffect because it fails to load .mp3s and .oggs, while Audio loads them both without problems.
BTW, I can use some Phonon based player if that will let me load .mp3s and loop the music infinitely.
-
You can try something like this:
@Audio {
onStatusChanged: {
if (status == Audio.EndOfMedia) play()
}
}@I haven't tried it by myself, maybe you need to call stop() / seek() also.
-
It works. Thank you a lot.