Don't use SoundEffect for playing streams. It is for playing short WAV files as sound effects or other incidental noises in an application.
If you want to create your own UI or encapsulate the player inside your own application then the MediaElement is the way to go.
If you want the simplest option possible then go with the MediaPlayerLauncher. This will also give you the standard look and feel and UX that your users will be familiar with.
如果您不想创建自己的播放器,请查看 Microsoft 媒体平台:播放器框架。该项目有带有 UI 控件的内置播放器。然而,该项目旨在播放来自 IIS Smooth Streaming 的流,但您无法尝试播放您的流。如果这种方法失败,那么使用 MediaElement 是一个不错的选择,正如 Matt Lacey 指出的那样。
If you don't want create your own player take a look at Microsoft Media Platform: Player Framework. This project has built-in player with UI controls. However this project is designed to play streams from IIS Smooth Streaming, but you cant try to play your streams. If this approach fail, then using MediaElement is good option as Matt Lacey noted.
发布评论
评论(2)
不要使用
SoundEffect
来播放流。它用于在应用程序中播放短 WAV 文件作为声音效果或其他附带噪音。如果您想创建自己的 UI 或将播放器封装在自己的应用程序中,那么 MediaElement 就是您的最佳选择。
如果您想要最简单的选项,请使用 MediaPlayerLauncher。这也将为您提供用户熟悉的标准外观和用户体验。
Don't use
SoundEffect
for playing streams. It is for playing short WAV files as sound effects or other incidental noises in an application.If you want to create your own UI or encapsulate the player inside your own application then the MediaElement is the way to go.
If you want the simplest option possible then go with the MediaPlayerLauncher. This will also give you the standard look and feel and UX that your users will be familiar with.
如果您不想创建自己的播放器,请查看 Microsoft 媒体平台:播放器框架。该项目有带有 UI 控件的内置播放器。然而,该项目旨在播放来自 IIS Smooth Streaming 的流,但您无法尝试播放您的流。如果这种方法失败,那么使用 MediaElement 是一个不错的选择,正如 Matt Lacey 指出的那样。
If you don't want create your own player take a look at Microsoft Media Platform: Player Framework. This project has built-in player with UI controls. However this project is designed to play streams from IIS Smooth Streaming, but you cant try to play your streams. If this approach fail, then using MediaElement is good option as Matt Lacey noted.