내 오디오가 백그라운드에서 재생되지 않는 이유는 무엇입니까?
-
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>
이것이 내 앱 매니페스트의 모습입니다.
하지만 앱을 배경으로 설정하면 오디오 재생이 중지됩니다.내가 보기엔 모든 게 여기서 언급한 내 앱에 있습니다
(그만큼 MediaPlayer
요소는 SystemMediaTransportControls
)
해결책
말씀하신 페이지는 Windows Phone 8.1이 아닌 Windows Store 앱에만 적용됩니다.
Windows Phone 8.1의 경우 여기에 설명된 대로 백그라운드 작업을 구현해야 하므로 상황이 더 복잡해 보입니다. 개요:배경 오디오(Windows Phone 스토어 앱)
제휴하지 않습니다 StackOverflow