简体   繁体   English

如何在Windows Phone 8中播放mp4媒体

[英]How to Play mp4 Media in Windows Phone 8

I'm on windows phone project. 我在Windows Phone项目上。 On this project, I get the mp4 videos on my application by using my web service. 在这个项目中,我通过使用Web服务在应用程序上获得了mp4视频。 I want to play this media on device like here; 我想在这样的设备上播放此媒体;

http://www.windowsphone.com/tr-tr/store/app/goller-cepte/522e5324-15b1-4ef5-82a2-340aaa781087 http://www.windowsphone.com/tr-tr/store/app/goller-cepte/522e5324-15b1-4ef5-82a2-340aaa781087

You see the 7th picture. 您会看到第七张图片。 I want to play my media like there. 我想在那里播放我的媒体。

I made a structure to play media like this but i did not like that and it is not healthy choice to play media. 我设计了一种播放媒体的结构,但我不喜欢那样,播放媒体也不是健康的选择。

<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0" Background="White" DataContext="{Binding Video}">
            <MediaElement x:Name="VideoPlayer" AutoPlay="False" IsMuted="False" Stretch="UniformToFill" Margin="10,82,10,307" MediaOpened="VideoPlayerMediaOpened" />
            <TextBlock HorizontalAlignment="Left" Foreground="Black" Margin="10,10,0,0" TextWrapping="Wrap" Text="{Binding video_baslik}" VerticalAlignment="Top" Height="67" Width="436"/>
            <TextBlock HorizontalAlignment="Left" Foreground="Black" Margin="0,516,0,0" TextWrapping="Wrap" Text="{Binding video_spot}" VerticalAlignment="Top" Height="170" Width="456"/>
            <Slider x:Name="MediaProgress" Margin="0,394,0,217" Maximum="1" LargeChange="0.1" ValueChanged="MediaProgressValueChanged"/>
            <TextBlock x:Name="ElapsedTime" Foreground="Black" HorizontalAlignment="Left" Margin="10,468,0,0" TextWrapping="Wrap" Text="00:00" VerticalAlignment="Top" Width="60" Height="30" IsHitTestVisible="False"/>
            <TextBlock x:Name="RemainingTime" Foreground="Black" HorizontalAlignment="Right" Margin="0,472,10,0" TextWrapping="Wrap" Text="00:00" VerticalAlignment="Top" Width="60" Height="30" IsHitTestVisible="False"/>
        </Grid>

Can anyone help me to play media like the link 7th picture ? 有人可以帮我播放链接第七张图片之类的媒体吗?

Thank you too much. 太谢谢你了

I think tey use the Media Player launcher. 我认为您可以使用Media Player启动器。 You just pass it your video URL and it takes care of everything else, including the UI. 您只需将视频URL传递给它,它就可以处理其他所有事情,包括用户界面。 More info at http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh394004(v=vs.105).aspx 有关更多信息,请访问http://msdn.microsoft.com/zh-cn/library/windowsphone/develop/hh394004(v=vs.105).aspx

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM