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 23, 2017, 1:27 AM
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, 8:35 AM
Thank you for sharing. And how to RECORD http streaming for example mp3 format, if you would to share here.
Asfend YarPosted Feb 29, 2016, 3:51 AM
thanks
Asfend YarPosted Feb 14, 2016, 5:01 AM
share the snapshots please
Ibrahim ErsoyPosted Jan 28, 2016, 11:23 AM
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, 7:52 AM
please provide code
Ayyaz AhmadPosted Dec 5, 2015, 3:58 AM
code doesn't work i am using a dailymotion vido link but program always always go in else section
Harshad PansuriyaPosted Dec 1, 2015, 11:34 PM
Nice one
Santhakumar MunuswamyPosted Dec 1, 2015, 11:13 AM
Nice share
Mukesh KumarPosted Dec 1, 2015, 8:42 AM
Nice Share