🔹 MediaPlayer Class
namespace NoesisApp
Abstract interface for platform-specific audio/video playback used by MediaElement.
Each platform must provide a concrete implementation of this class and register a factory through MediaElement::SetCreateMediaPlayerCallback.
This interface exposes playback control, media state, audio/video properties, and event notifications. All time values are expressed in seconds.
Properties
| Name | Description |
|---|---|
| ◆ Balance | Gets or sets the stereo balance in the range [-1, 1]. -1 = full left, 0 = centered, 1 = full right |
| ◆ BufferingProgress | Gets the buffering progress for streaming media in the range [0, 1]. A value of 1 indicates buffering is complete or not required |
| ◆ CanPause | Gets whether the current media supports pausing |
| ◆ DownloadProgress | Gets the download progress for remote media in the range [0, 1]. Returns 1 for fully available or local media |
| ◆ Duration | Gets the duration in seconds of the media |
| ◆ Height | Gets the pixel height of the video stream |
| ◆ IsMuted | Gets or sets whether audio output is muted |
| ◆ Position | Gets or sets the current playback position in seconds |
| ◆ ScrubbingEnabled | Gets or sets whether frame updates occur during seek operations while paused. When enabled, seeking updates the displayed frame without resuming playback |
| ◆ SpeedRatio | Gets or sets the playback speed ratio. A value of 1 represents normal speed |
| ◆ Volume | Gets or sets the audio volume in the range [0, 1]. The default value is 0.5 |
| ◆ Width | Gets the pixel width of the video stream |
◆ Dependency Property ◆ Reflection Property
Attached Properties
MediaPlayer has no attached properties
Methods
| Name | Description |
|---|---|
| ◆ GetTextureSource() | Gets the texture source used to render the video frame |
| ◆ HasAudio() | Gets whether the media contains an audio track |
| ◆ HasVideo() | Gets whether the media contains a video track |
| ◆ Pause() | Pauses playback |
| ◆ Play() | Starts or resumes playback |
| ◆ Stop() | Stops playback and resets position to the beginning (0 seconds) |
| ◆ Update() | Called once per frame to update playback, audio, and video state |
Events
| Name | Description |
|---|---|
| ◆ BufferingEnded | Occurs when buffering has finished |
| ◆ BufferingStarted | Occurs when buffering has started |
| ◆ MediaEnded | Occurs when the media has finished playback |
| ◆ MediaFailed | Occurs when an error is encountered |
| ◆ MediaOpened | Occurs when the media is opened |
◆ Routed Event ◆ Non-routed Event ◆ Delegate Event
📍 On this page