Forum Discussion

Avi_Lieberman's avatar
13 years ago

play audio while navigation screen

I want to allow during the song plays to navigate between screens. How to do it?
Where to define the audioPlayer in order to in screen closing the song will not be finished.

thanks

1 Reply

  • create the audioplayer as a global variable:

    m.audioplayer=createobject("roaudioplayer")

    you probably want to do this near the beginning of your program.

    You should also probably include checks for roAudioPlayerEvents in all your event loops, and track playlist position and song elapsed time in global variables as well. I don't recommend using a global port if you are new to Brightscript, so you would probably want to assign the global audio player to the port variable you are working with in each function.

    - Joel