Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Properties

buffering

buffering: boolean

The media is currently buffering data

duration

duration: Milliseconds | undefined

Determines the full duration of the media. Will be end - start if specified

end

end: Milliseconds

The ending point to stop or loop the media at

error

error: Error | undefined

Any loading or fatal errors that have occurred in the resource

loaded

loaded: boolean

Determines if the resource is fully loaded

loading

loading: boolean

Determines if the resource is currently loading

looping

looping: boolean

Determines if the media is looping

paused

paused: boolean

The media is currently paused

playing

playing: boolean

The media is currently playing

position

position: Milliseconds | undefined

Determines the current position of the media. This is relative to start

start

start: Milliseconds

The start point to play the media from

stopped

stopped: boolean

The media is currently stopped, the position will be equal to start

transitioning

transitioning: boolean

The media is transitioning from one playable state to another

unloaded

unloaded: boolean

Determines if the resource has been unloaded and is now invalid

url

url: Url

The location that the media was loaded from. Can be a local resource with file:// scheme

Methods

pause

  • pause(): Promise<void>

play

  • play(): Promise<void>

seek

  • seek(milliseconds: MillisecondsAccepted): Promise<void>
  • Seeks the media to the specified time point

    Parameters

    • milliseconds: MillisecondsAccepted

    Returns Promise<void>

stop

  • stop(): Promise<void>

unload

  • unload(): Promise<void>
  • Releases the resource. Is reentrant, a released resource can be released again without error. Will possibly set unloaded to true, however, it is not required to.

    Returns Promise<void>