Skip to main content

isTrackType

Callable


  • Checks if a given object is of a specified track type.


    Parameters

    • thing: unknown

      The object to check.

    • type: T

      The track type to check against.

    Returns thing is Extract<AudioTrack, { @type: T }> | Extract<GeneralTrack, { @type: T }> | Extract<ImageTrack, { @type: T }> | Extract<VideoTrack, { @type: T }> | Extract<TextTrack, { @type: T }> | Extract<MenuTrack, { @type: T }> | Extract<OtherTrack, { @type: T }>

    A boolean indicating whether the object is of the specified track type.