0

我希望我的应用程序播放(.m3u8) Live Streaming,我找到了这个例子 http://archive.msdn.microsoft.com/SmoothStreaming/Release/ProjectReleases.aspx?ReleaseId=3867

它适用于其他链接,但如果我尝试我的 .m3u8 链接它不起作用。有没有一种特定的方法可以在 Windows Phone 中播放这种类型的流媒体?

     public MainPage()
{

        InitializeComponent();
        SupportedOrientations = SupportedPageOrientation.Landscape;
        Loaded += new RoutedEventHandler(MainPage_Loaded);
        phoneApplicationPage.ManipulationStarted += new EventHandler<ManipulationStartedEventArgs>(phoneApplicationPage_ManipulationStarted);
        phoneApplicationPage.ManipulationCompleted += new EventHandler<ManipulationCompletedEventArgs>(phoneApplicationPage_ManipulationCompleted);
        seekbar.MouseLeftButtonUp += new MouseButtonEventHandler(seekbar_MouseLeftButtonUp);

        List<Content> Contents = new List<Content>();
        Contents.Add(new Content("Media One", new Uri("http://fl1.viastreaming.net/iqraatv2/livestream/playlist.m3u8")));
        Contents.Add(new Content("Media Two", new Uri("http://Media_Two.ism/manifest")));
    Contents.Add(new Content("Media Three", new Uri("http://Media_Three.ism/manifest")));
        Contents.Add(new Content("Media Four", new Uri("http://Media_Four.ism/manifest")));

        comboBoxUrls.ItemsSource = Contents;
        comboBoxUrls.SelectedIndex = 0;
        comboBoxUrls.SelectionChanged += new SelectionChangedEventHandler(comboBoxUrls_SelectionChanged);
   }
4

2 回答 2

0

可以从 CodePlex 看一下这个项目,它正在与 Windows Phone 7 和 Windows Phone 8 的 HLS (m3u8) 一起使用!

Windows Phone 流媒体

于 2013-04-11T22:05:54.850 回答
0

这非常有效。在 Windows Phone 8.1 上播放 HLS(m3u8 播放列表) 下载播放器框架,使用以下 DLL:

要消耗的 DLL

将播放器添加到您的 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>

然后设置您的流 VIA 代码 - 如果 URL 永远不会更改,则设置 XAML。

于 2015-03-04T11:25:27.590 回答