IMediaPlayerState
interface
Component Props
Reactive state surface returned by useMediaPlayer — the media-agnostic base shared between useVideoPlayer and useAudioPlayer. All fields are Vue Refs so they are directly bindable in templates.
TypeScript
Definition
The TypeScript interface definition as found in the origam source. Click the copy icon to copy the snippet.
API
Properties
Every property declared by this interface, with its type, optionality and default.
- playingrequiredRef<boolean>
- True while the element is decoding frames / producing audio.
- pausedrequiredRef<boolean>
- True when playback is paused (or has not started yet).
- currentTimerequiredRef<number>
- Current playhead position in seconds.
- durationrequiredRef<number>
- Total duration in seconds. NaN until metadata loads. Can be Infinity for live streams — consumers must guard max UI bindings with Number.isFinite().
- bufferedrequiredRef<number>
- End of the buffered range in seconds (the right edge of the last contiguous chunk the browser can play without stalling).
- volumerequiredRef<number>
- Volume between 0 and 1 — independent from muted.
- mutedrequiredRef<boolean>
- True when the output is muted. Independent from volume.
- readyrequiredRef<boolean>
- True once metadata has loaded and duration is finite.
- loadingrequiredRef<boolean>
- True between loadstart and loadedmetadata (or waiting).
- errorrequiredRef<MediaError | Error | null>
- Last media error captured by the composable, if any.
- playbackRaterequiredRef<number>
- Current playback rate. 1 = normal speed.
- remoteAvailablerequiredRef<boolean>
- True when at least one Remote Playback device is reachable.
- remoteStaterequiredRef<'disconnected' | 'connecting' | 'connected'>
- Connection state of the Remote Playback session.
Ecosystem
Used by
Components and composables that extend or consume this interface.
Usage
Examples
Ready-to-paste code snippets using this interface.
Binding reactive state from useMediaPlayer