为什么我的音频在背景中播放不是吗?
-
20-12-2019 - |
题
我正在使用这个页面,让我的音频跳过页面。
<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>
.
这就是我的应用程序清单的样子。
解决方案
您所指的页面仅适用于Windows Store应用程序,而不是Windows Phone 8.1。
对于Windows Phone 8.1,事情似乎更复杂,因为您必须实现后台任务,如此处所述:概述:背景音频(Windows Phone Store应用程序)
不隶属于 StackOverflow