nicruo
nicruo

Reputation: 516

winrt and uwp webview background audio

Is it possible to keep the audio playing inside a WebView still play when an App is suspended or in background on Windows 10 or Windows Phone 8?

Correctly if in Windows 10, if an App is not focus the webview keeps playing, but in tablet mode if goes to background, the sound is muted.

Thanks in advance.

Upvotes: 1

Views: 610

Answers (1)

Jeffrey Chen
Jeffrey Chen

Reputation: 4680

I’m afraid you cannot play the audio in WebView at background. Similar with Media Element, the audio is played by the app process, when the app is suspended (see App Life Cycle), it will stop playing the audio.

To play the audio at background in Windows Universal Apps, you need to use the BackgroundAudioPlayer, it will start a broker process and the audio will keep playing when the app process is suspended.

Upvotes: 3

Related Questions