Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
711 views
in Technique[技术] by (71.8m points)

c# - Playing HLS (m3u8 playlist) on Windows Phone 8.1

A friend and I have tried to get the video player on Windows Phone 8.1 to play a m3u8 stream, but we've been unavailable to succeed.

What we've tried:

We've tried with playerframework.codeplex.com (Microsoft Player Framework), but it was unable to load the file.

We also tried with Windows Phone Streaming Media (https://phonesm.codeplex.com/), but we were unable to as much as use this one as we couldn't make sense of their documentation on how we actually had to load the file?

Is there anybody who have worked with this kind of files before? I understand that m3u8 is not natively supported by Windows Phone 8.1

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Download the player framework, consume the following DLL's:

DLL's to consume

Add the 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 your stream VIA code - or XAML if the URL never changes.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...