다음을 통해 공유


Getting Started for building a smooth streaming client

There are two types of developments for building a Smooth Streaming Client:

  • IIS Smooth Streaming Client 1.5 APIs : developers could utilize these APIs to build applications on Silverlight platform (runs on desktop,Xbox or Windows phone). These APIs is formally known as "Smooth Streaming Player Development Kit
  • Microsoft Media Platform - Player Framework v2.6 : a open source framework. It includes sample player and numbers of plugins for developers to get quick started. And MMPPF is based on IIS Smooth Streaming Client APIs. 

This blog is for developers who want to build media player based on IIS Smooth Streaming Client APIs, instead of utilizing the framework. 

Pre-request: 

Now we will build a Smooth Streaming Client step by step:

1. Open Visual Studio. Select New Project... and Select Siverlight Application under Visual C# section. I choose PlayerDemo1 as the project name. 

2. Choose Host the Silverlight application in a new Web site.

 

3.  Now you could see two projects are generated in Solution Explorer. PlayDemo1 is the Silverlight application with XAML files. And PlayerDemo1.Web is a web application project with HTML page, which contain the Silverlight component you built in PlayerDemo1. If you build this application now, you will see a PlayerDemo1.xap get generated in ClientBin under PlayerDemo1.Web project. 

4. Right click on References fold under PlayerDemo1 project, choose Add Reference...

5. When you install Smooth Streaming APIs, the APIs are resided at /%SystemDrive%/Program Files(x86)/Microsoft SDKs/IIS Smooth Streaming Client/v1.5/Silverlight. And choose Microsoft.Web.Media.SmoothStreaming.dll. 

6. Add namespace in MainPage.xaml under PlayerDemo1 project.  

 xmlns:SSME="clr-namespace:Microsoft.Web.Media.SmoothStreaming;assembly=Microsoft.Web.Media.SmoothStreaming" 

7. Add XAML for the media player and the whole MainPage.xaml should look like this:

 <UserControl x:Class="PlayerDemo1.MainPage"
 xmlns="https://schemas.microsoft.com/winfx/2006/xaml/presentation"
 xmlns:x="https://schemas.microsoft.com/winfx/2006/xaml"
 xmlns:d="https://schemas.microsoft.com/expression/blend/2008"
 xmlns:mc="https://schemas.openxmlformats.org/markup-compatibility/2006"
 xmlns:SSME="clr-namespace:Microsoft.Web.Media.SmoothStreaming;assembly=Microsoft.Web.Media.SmoothStreaming" 
 mc:Ignorable="d"
 d:DesignHeight="640" d:DesignWidth="480">
 
 <Grid x:Name="LayoutRoot">
 <SSME:SmoothStreamingMediaElement AutoPlay="True" x:Name="SmoothPlayer" SmoothStreamingSource="https://streams.smooth.vertigo.com/elephantsdream/Elephants_Dream_1024-h264-st-aac.ism/manifest" Grid.Row="0" />
 </Grid>
 </UserControl>

8. Lastly, press F5 and you will compile the project and see a simple smooth streaming client. 

Some useful links:

  • Smooth Streaming Deployment Guide (Comprehensive and useful): prepare your own media source, config Smooth Streaming Server and deploy media onto your server
  • IIS Smooth Streaming HD Sample Guide: it provides two media sources in streaming format so you don't need to use Encoder to prepare your media
  • [Blog]Getting started with IIS Smooth Streaming: Step by Step showing you how to set up a sample Smooth Streaming

Comments

  • Anonymous
    May 01, 2012
    Thanks for the instructions. I  used these to build a basic Smooth app that works on the PC as well as something along the same lines for a WP7 with minor tweaks to get it working on the WP7 emulator. I'm looking to do the same for Xbox, but have no idea where to get started. You say that the Smooth Client APIs will run on the Xbox, but how do I get the SL application in there? I dont see Silverlight as part of the XNA except for Windows Phone 7 in Visual Studio. Any ideas? Thanks in advance.

  • Anonymous
    May 31, 2012
    Hi Ram, Smooth Streaming sdk for Xbox is inside XBox development Kit, which you could be able to download here: http://create.msdn.com/en-US/.

  • Anonymous
    February 13, 2014
    how can we use smooth streaming SDK in MMPPF can I have sample for it