Options
Menu

textalive-app-api

Index

Type aliases

DataLoaderListener

データ読み込みルーチンに関するイベントのリスナ

Event listener for data loading procedures

GraphicData

GraphicData: UnitData

LoaderListener

LoaderListener: DataLoaderListener & BackgroundGraphicsListener & TemplateListener

読み込みルーチンに関するイベントのリスナ

Event listener for various loading procedures

ParameterValue

ParameterValue: IColor | string | number | boolean

TextAlive アプリ、スタイル、テンプレートで調整可能なパラメタ値の型情報

Type definition for parameter values that can be customized in TextAlive App, styles, and templates

PlayerBannerPosition

PlayerBannerPosition: "top" | "top left" | "top right" | "bottom" | "bottom left" | "bottom right" | "left" | "left top" | "left bottom" | "right" | "right top" | "right bottom" | "embed" | null

PlayerFindOptions

PlayerFindOptions: FindTimedObjectOptions

PlayerListener

TextAlive Player に関するさまざまなイベントのリスナ

Event listener for TextAlive Player

PlayerMediaPositionUpdateFunction

PlayerMediaPositionUpdateFunction: (position: number) => Promise<number>

Timer が音源の再生位置情報を更新する際に呼び出すコールバック関数の型情報

Type definition for a callback function used by Timer to update the current music playback position

Type declaration

    • (position: number): Promise<number>
    • Parameters

      • position: number

      Returns Promise<number>

RegionalText

RegionalText: {}

多言語対応文字列

  • TextAlive の表示言語に応じて表示が切り替わる
  • 現状、 ja キーで日本語、 en キーで英語の表記を指定可能

String type with multi-language support (ja for Japanese and en for English)

Type declaration

  • [lang: string]: string

RenderingUnitFunction

RenderingUnitFunction<U>: (now: number, u: U) => void

Type parameters

Type declaration

    • (now: number, u: U): void
    • Parameters

      • now: number
      • u: U

      Returns void

Variables

Const PlayerLogoImage

PlayerLogoImage: "<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><defs><style>.bg{fill:#1f4391;}.fg{fill:#fff;}</style></defs><g class="logo-sq"><rect class="bg" x="-20" y="-20" width="240" height="240"/><g class="textalive-logo-art"><path class="fg" d="M97.33,130.81V142a3,3,0,0,0,4.78,2.41l56.81-42.09a3,3,0,0,0,0-4.81l-8.33-6.14Z"/><path class="fg" d="M137.14,81.43l-35-25.84A3,3,0,0,0,97.33,58v52.92Z"/><path class="fg" d="M51,55H80.33a2,2,0,0,1,2,2V71.67a0,0,0,0,1,0,0H51a2,2,0,0,1-2-2V57A2,2,0,0,1,51,55Z"/><path class="fg" d="M44.83,107.5h56.33a2,2,0,0,1,2,2v12.67a2,2,0,0,1-2,2H44.83a0,0,0,0,1,0,0V107.5A0,0,0,0,1,44.83,107.5Z" transform="translate(189.83 41.84) rotate(90)"/></g></g></svg>" = "<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><defs><style>.bg{fill:#1f4391;}.fg{fill:#fff;}</style></defs><g class="logo-sq"><rect class="bg" x="-20" y="-20" width="240" height="240"/><g class="textalive-logo-art"><path class="fg" d="M97.33,130.81V142a3,3,0,0,0,4.78,2.41l56.81-42.09a3,3,0,0,0,0-4.81l-8.33-6.14Z"/><path class="fg" d="M137.14,81.43l-35-25.84A3,3,0,0,0,97.33,58v52.92Z"/><path class="fg" d="M51,55H80.33a2,2,0,0,1,2,2V71.67a0,0,0,0,1,0,0H51a2,2,0,0,1-2-2V57A2,2,0,0,1,51,55Z"/><path class="fg" d="M44.83,107.5h56.33a2,2,0,0,1,2,2v12.67a2,2,0,0,1-2,2H44.83a0,0,0,0,1,0,0V107.5A0,0,0,0,1,44.83,107.5Z" transform="translate(189.83 41.84) rotate(90)"/></g></g></svg>"

TextAlive ロゴ (SVGタグ)

TextAlive logo as a SVG tag

  • .bg: background
  • .fg: foreground

Const UnitTypes

UnitTypes: { ALL: number; CHAR: number; GRAPHIC: number; NONE: number; PHRASE: number; PUBLIC: number; WORD: number }

動画の構成要素

Rendering units in a video

Type declaration

  • ALL: number
  • CHAR: number
  • GRAPHIC: number
  • NONE: number
  • PHRASE: number
  • PUBLIC: number
  • WORD: number

Functions

dataUrlToString

  • dataUrlToString(url: string): string
  • データURLのBase64エンコードされた文字列を復号

    Decode a data URL that encodes UTF-8 string in Base64 format

    Parameters

    • url: string

      URL

    Returns string

findTimedObject

  • Type parameters

    Parameters

    • objects: T[]

      時刻付きオブジェクトの配列 / Array of sorted timed objects

    • time: number

      時刻 [ms] / Time [ms]

    • Optional options: FindTimedObjectOptions

      探索オプション / Find options

    Returns T

    指定された時刻に存在するオブジェクトを返す / Returns the object at the specified timing

isStringEncodedDataUrl

  • isStringEncodedDataUrl(url: string): boolean
  • 文字列がBase64エンコードされたデータURLかどうか判別

    Detect whether the specified string represents a data URL that encodes UTF-8 string in Base64 format

    Parameters

    • url: string

      URL

    Returns boolean

sortedIndex

  • sortedIndex<T>(array: T[], obj: T | number, accessor?: undefined | ((obj: T) => number)): number
  • 二分探索

    Binary search

    Type parameters

    • T

    Parameters

    • array: T[]

      順序付き配列 / Sorted array of objects

    • obj: T | number

      配列中のインデックスを探索するオブジェクト / Object to find an appropriate index

    • Optional accessor: undefined | ((obj: T) => number)

      オブジェクトの数値表現を返す関数 / Accessor function that returns numeric representation of the object

    Returns number

    オブジェクトを挿入すべき位置のインデックス / An appropriate index value in the sorted array to insert the object

stringToDataUrl

  • stringToDataUrl(text: string): string
  • 文字列をBase64エンコードしてデータURLとして取得する

    Encode UTF-8 string in Base64 format and prepend data URL header

    Parameters

    • text: string

      UTF-8 string

    Returns string