I don't know what smooth streaming is. See the previous article: http://www.cnblogs.com/sun8134/archive/2012/05/14/2499296.html
How to play smooth streaming in the Win8 style app
First, two things are required:
Player framework for Windows 8: http://playerframework.codeplex.com/releases
Smooth streaming client SDK: http://visualstudiogallery.msdn.microsoft.com/04423d13-3b3e-4741-a01c-1ae29e84fea6? Src = home
Then we create a new project:
Add reference:
Add the following in the XAML header on the page:
xmlns:adaptive="using:Microsoft.PlayerFramework.Adaptive" xmlns:mmppf="using:Microsoft.PlayerFramework"
Then add:
<mmppf:MediaPlayer Source="http://mediadl.microsoft.com/mediadl/iisnet/smoothmedia/Experience/BigBuckBunny_720p.ism/Manifest"> <mmppf:MediaPlayer.Plugins> <adaptive:AdaptivePlugin /> </mmppf:MediaPlayer.Plugins> </mmppf:MediaPlayer>
Next, modify the debugging settings. Because Microsoft Visual C ++ runtime package is used, an error is reported when any CPU is set.
You need to set it based on your own machine (My x64)
Here the basic operation is complete. Run the command to see the effect:
Of course, if you want to control the playback in codebehind:
private void Page_Loaded(object sender, RoutedEventArgs e) { MediaPlayer player = new MediaPlayer(); Grid1.Children.Add(player); player.Source = new Uri("http://127.0.0.1/Tom.Clancys.Ghost.Recon.Alpha.2012.ism/manifest"); var adaptivePlugin = new Microsoft.PlayerFramework.Adaptive.AdaptivePlugin(); player.Plugins.Add(adaptivePlugin); player.Play(); }
For more information, see the document: http://playerframework.codeplex.com/documentation