How to play videos using Smooth Streaming media el

2019-06-07 00:54发布

问题:

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.

Here is my code:

Using .ism file which works good:

SSME:SmoothStreamingMediaElement AutoPlay="True" x:Name="SmoothPlayer"

SmoothStreamingSource="http://iismp-demo/adaptive/big_buck_bunny/Big%20Buck%20Bunny%20Adaptive.ism/Manifest" />

but when i change the stream source to a above mentioned mp4 file. the video is not playing. thanks in adavance.

回答1:

Use the following code:

   <SSME:SmoothStreamingMediaElement 
         AutoPlay="True"
         x:Name="SmoothPlayer" 
         Source="<your URL>" 
   />

Use the Source instead of the SmoothStreamingSource. The Source attribute gets or sets a media stream source that is not a Smooth Streaming source.