21 void Open(Stream source,
bool leaveOpen =
false) =>
throw new NotSupportedException(
"This video backend does not support streams.");
48 void Seek(TimeSpan position);
Defines the contract for a video player that can play, pause, stop, and seek video content.
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.
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.
void Stop()
Stops the video playback and resets the position.
void Seek(TimeSpan position)
Seeks to the specified position in the video.
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.