melonJS
    Preparing search index...

    Function playTrack

    • Play the specified audio track. Automatically loops the clip and tracks it as the current track for stopTrack / pauseTrack / resumeTrack.

      Parameters

      • sound_name: string

        Audio track name (case-sensitive).

      • Optionalvolume: number

        Playback volume, 0.0..1.0. Defaults to the current global volume.

      Returns number

      The sound instance ID.

      me.audio.playTrack("awesome_music");