Options
Menu

Class SongleTimer

Songle timer

Songle API を利用した Timer の実装:

A Timer implementation using Songle API:

see

https://api.songle.jp/

Hierarchy

  • SongleTimer

Implements

Index

Constructors

Properties

Accessors

Methods

Constructors

constructor

Properties

wait

wait: number

Accessors

isPlaying

  • get isPlaying(): boolean
  • 再生中かどうか

    Whether the music source is being played or not

    Returns boolean

position

  • get position(): number

songlePlayer

  • get songlePlayer(): SonglePlayer

Methods

dispose

  • dispose(): void
  • この Timer を破棄する

    Dispose this Timer instance

    Returns void

initialize

  • initialize(__namedParameters: { altUrl: any; emitter: PlayerEventListener; player: IPlayer; updater: (position: number) => Promise<number> }): Promise<void>
  • Parameters

    • __namedParameters: { altUrl: any; emitter: PlayerEventListener; player: IPlayer; updater: (position: number) => Promise<number> }
      • altUrl: any
      • emitter: PlayerEventListener
      • player: IPlayer
      • updater: (position: number) => Promise<number>
          • (position: number): Promise<number>
          • Parameters

            • position: number

            Returns Promise<number>

    Returns Promise<void>

pause

  • pause(): void
  • 再生を一時停止する

    Pause music playback

    Returns void

play

  • play(): void
  • 再生を開始する

    Start music playback

    Returns void

seek

  • seek(time: number): void
  • 再生位置を指定する

    Seek specified position in the current music playback

    Parameters

    • time: number

    Returns void

stop

  • stop(): void
  • 再生を停止する(一時停止したうえで先頭に巻き戻しする)

    Stop music playback (pause and then seek the beginning)

    Returns void