NMVideoPlayer inherits all methods from the Player Core base class.
This page lists the inherited surface grouped by concern and links to the canonical documentation in the core.
Transport
| Method | Signature | Description |
|---|---|---|
play | (opts?: ActionOptions) => Promise<void> | Begin playback |
pause | (opts?: ActionOptions) => Promise<void> | Pause playback |
stop | (opts?: ActionOptions) => Promise<void> | Stop and return to idle |
next | (opts?: ActionOptions) => Promise<void> | Advance to the next playlist item |
previous | (opts?: ActionOptions) => Promise<void> | Return to the previous playlist item |
togglePlayback | () => Promise<void> | Toggle between play and pause |
rewind | (seconds?: number) => Promise<void> | Seek backward by seconds (default 5) |
forward | (seconds?: number) => Promise<void> | Seek forward by seconds (default 5) |
Queue / playlist
| Method | Signature | Description |
|---|---|---|
item() | () => T | undefined | Active playlist item |
item(target, opts?) | (target: T | string | number, opts?) => void | Set the active item by value, id, or index |
queue() | () => ReadonlyArray<T> | Full queue as a read-only array |
queue(items) | (items: T[]) => void | Replace the queue contents |
Time
| Method | Signature | Description |
|---|---|---|
time() | () => number | Current position in seconds |
time(seconds) | (seconds: number) => void | Seek to seconds |
duration() | () => number | Total duration in seconds |
Volume
| Method | Signature | Description |
|---|---|---|
volume() | () => number | Current volume level (0–100) |
volume(level) | (level: number) => void | Set volume level, clamped to [0, 100] |
mute() | () => void | Mute the player |
unmute() | () => void | Unmute the player |
toggleMute | () => void | Toggle mute |
volumeUp | (step?: number) => void | Increase volume by step percentage points (default 5) |
volumeDown | (step?: number) => void | Decrease volume by step percentage points (default 5) |
Playback rate
| Method | Signature | Description |
|---|---|---|
playbackRate() | () => number | Current playback rate |
playbackRate(rate) | (rate: number) => void | Set playback rate |
playbackRates() | () => number[] | Available rate options |
Repeat and shuffle
| Method | Signature | Description |
|---|---|---|
repeatState() | () => RepeatState | Current repeat mode |
repeatState(state) | (state: RepeatState) => void | Set repeat mode |
shuffleState() | () => ShuffleState | Current shuffle mode |
shuffleState(state) | (state: ShuffleState) => void | Set shuffle mode |
Subtitle style
| Method | Signature | Description |
|---|---|---|
subtitleStyle() | () => SubtitleStyle | Current subtitle rendering style |
subtitleStyle(patch) | (patch: Partial<SubtitleStyle>) => void | Merge a partial style update |
Track selection
| Method | Signature | Description |
|---|---|---|
subtitles() | () => SubtitleTrackRef[] | Available subtitle tracks |
subtitle() | () => CurrentSubtitleSelection | null | Active subtitle track |
subtitle(idx) | (idx: number | null) => void | Activate subtitle by index, or null to turn off |
audioTracks() | () => AudioTrackRef[] | Available audio tracks |
audioTrack() | () => CurrentAudioTrackSelection | null | Active audio track |
audioTrack(idx) | (idx: number) => void | Activate audio track by index |
qualityLevels() | () => QualityLevel[] | Available quality levels |
quality() | () => CurrentQualitySelection | 'auto' | Active quality level |
quality(idx) | (idx: number | 'auto') => void | Pin quality or return to ABR |
State queries
| Method | Signature | Description |
|---|---|---|
playState() | () => PlayState | Current top-level playback state |
volumeState() | () => VolumeState | Mute/unmute state |
Chapters
| Method | Signature | Description |
|---|---|---|
chapters() | () => Chapter[] | All chapters for the current item |
chapter() | () => Chapter | null | Chapter active at time() |
nextChapter(opts?) | (opts?: ActionOptions) => void | Jump to the next chapter boundary |
previousChapter(opts?) | (opts?: ActionOptions) => void | Jump to the previous chapter boundary |
Plugin management
| Method | Signature | Description |
|---|---|---|
addPlugin(cls, opts?) | See Factory | Register a plugin before setup() |
getPlugin(Cls) | (Cls: PluginCtorWithId) => P | undefined | Retrieve a registered plugin instance by constructor (type-safe) |
getPluginById(id) | (id: string) => P | undefined | Retrieve a registered plugin instance by its static id string |
Events
| Method | Signature | Description |
|---|---|---|
on(event, fn) | See Player Core: Event System | Subscribe to an event |
off(event, fn) | See Player Core: Event System | Unsubscribe |
once(event, fn) | See Player Core: Event System | Subscribe for exactly one emission |
emit(event, payload) | See Player Core: Event System | Emit an event (typed against the event map); available to consumer code and plugins |
hasListeners(event) | (event: string) => boolean | Check if any listener is registered for an event |
Context detection
| Method | Signature | Description |
|---|---|---|
isMobile() | () => boolean | Returns true on mobile-sized viewports |
isTv() | () => boolean | Returns true when a TV/D-pad environment is detected |