-
Notifications
You must be signed in to change notification settings - Fork 25
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
Playback screen on the lockscreen does not go away #16
Comments
Looks like I haven't processed it properly yet. Because when I test it now, the screen is gone. Please test on real device |
Unfortunately it does not work on a real device. When I stop the player it stays on the lock screen. No idea how I can fix this |
Is this still a problem? And is it a problem using a native Android app or using a web app on Android? |
What does your implementation look like? Wrapping |
This is how I got this part. updatePlaybackState() {
} |
Try wrapping it in async/await, something like this: async updatePlaybackState() {
const playbackState = this.playbackStopped ? 'none' : (this.audio.paused ? 'paused' : 'playing');
await MediaSession.setPlaybackState({
playbackState: playbackState
});
} |
If I set the playbackstate to none, the screen doesn't go away.
I don't get this 'none' via a listener but via the setting of
this.playbackStopped = true;
And then calling this.updatePlaybackState();
This is the const converted to a function to use it that way.
Otherwise I don't even get the 'none' on the playBackstate
The text was updated successfully, but these errors were encountered: