The MediaPlayerControl
is a fully-featured UI control for media playback that provides transport controls, progress
display, volume control, and video rendering. It encapsulates a MediaPlayer
instance and provides a rich user
interface for media playback.
Properties
Basic Properties
Property | Type | Description |
---|
Player | MediaPlayer | Gets the underlying MediaPlayer instance that handles the actual media playback operations. |
Source | MediaSource | Gets or sets the media source to be played (UriSource or StreamSource ). |
LoadedBehavior | MediaPlayerState | Gets or sets the behavior when media is loaded (AutoPlay or Manual ). |
Playback Properties
Property | Type | Description |
---|
Position | TimeSpan | Gets or sets the current playback position. |
Duration | TimeSpan? | Gets the total duration of the current media. Null for non-seekable media. |
SkipTime | TimeSpan | Gets or sets the time to skip with forward/backward commands (default: 10s). |
State Properties
Property | Type | Description |
---|
IsBuffering | bool | Gets whether the media is currently buffering. |
BufferProgress | double? | Gets the buffer progress (0.0-1.0). Null if not available. |
IsPaused | bool | Gets whether the media playback is currently paused. |
IsMediaActive | bool | Gets whether media is currently active (loaded and/or playing). |
HasVideo | bool | Gets whether the current media contains video content. |
IsSeekable | bool | Gets whether the current media can be seeked. |
IsOverlayTimeoutEnabled | bool | Gets or sets whether control overlay should hide after inactivity. |
Audio Properties
Property | Type | Description |
---|
Volume | double | Gets or sets the playback volume with normalized values (e.g., 0.0-1.0). |
IsMuted | bool | Gets whether audio is currently muted. |
Command Properties
Property | Type | Description |
---|
PlayPauseCommand | ICommand | Gets the command that toggles between play and pause states. |
StopCommand | ICommand | Gets the command that stops playback. |
MuteCommand | ICommand | Gets the command that toggles audio muting. |
SkipForwardCommand | ICommand | Gets the command that skips forward by SkipTime amount. |
SkipBackwardCommand | ICommand | Gets the command that skips backward by SkipTime amount. |
Events