isTrackType
Callable
Type parameters
- T: Audio | General | Video | Text | Image | Menu | Other
The type of track to check for.
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.
- T: Audio | General | Video | Text | Image | Menu | Other
Checks if a given object is of a specified track type.