Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IPlayer

IPlayer

TextAlive のプレイヤーが実装するインタフェースです。

TextAlive Player implements this interface.

Hierarchy

  • IPlayer

Implemented by

Index

Properties

Readonly app

TextAlive アプリの状態

TextAlive app status

Readonly banner

banner: IPlayerBanner

TextAlive Player の情報を表示する IPlayerBanner インスタンスです。

A banner instance that shows the player info.

Readonly data

読み込まれている音楽地図などの情報

Current video materials

fps

fps: number

フレームレート [フレーム数/秒]

Framerate [frames per sec]

see

IPlayer.wait

Readonly isLoading

isLoading: boolean

動画(楽曲情報や歌詞など)が読み込み中か否か

Whether the video (song, lyrics, etc.) is being loaded or not

Readonly isPlaying

isPlaying: boolean

動画再生中か否か

Whether the video is being played or not

Readonly isVideoSeeking

isVideoSeeking: boolean

動画シーク中か否か

Whether the seeking operation is ongoing on or not

Readonly mediaBannerElement

mediaBannerElement: HTMLElement

音源などに関するバナーの配置先となるDOM要素

Media banner element

mediaElement

mediaElement: HTMLElement

音源メディアの配置先となるDOM要素

Media element

see

IPlayer.banner

Readonly mediaPosition

mediaPosition: number

現在の音源メディアの再生位置 [ms]

Current media position [ms]

Readonly mediaSourceElement

mediaSourceElement: HTMLElement

音源メディアの直接の配置先となるDOM要素

Media source element

Readonly options

options: PlayerOptions

プレイヤーの初期化オプション

Player options

Readonly timer

timer: Timer

TextAlive Player の音源の再生状態を管理する Timer インスタンスです。

A timer instance that controls the player status.

Readonly video

video: IVideo

動画オブジェクト

Current video object

Readonly videoPosition

videoPosition: number

現在の動画の再生位置 [ms]

Current video position [ms]

volume

volume: number

音量 [0-100]

Volume [0-100]

wait

wait: number

動画の描画間隔 [ms]

A time window between rendering frames [ms]

see

IPlayer.fps

Methods

addListener

  • イベントリスナを登録する

    Add event listener

    Parameters

    Returns void

createFromJSON

  • 動画情報を表すデータ(VideoData)から動画データを生成する

    Generate video data from JSON

    Parameters

    • json: VideoData

      動画情報 / JSON data to be converted to a video

    • Optional options: PlayerVideoOptions

      オプション / Optional data to build the video object

    Returns Promise<IVideo>

    動画オブジェクト / Video object

createFromSongPath

  • 楽曲パス(URLから http:// などのプロトコル部分を除いたもの)に基づいて音楽地図などを読み込み、動画データを生成する

    Generate video data from song path

    Parameters

    • songPath: string

      楽曲パス / Song path

    • Optional options: PlayerVideoOptions

      オプション / Optional data to build the video object

    Returns Promise<IVideo>

    動画オブジェクト / Video object

createFromSongUrl

  • 楽曲URLに基づいて音楽地図などを読み込み、動画データを生成する

    Generate video data from song URL

    Parameters

    • songUrl: string

      楽曲URL / Song URL

    • Optional options: PlayerVideoOptions

      オプション / Optional data to build the video object

    Returns Promise<IVideo>

    動画オブジェクト / Video object

createFromText

  • テキストからダミーの音楽地図情報と動画データを生成する

    Generate video data from text

    Parameters

    • text: string

      テキスト / Text to show

    • Optional options: PlayerVideoOptions

      オプション / Optional data to build the video object

    Returns Promise<IVideo>

    動画オブジェクト / Video object

dispose

  • dispose(): void
  • プレイヤーを破棄する

    Dispose this player

    Returns void

endVideoSeek

  • endVideoSeek(): void

findBeat

  • 指定された位置のビート情報を取得する

    Find beat that overlaps with the specified timing

    see

    IDataLoader.findBeat

    Parameters

    • time: number

      位置 [ms] / Position [ms]

    • Optional options: FindTimedObjectOptions

      探索オプション / Optional parameters for finding beat

    Returns IBeat

    ビート情報(見つからなければ null

findChord

  • 指定された位置のコード進行を取得する

    Find chord that overlaps with the specified timing

    see

    IDataLoader.findChord

    Parameters

    • time: number

      位置 [ms] / Position [ms]

    • Optional options: FindTimedObjectOptions

      探索オプション / Optional parameters for finding chord

    Returns IChord

    コード進行(見つからなければ null

findChorus

  • 指定された位置のサビ情報を取得する

    Find a chorus part that overlaps with the specified timing

    see

    IDataLoader.findChorus

    Parameters

    • time: number

      位置 [ms] / Position [ms]

    • Optional options: FindTimedObjectOptions

      optional parameters for finding a chorus part

    Returns IRepetitiveSegment

    サビ情報(見つからなければ null

findChorusBetween

getBeats

  • 楽曲中のビートに関する情報を取得する

    Get beats in the current song

    see

    IDataLoader.getBeats

    Returns IBeat[]

    ビート情報(見つからなければ空の配列)

getChords

  • 楽曲中のコード進行に関する情報を取得する

    Get chord info in the current song

    see

    IDataLoader.getChords

    Returns IChord[]

    コード進行の情報(見つからなければ空の配列)

getChoruses

  • 楽曲中のサビに関する情報を取得する

    Get chorus parts in the current song

    see

    IDataLoader.getChoruses

    Returns IRepetitiveSegment[]

    サビ情報(見つからなければ空の配列)

getMaxVocalAmplitude

  • getMaxVocalAmplitude(): number

getMedianValenceArousal

getValenceArousal

getVocalAmplitude

  • getVocalAmplitude(time: number): number

removeListener

  • イベントリスナを削除する

    Remove event listener

    Parameters

    Returns boolean

    削除の成否 / Whether the listener was successfully removed or not

requestMediaSeek

  • requestMediaSeek(position: number): boolean
  • 楽曲の再生位置を指定する

    Seek specified position in the current media

    Parameters

    • position: number

      再生位置 [ms] / Media position [ms]

    Returns boolean

requestPause

  • requestPause(): boolean
  • 楽曲の再生を一時停止する

    Pause playing music

    Returns boolean

    一時停止の成否

requestPlay

  • requestPlay(): boolean
  • 楽曲の再生を開始する

    Start playing music

    Returns boolean

    開始の成否

requestStageUpdate

  • requestStageUpdate(): Promise<number>
  • 動画の現在のフレームを強制的に再描画する

    Force rendering current frame

    Returns Promise<number>

    動画の現在位置 [ms] / Video position [ms]

requestStop

  • requestStop(): boolean
  • 楽曲の再生を停止する(一時停止したうえで先頭に巻き戻しする)

    Stop playing music (pause and then seek the beginning)

    Returns boolean

    停止の成否

setVideoPosition

  • setVideoPosition(position: number): Promise<number>
  • 動画の再生位置を指定する

    Try setting video position

    Parameters

    • position: number

      再生位置 [ms] / Video position [ms]

    Returns Promise<number>

startVideoSeek

  • startVideoSeek(): void

Generated using TypeDoc