Interface AudioAPI

The interface of core.audio. Can be used to control the audio tracks.

Seealso

The Core module

Hierarchy

Properties

id: number

Get or set the ID of the current track, i.e. can be used to switch tracks. Track IDs are unique for each type of tracks, and can be obtained from tracks.

tracks: Track[]

Returns a list of all tracks.

currentTrack: Track

Returns the information of the current track.

delay: number

Sets the audio delay in seconds.

Remarks

Equivalent to setting the mpv audio-delay property.

volume: number

Sets the audio volume. Note that the maxinum value can be set by the user. The maxinum value can be obtained from mpv's volume-max property.

Remarks

Equivalent to setting the mpv volume property.

muted: boolean

Sets the audio balance.

Remarks

Equivalent to setting the mpv mute property.

Methods

  • Load an external track from a URL.

    Remarks

    Equivalent to clicking the corresponding menu items in IINA. Can also be achieved by mpv's video-add, audio-add and sub-add commands, but the IINA version performs other necessary checks.

    Parameters

    • url: string

      The URL or file path of the track.

    Returns any

Generated using TypeDoc