The Audio Player object provides the ability to setup the playing of a series of audio streams. The object accepts an array of content meta-data objects, describing the audio and providing url's for accessing each stream. The component understands the following streamformat values: "mp3", "wma", "mp4", "hls", "es.aac-adts", "flac"

Supported Interfaces

Supported Events


This object does not provide an interface to a screen. In order to get events both from the screen you are using and the Audio Player, you should use the same Message Port for both objects. 
This object is created with no parameters:

Sub Main()
	audioPlayer = CreateObject("roAudioPlayer")
	port = CreateObject("roMessagePort")
	song = CreateObject("roAssociativeArray")
	song.url = ""
	while true
        	msg = wait(0, port)
        	if type(msg) = "roAudioPlayerEvent"
            		if msg.isStatusMessage() then
                		print "roAudioPlayerEvent: "; msg.getmessage()
                		if msg.getmessage() = "end of playlist" return
    	end while
End Sub