UWP - MediaPlayerElement vs MediaElement

对着背影说爱祢 提交于 2019-12-07 02:38:11

问题


MediaPlayerElement is replacement for "old" MediaElement. My question is Why?

What is the difference between MediaPlayerElement and MediaElement ?


回答1:


Media Player element uses Media Playback Source in form of MediaSource class which has many methods so it can provide media source by several ways like

  1. Streams
  2. StorageFiles
  3. Uri

and some more as well. It can also be rendered on any XAML surface like a grid or a button. these are main upgrades in Media Player element but you can read in detail about all features here .




回答2:


MediaPlayerElement is the evolution of MediaElement.

In Windows 10, build 1607 and on we recommend that you use MediaPlayerElement in place of MediaElement. MediaPlayerElement has the same functionality as MediaElement, while also enabling more advanced media playback scenarios. Additionally, all future improvements in media playback will happen in MediaPlayerElement.

Newer MediaPlayerElement decomposes the control in MediaPlayer class and a lightweight control over it. This provides better flexibility and new features for playback.

Another paragraph on the relation of the controls and suggested migration path:

… For more information about the MediaPlayer class, including guidelines on how to transition from MediaElement to MediaPlayerElement, see the Media playback page.



来源:https://stackoverflow.com/questions/44730683/uwp-mediaplayerelement-vs-mediaelement

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!