Windows.Media.Core.MediaSource
September 2, 2020 ยท View on GitHub
-description
Represents a media source. Provides a common way to reference media from different sources and exposes a common model for accessing media data regardless of the underlying media format.
-remarks
Using one of the factory methods, you can create an instance of MediaSource from many different media source representations, including:
- AdaptiveMediaSource
- MediaStreamSource
- MseStreamSource
- IStorageFile
- IRandomAccessStream
- IRandomAccessStreamReference
- Uri
After getting a MediaSource instance, create a new MediaPlaybackItem wrapping the media source and pass the MediaPlaybackItem to one of the media playback objects, such as MediaPlayer or MediaElement.
For how-to guidance for using MediaSource to play back media, see Media items, playlists, and tracks.
Version history
| Windows version | SDK version | Value added |
|---|---|---|
| 1511 | 10586 | CreateFromMediaBinder |
| 1511 | 10586 | Reset |
| 1511 | 10586 | State |
| 1511 | 10586 | StateChanged |
| 1703 | 15063 | AdaptiveMediaSource |
| 1703 | 15063 | MediaStreamSource |
| 1703 | 15063 | MseStreamSource |
| 1703 | 15063 | OpenAsync |
| 1703 | 15063 | Uri |
| 1709 | 16299 | CreateFromMediaFrameSource |
| 1803 | 17134 | CreateFromDownloadOperation |
| 1803 | 17134 | DownloadOperation |