Avi_Lieberman
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2012
03:44 AM
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
Where to define the audioPlayer in order to in screen closing the song will not be finished.
thanks
1 REPLY 1

RokuJoel
Binge Watcher
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2012
10:54 AM
Re: play audio while navigation screen
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
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