Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MediaPlayer muted when directly called from background task #1067

justcoding121 opened this issue Mar 4, 2019 · 2 comments


Copy link

commented Mar 4, 2019

I am working on a alarm clock app that will play a music playlist using MediaPlayer upon the display of alarm toast (by listening for ToastHistoryChangedType.Added event in background task). The problem is that audio is muted even when Background Media Playback capability is enabled. Background audio only works when app is launched first in foreground before switching to background. This is not an issue in android and iOS, since both of them let users play audio from background tasks with user permission. But this is a roadblock for development in Uwp.

I tried it to find a workaround by using ToastAudio. Even though the toast audio documentation says that it will accept audio file located in ms-appdata:///, it does not work (it keeps playing default sound). ToastAudio only lets us to play custom audio located in ms-appx:///, but anything there has to be packaged with the application.

I request to loosen up the security here. A genuine app won't do an audio spam from background, and if it does, users will certainly not install it in first place and its review will be terrible.


This comment has been minimized.

Copy link

commented Mar 4, 2019

This is just the samples repo. We can't do anything about OS feature requests. Please use the Feedback Hub to submit OS feedback.

@oldnewthing oldnewthing closed this Mar 4, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.