Options
All
  • Public
  • Public/Protected
  • All
Menu

AudioClipSequence defines a series of audio that plays in sequence

Hierarchy

  • AudioClipSequence

Index

Constructors

constructor

Accessors

isPlaying

  • get isPlaying(): boolean
  • Returns true if the audio sequence is currently playing

    Returns boolean

onClipEnd

  • get onClipEnd(): Function
  • set onClipEnd(callback: Function): void
  • Set a callback function that is invoked when an audio clip in the sequence ends (only called if audio clip reaches its end).

    Returns Function

  • Set a callback function that is invoked when an audio clip in the sequence ends (only called if audio clip reaches its end).

    Parameters

    • callback: Function

      Function to invoke. Sends IAudioPlayInfo parameter that is the clip ending

    Returns void

onClipStart

  • get onClipStart(): Function
  • set onClipStart(callback: Function): void
  • Set a callback function that is invoked when an audio clip in the sequence starts.

    Returns Function

  • Set a callback function that is invoked when an audio clip in the sequence starts.

    Parameters

    • callback: Function

      Function to invoke. Sends IAudioPlayInfo parameter that is the clip starting

    Returns void

onEnd

  • get onEnd(): Function
  • set onEnd(callback: Function): void
  • Set a callback function that is invoked when the sequence ends. This occurs explicitly when the last audio is complete

    Returns Function

  • Set a callback function that is invoked when the sequence ends. This occurs explicitly when the last audio is complete

    Parameters

    • callback: Function

      Function to invoke. Sends atEnd parameter that is set to true if the last audio in the sequence was played to the end

    Returns void

onStop

  • get onStop(): Function
  • set onStop(callback: Function): void
  • Set a callback function that is invoked whenever audio in the sequence stops. This occurs when the audio is explicitly stopped or the end of the last audio is reached

    Returns Function

  • Set a callback function that is invoked whenever audio in the sequence stops. This occurs when the audio is explicitly stopped or the end of the last audio is reached

    Parameters

    • callback: Function

      Function to invoke. Sends atEnd parameter that is set to true if the last audio in the sequence was played to the end

    Returns void

Methods

play

  • play(): void
  • Start playing the sequence (from the beginning)

    Returns void

stop

  • stop(): void
  • Stop playing the sequence

    Returns void

Static generateNumberSequence

  • generateNumberSequence(_input: number | string, _audiosprite?: string): Array<IAudioPlayInfo>
  • Takes in a number/string and returns an array of IAudioPlayInfo to be played as an audio sequence in english. Examples: "8675309" -> "eight million six hundred seventy five three hundred nine" ".007" -> "point zero zero seven" -42 -> "negative forty two"

    Parameters

    • _input: number | string

      Number to convert to audio sequence

    • Optional _audiosprite: string

      Name of the audio group/channel where the number audio lives. If not specified the audio is assumed to be global and put on the IAudioPlayInfo.name property

    Returns Array<IAudioPlayInfo>

    Array<SZ.IAudioPlayInfo>