mpv_event_id enum

Inheritance
Available extensions

Values

MPV_EVENT_NONE → const mpv_event_id

Nothing happened. Happens on timeouts or sporadic wakeups.

const mpv_event_id(0)
MPV_EVENT_SHUTDOWN → const mpv_event_id

Happens when the player quits. The player enters a state where it tries to disconnect all clients. Most requests to the player will fail, and the client should react to this and quit with mpv_destroy() as soon as possible.

const mpv_event_id(1)
MPV_EVENT_LOG_MESSAGE → const mpv_event_id

See mpv_request_log_messages().

const mpv_event_id(2)
MPV_EVENT_GET_PROPERTY_REPLY → const mpv_event_id

Reply to a mpv_get_property_async() request. See also mpv_event and mpv_event_property.

const mpv_event_id(3)
MPV_EVENT_SET_PROPERTY_REPLY → const mpv_event_id

Reply to a mpv_set_property_async() request. (Unlike MPV_EVENT_GET_PROPERTY, mpv_event_property is not used.)

const mpv_event_id(4)
MPV_EVENT_COMMAND_REPLY → const mpv_event_id

Reply to a mpv_command_async() or mpv_command_node_async() request. See also mpv_event and mpv_event_command.

const mpv_event_id(5)
MPV_EVENT_START_FILE → const mpv_event_id

Notification before playback start of a file (before the file is loaded). See also mpv_event and mpv_event_start_file.

const mpv_event_id(6)
MPV_EVENT_END_FILE → const mpv_event_id

Notification after playback end (after the file was unloaded). See also mpv_event and mpv_event_end_file.

const mpv_event_id(7)
MPV_EVENT_FILE_LOADED → const mpv_event_id

Notification when the file has been loaded (headers were read etc.), and decoding starts.

const mpv_event_id(8)
MPV_EVENT_TRACKS_CHANGED → const mpv_event_id
const mpv_event_id(9)
MPV_EVENT_TRACK_SWITCHED → const mpv_event_id
const mpv_event_id(10)
MPV_EVENT_IDLE → const mpv_event_id

Idle mode was entered. In this mode, no file is played, and the playback core waits for new commands. (The command line player normally quits instead of entering idle mode, unless --idle was specified. If mpv was started with mpv_create(), idle mode is enabled by default.)

@deprecated This is equivalent to using mpv_observe_property() on the "idle-active" property. The event is redundant, and might be removed in the far future. As a further warning, this event is not necessarily sent at the right point anymore (at the start of the program), while the property behaves correctly.

const mpv_event_id(11)
MPV_EVENT_PAUSE → const mpv_event_id

Playback was paused. This indicates the user pause state.

The user pause state is the state the user requested (changed with the "pause" property). There is an internal pause state too, which is entered if e.g. the network is too slow (the "core-idle" property generally indicates whether the core is playing or waiting).

This event is sent whenever any pause states change, not only the user state. You might get multiple events in a row while these states change independently. But the event ID sent always indicates the user pause state.

If you don't want to deal with this, use mpv_observe_property() on the "pause" property and ignore MPV_EVENT_PAUSE/UNPAUSE. Likewise, the "core-idle" property tells you whether video is actually playing or not.

@deprecated The event is redundant with mpv_observe_property() as mentioned above, and might be removed in the far future.

const mpv_event_id(12)
MPV_EVENT_UNPAUSE → const mpv_event_id

Playback was unpaused. See MPV_EVENT_PAUSE for not so obvious details.

@deprecated The event is redundant with mpv_observe_property() as explained in the MPV_EVENT_PAUSE comments, and might be removed in the far future.

const mpv_event_id(13)
MPV_EVENT_TICK → const mpv_event_id

Sent every time after a video frame is displayed. Note that currently, this will be sent in lower frequency if there is no video, or playback is paused - but that will be removed in the future, and it will be restricted to video frames only.

@deprecated Use mpv_observe_property() with relevant properties instead (such as "playback-time").

const mpv_event_id(14)
MPV_EVENT_SCRIPT_INPUT_DISPATCH → const mpv_event_id
const mpv_event_id(15)
MPV_EVENT_CLIENT_MESSAGE → const mpv_event_id

Triggered by the script-message input command. The command uses the first argument of the command as client name (see mpv_client_name()) to dispatch the message, and passes along all arguments starting from the second argument as strings. See also mpv_event and mpv_event_client_message.

const mpv_event_id(16)
MPV_EVENT_VIDEO_RECONFIG → const mpv_event_id

Happens after video changed in some way. This can happen on resolution changes, pixel format changes, or video filter changes. The event is sent after the video filters and the VO are reconfigured. Applications embedding a mpv window should listen to this event in order to resize the window if needed. Note that this event can happen sporadically, and you should check yourself whether the video parameters really changed before doing something expensive.

const mpv_event_id(17)
MPV_EVENT_AUDIO_RECONFIG → const mpv_event_id

Similar to MPV_EVENT_VIDEO_RECONFIG. This is relatively uninteresting, because there is no such thing as audio output embedding.

const mpv_event_id(18)
MPV_EVENT_METADATA_UPDATE → const mpv_event_id
const mpv_event_id(19)
MPV_EVENT_SEEK → const mpv_event_id

Happens when a seek was initiated. Playback stops. Usually it will resume with MPV_EVENT_PLAYBACK_RESTART as soon as the seek is finished.

const mpv_event_id(20)
MPV_EVENT_PLAYBACK_RESTART → const mpv_event_id

There was a discontinuity of some sort (like a seek), and playback was reinitialized. Usually happens on start of playback and after seeking. The main purpose is allowing the client to detect when a seek request is finished.

const mpv_event_id(21)
MPV_EVENT_PROPERTY_CHANGE → const mpv_event_id

Event sent due to mpv_observe_property(). See also mpv_event and mpv_event_property.

const mpv_event_id(22)
MPV_EVENT_QUEUE_OVERFLOW → const mpv_event_id

Happens if the internal per-mpv_handle ringbuffer overflows, and at least 1 event had to be dropped. This can happen if the client doesn't read the event queue quickly enough with mpv_wait_event(), or if the client makes a very large number of asynchronous calls at once.

Event delivery will continue normally once this event was returned (this forces the client to empty the queue completely).

const mpv_event_id(24)
MPV_EVENT_HOOK → const mpv_event_id

Triggered if a hook handler was registered with mpv_hook_add(), and the hook is invoked. If you receive this, you must handle it, and continue the hook with mpv_hook_continue(). See also mpv_event and mpv_event_hook.

const mpv_event_id(25)

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
name String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value int
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

fromValue(int value) mpv_event_id

Constants

values → const List<mpv_event_id>
A constant List of the values in this enum, in order of their declaration.