如何使用“平滑流媒体"元素播放视频 [英] How to play videos using Smooth Streaming media element
问题描述
我想在Windows Phone应用程序中流式传输视频文件.经过研究,我相信平滑的流式媒体元素可以做到这一点.但是当我将SmoothStreamingSource分配给" http://www.streaming/video.mp4 "时,播放器会执行不显示任何视频.但是,当我将源更改为.ism文件时,它会缓冲并且正在播放视频.但是我只会从我的Web服务中获取视频UTL.请帮助我如何在WP应用程序中执行此操作.
I want to stream a video file in my windows phone application.. After i have researched, the smooth streaming media element would do this, I believe. but when im assigning the SmoothStreamingSource to "http://www.streaming/video.mp4" the player does not show any video. But when i change the source to an .ism file it buffered and the video was playing. but I will only the video UTL from my web service. Pls help me in how to do this im WP apps.
这是我的代码:
使用效果很好的.ism文件:
Using .ism file which works good:
SSME:SmoothStreamingMediaElement AutoPlay ="True" x:Name ="SmoothPlayer"
SSME:SmoothStreamingMediaElement AutoPlay="True" x:Name="SmoothPlayer"
SmoothStreamingSource ="http://iismp-demo/adaptive/big_buck_bunny/Big%20Buck%20Bunny%20Adaptive.ism/Manifest"/>
SmoothStreamingSource="http://iismp-demo/adaptive/big_buck_bunny/Big%20Buck%20Bunny%20Adaptive.ism/Manifest" />
但是当我将流源更改为上述mp4文件时.视频无法播放.谢谢.
but when i change the stream source to a above mentioned mp4 file. the video is not playing. thanks in adavance.
推荐答案
使用以下代码:
<SSME:SmoothStreamingMediaElement
AutoPlay="True"
x:Name="SmoothPlayer"
Source="<your URL>"
/>
使用Source而不是SmoothStreamingSource. Source属性获取或设置不是平滑流媒体源的媒体流源.
Use the Source instead of the SmoothStreamingSource. The Source attribute gets or sets a media stream source that is not a Smooth Streaming source.
这篇关于如何使用“平滑流媒体"元素播放视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!