Reputation: 188
I want to render the UI of Jellyfin in an UWP WebView, this works already fine.
But everytime I minimize the App the currently playing music or video sound stops playing to my speakers. After maximizing, time has elapsed and the sound is output again.
So is there an option to let run the webview even when the App is minimized?
Upvotes: 2
Views: 371
Reputation: 342
It is possible to have the WebView continue to play audio when minimised. Further down in the docs are instructions for enabling it. Essentially, you call:
SystemMediaTransportControls.GetForCurrentView().IsPlayEnabled = true;
SystemMediaTransportControls.GetForCurrentView().IsPauseEnabled = true;
The docs indicate you should also handle the buttonPressed event, but I've found that simply setting the above two fields, along with enabling background audio in the manifest makes it work.
Upvotes: 2
Reputation: 32775
Is there a possibility to run a UWP WebView in minimized App, inclusive sound output?
I'm afraid you can't play the audio background with WebView control. Currently UWP WebView does not support background playback. so the player will be paused when minimized the app. And we suggest you background media playback with SMTC and enable Background Media PlayBack capability, For more info please refer this document.
Upvotes: 1