我用这个页面来保持我的音频在页面间播放。
<Page
x:Class="MyApp.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:MyApp"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:mmppf="using:Microsoft.PlayerFramework"
mc:Ignorable="d"
>
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<mmppf:MediaPlayer x:Name="player" AutoPlay="True" AudioCategory="BackgroundCapableMedia" />
<Frame x:Name="rootFrame"/>
</Grid>
</Page>这就是我的的样子。

但一旦我的应用程序的背景,音频停止播放。据我所见,我的应用程序中包含了所有的这里提到的。
( MediaPlayer元素应该负责SystemMediaTransportControls)
发布于 2014-07-29 14:11:10
您所指的页面仅适用于Windows应用程序,而不适用于Windows 8.1。
对于Windows 8.1,事情似乎更复杂,因为您必须实现一个后台任务,如下所述:概述:背景音频(Windows应用程序)
https://stackoverflow.com/questions/25008591
复制相似问题