melonjs
    Preparing search index...

    Function seek

    • get/set the position of playback for a sound.

      Parameters

      • sound_name: string

        audio clip name - case sensitive

      • ...args: any[]

      Returns number

      return the current seek position (if no extra parameters were given)

      // return the current position of the background music
      let current_pos = me.audio.seek("dst-gameforest");
      // set back the position of the background music to the beginning
      me.audio.seek("dst-gameforest", 0);