Microsoft finally released live streaming API supports in UWP Windows 10. Before that we need third party API Windows Phone Streaming Media Assistance. But it will arrive in UWP.
Windows.Media.Streaming.Adaptive namespace:It helps to play over live http media streaming.
This namespace definition support many kinds of different adaptive streaming protocols, such as Http Live Streaming or HLS is a protocol for streaming media content that is segmented into several small files, each of them in different sizes and qualities to enable the content disseminating an adaptive rate depending on the quality of the connection.
This returns AdaptiveMediaSourceCreationResult which includes the source and whether the manifest was able to be downloaded or what error occurred. Remember that you enabled the InternetClient capability in your appxmanifest file.
Now see the steps how it works.
Create new Windows 10 project and go to MainPage.xaml page design view to design.
Add Media control to play the streamed videos and use the following code to design media control:
- <Grid>
- <MediaElement x:Name="liveMedia" />
- </Grid>
- <Page.BottomAppBar>
- <AppBar IsOpen="True">
- <StackPanel Orientation="Horizontal">
- <AppBarButton Name="playBtn" Click="playBtn_Click" Icon="Play" Label="Play"></AppBarButton>
- <AppBarButton Name="pausBtn" Click="pausBtn_Click" Icon="Pause" Label="Pause"></AppBarButton>
- </StackPanel>
- </AppBar>
- </Page.BottomAppBar>
- var streamUri = new Uri(""); //replace your URL
- var streamResponse = await AdaptiveMediaSource.CreateFromUriAsync(streamUri);
- if (streamResponse.Status == AdaptiveMediaSourceCreationStatus.Success)
- liveMedia.SetMediaStreamSource(streamResponse.MediaSource);
- else
- {
- //not found
- }
By default it will start playing the stream. If you want to pause write the following code:
- private void pausBtn_Click(object sender, RoutedEventArgs e)
- {
- liveMedia.Pause();
- }
- private void playBtn_Click(object sender, RoutedEventArgs e)
- {
- liveMedia.Play();
- }
Now run the app and check the output like the following video. Here I am going to stream the live news channel.


Carlos SanchezPosted Dec 22, 2017, 8:27 PM EST
Why is there an "HttpStream.zip" link at the top of this article? It's spam. It's an mp4 video that begins as if you were going to show the code being programmed live, and then it turns in some kind of weird global warming indian propaganda. And also, why do you assume the readers know what this means? -> "Remember that you enabled the InternetClient capability in your appxmanifest file. "
aaron aaronPosted Jun 30, 2016, 4:35 AM EDT
Thank you for sharing. And how to RECORD http streaming for example mp3 format, if you would to share here.
Asfend YarPosted Feb 28, 2016, 10:51 PM EST
thanks
Asfend YarPosted Feb 14, 2016, 12:01 AM EST
share the snapshots please
Ibrahim ErsoyPosted Jan 28, 2016, 6:23 AM EST
Tried the code but failed playing.Gave me that error: "Requested Windows Runtime type 'Windows.Media.Streaming.Adaptive.AdaptiveMediaSource' is not registered"... Any ideas?
Ayyaz AhmadPosted Dec 19, 2015, 2:52 AM EST
please provide code
Ayyaz AhmadPosted Dec 4, 2015, 10:58 PM EST
code doesn't work i am using a dailymotion vido link but program always always go in else section
Harshad PansuriyaPosted Dec 1, 2015, 6:34 PM EST
Nice one
Santhakumar MunuswamyPosted Dec 1, 2015, 6:13 AM EST
Nice share
Mukesh KumarPosted Dec 1, 2015, 3:42 AM EST
Nice Share