21 void Open(Stream source,
bool leaveOpen =
false) =>
22 throw new NotSupportedException(
"This video backend does not support streams.");
37 set =>
throw new NotSupportedException(
"This video backend does not support volume control.");
44 set =>
throw new NotSupportedException(
"This video backend does not support mute control.");
72 void Seek(TimeSpan position);
Defines the contract for a video player that can play, pause, stop, and seek video content.
bool IsMuted
Mutes output without changing the retained volume.
TimeSpan Position
Gets the current playback position in the video.
bool IsMetadataReady
True only when metadata for the current source is available.
int int height NaturalSize
EventHandler Stopped
Occurs when the video playback is stopped.
bool CanSeek
Whether the current media supports seeking. Legacy backends retain their existing seek behavior.
void Pause()
Pauses the video playback.
void Play()
Starts or resumes playback of the video.
void SetRate(double rate)
Sets the playback rate of the video.
TimeSpan Duration
Gets the total duration of the video.
EventHandler< VideoFrameReadyEventArgs > FrameReady
Occurs when a decoded BGRX frame is ready. The pointer is valid only during the callback....
EventHandler< VideoStateChangedEventArgs > StateChanged
Occurs when the video state changes, including MediaOpening, MediaOpened, MetadataReady,...
VideoMetadata Metadata
Gets an atomic snapshot of metadata availability and values for the current source.
bool HasAudio
Gets whether the video has an audio track. Consult IsMetadataReady before interpreting false.
bool IsPlaying
Gets a value indicating whether the video is currently playing.
EventHandler Started
Occurs when the video playback starts.
EventHandler Paused
Occurs when the video playback is paused.
bool Loop
Gets or sets a value indicating whether the video should loop when it reaches the end.
EventHandler Ended
Occurs when the video playback reaches the end.
bool CanControlAudio
Whether this backend exposes independent volume and mute controls.
void Stop()
Stops the video playback and resets the position.
float Volume
Audible output gain from zero to one. Legacy backends may not support setting it.
void Seek(TimeSpan position)
Seeks to the specified position in the video.
Exception? LastError
The most recent playback failure, when available.
void Open(Stream source, bool leaveOpen=false)
Opens a readable stream. Ownership transfers on success unless leaveOpen is true. Keep a borrowed str...
int width
Gets the natural size (width and height) of the video in pixels.
void Open(Uri source)
Opens a video from the specified source URI.
VideoMetadataStatus
The availability of metadata for the active source.
record VideoMetadata(VideoMetadataStatus Status, bool HasAudio, TimeSpan Duration)
An immutable metadata snapshot. Values are authoritative only when status is Ready.