2018-11-13, 18:49
Hi all,
I am trying to create a window, which, when opens, will play a specific file - preferably in a loop. Sort of like background music...
I tried to do the following:
However - I get an error:
The file definitely exists - in skin/media/sounds/file.mp3. I also tried it in skin/sounds/file.mp3 but no luck.
Also, the above would not stop the music when I exit the window - can I use something like <onfocus> ?
Thanks
CJ
I am trying to create a window, which, when opens, will play a specific file - preferably in a loop. Sort of like background music...
I tried to do the following:
xml:<onclick>PlayMedia(~Desktop/file.mp3</onclick>
<onclick>ActivateWindow(1110)</onclick> <!-- this is a my custom window -->
However - I get an error:
Code:
16:18:58.228 T:140735956284352 ERROR: CAudioDecoder: Unable to Init Codec while loading file sounds/file.mp3
16:18:58.228 T:140735956284352 WARNING: PAPlayer::QueueNextFileEx - Failed to create the decoder
16:18:58.229 T:140735956284352 ERROR: PlayMedia could not play media: sounds/file.mp3
16:18:58.821 T:140735956284352 ERROR: Init: Error opening file sounds/file.mp3
The file definitely exists - in skin/media/sounds/file.mp3. I also tried it in skin/sounds/file.mp3 but no luck.
Also, the above would not stop the music when I exit the window - can I use something like <onfocus> ?
Thanks
CJ