HLS Play (m3u8 playlist) on Windows Phone 8.1

My friend and I tried to connect a video player on Windows Phone 8.1 to the m3u8 stream, but we were not successful.

What we tried:

We tried to use playerframework.codeplex.com (Microsoft Player Framework), but the file could not be downloaded.

We also tried using Windows Phone Streaming Media ( https://phonesm.codeplex.com/ ), but we could not use as much as we could. 'Do their documentation on how we really should have downloaded the file make sense?

Is there anyone who has worked with such files before? I understand that m3u8 is not supported by Windows Phone 8.1

+3
c # windows-phone-8 hls
source share
3 answers

Download the player frame, use the following DLLs:

DLL's to consume

Add a player to your xaml:

xmlns:mmppf="using:Microsoft.PlayerFramework" xmlns:smmedia="using:SM.Media.MediaPlayer" <mmppf:MediaPlayer IsFullScreenVisible="True" IsFullScreenEnabled="True" IsFullScreen="False" CurrentStateChanged="mPlayer_CurrentStateChanged" x:Name="mPlayer" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" IsFastForwardEnabled="False" IsInfoEnabled="False" IsLive="True" IsMoreEnabled="False" IsRewindEnabled="False" IsRightTapEnabled="False" IsScrubbingEnabled="False" IsSeekEnabled="False" IsSkipBackEnabled="False" IsSkipAheadEnabled="False" IsReplayEnabled="False" IsTimelineVisible="False" IsTimeElapsedVisible="False" IsTimeRemainingVisible="False" RequestedTheme="Dark"> <mmppf:MediaPlayer.Plugins> <smmedia:StreamingMediaPlugin /> </mmppf:MediaPlayer.Plugins> </mmppf:MediaPlayer> 

Then set the VIA - or XAML stream code if the URL has not changed.

+4
source share

@Mahesh Vemuri asked that if he has a bug that says StreamingMediaPlugin is not available or not found in the namespace, here is my work: XAML:

 xmlns:PlayerFramework="using:Microsoft.PlayerFramework" <PlayerFramework:MediaPlayer Name="player" Source="http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8" AudioCategory="BackgroundCapableMedia" IsAudioSelectionVisible="True"> <PlayerFramework:MediaPlayer.Plugins> </PlayerFramework:MediaPlayer.Plugins> </PlayerFramework:MediaPlayer> 

And in your .xaml.cs file you just do this:

 SM.Media.MediaPlayer.StreamingMediaPlugin asd = new SM.Media.MediaPlayer.StreamingMediaPlugin(); player.Plugins.Add(asd); player.Source = new Uri("address-to-m3u8"); 

This worked for me, as the "default" did not. Hope this helps someone else too.

+2
source share

you can add them from xaml or cs. Add the link first.

  • Xaml

     xmlns:local="clr-namespace:Microsoft.PlayerFramework;assembly=Microsoft.PlayerFramework" xmlns:smmedia="clr-namespace:SM.Media.MediaPlayer;assembly=SM.Media.MediaPlayer.WP8" <local:MediaPlayer Name="player" HorizontalContentAlignment="Stretch" AutoPlay="True" Volume="0.7" Source="http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8" IsPlayPauseVisible="True"> <local:MediaPlayer.Plugins> <smmedia:StreamingMediaPlugin /> </local:MediaPlayer.Plugins> </local:MediaPlayer> 
  • XAML and CS

     xmlns:local="clr-namespace:Microsoft.PlayerFramework;assembly=Microsoft.PlayerFramework" <local:MediaPlayer Name="player" HorizontalContentAlignment="Stretch" AutoPlay="True" Volume="0.7" IsPlayPauseVisible="True"> </local:MediaPlayer> SM.Media.MediaPlayer.StreamingMediaPlugin asd = new SM.Media.MediaPlayer.StreamingMediaPlugin(); player.Plugins.Add(asd); player.Source = new Uri("http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8"); 
0
source share

All Articles