Skip to content

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

MethodSignatureDescription
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

MethodSignatureDescription
item()() => T | undefinedActive playlist item
item(target, opts?)(target: T | string | number, opts?) => voidSet the active item by value, id, or index
queue()() => ReadonlyArray<T>Full queue as a read-only array
queue(items)(items: T[]) => voidReplace the queue contents

Time

MethodSignatureDescription
time()() => numberCurrent position in seconds
time(seconds)(seconds: number) => voidSeek to seconds
duration()() => numberTotal duration in seconds

Volume

MethodSignatureDescription
volume()() => numberCurrent volume level (0–100)
volume(level)(level: number) => voidSet volume level, clamped to [0, 100]
mute()() => voidMute the player
unmute()() => voidUnmute the player
toggleMute() => voidToggle mute
volumeUp(step?: number) => voidIncrease volume by step percentage points (default 5)
volumeDown(step?: number) => voidDecrease volume by step percentage points (default 5)

Playback rate

MethodSignatureDescription
playbackRate()() => numberCurrent playback rate
playbackRate(rate)(rate: number) => voidSet playback rate
playbackRates()() => number[]Available rate options

Repeat and shuffle

MethodSignatureDescription
repeatState()() => RepeatStateCurrent repeat mode
repeatState(state)(state: RepeatState) => voidSet repeat mode
shuffleState()() => ShuffleStateCurrent shuffle mode
shuffleState(state)(state: ShuffleState) => voidSet shuffle mode

Subtitle style

MethodSignatureDescription
subtitleStyle()() => SubtitleStyleCurrent subtitle rendering style
subtitleStyle(patch)(patch: Partial<SubtitleStyle>) => voidMerge a partial style update

Track selection

MethodSignatureDescription
subtitles()() => SubtitleTrackRef[]Available subtitle tracks
subtitle()() => CurrentSubtitleSelection | nullActive subtitle track
subtitle(idx)(idx: number | null) => voidActivate subtitle by index, or null to turn off
audioTracks()() => AudioTrackRef[]Available audio tracks
audioTrack()() => CurrentAudioTrackSelection | nullActive audio track
audioTrack(idx)(idx: number) => voidActivate audio track by index
qualityLevels()() => QualityLevel[]Available quality levels
quality()() => CurrentQualitySelection | 'auto'Active quality level
quality(idx)(idx: number | 'auto') => voidPin quality or return to ABR

State queries

MethodSignatureDescription
playState()() => PlayStateCurrent top-level playback state
volumeState()() => VolumeStateMute/unmute state

Chapters

MethodSignatureDescription
chapters()() => Chapter[]All chapters for the current item
chapter()() => Chapter | nullChapter active at time()
nextChapter(opts?)(opts?: ActionOptions) => voidJump to the next chapter boundary
previousChapter(opts?)(opts?: ActionOptions) => voidJump to the previous chapter boundary

Plugin management

MethodSignatureDescription
addPlugin(cls, opts?)See FactoryRegister a plugin before setup()
getPlugin(Cls)(Cls: PluginCtorWithId) => P | undefinedRetrieve a registered plugin instance by constructor (type-safe)
getPluginById(id)(id: string) => P | undefinedRetrieve a registered plugin instance by its static id string

Events

MethodSignatureDescription
on(event, fn)See Player Core: Event SystemSubscribe to an event
off(event, fn)See Player Core: Event SystemUnsubscribe
once(event, fn)See Player Core: Event SystemSubscribe for exactly one emission
emit(event, payload)See Player Core: Event SystemEmit an event (typed against the event map); available to consumer code and plugins
hasListeners(event)(event: string) => booleanCheck if any listener is registered for an event

Context detection

MethodSignatureDescription
isMobile()() => booleanReturns true on mobile-sized viewports
isTv()() => booleanReturns true when a TV/D-pad environment is detected

See also