Skip to content

Mojo audio audiodevice playmusic

mojo:mojo.audio.AudioDevice.PlayMusic

Method PlayMusic:Channel( path:String,finished:Void()=Null,paused:Bool=false )#

Starts streaming audio playback.

PlayMusic starts a piece of audio streaming from a file in the background.

When the audio finishes, the optional finished function is invoked.

The returned Channel instance is automatically discarded when the audio stops, so should not be discarded by your code.

The audio file must be in .ogg format.