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

How to set property? #6

Closed
khaled-0 opened this issue Oct 30, 2024 · 1 comment
Closed

How to set property? #6

khaled-0 opened this issue Oct 30, 2024 · 1 comment

Comments

@khaled-0
Copy link
Contributor

khaled-0 commented Oct 30, 2024

e.g how to update CanQuit to be true

@bdrazhzhov
Copy link
Owner

Hi @khaled-0,

As you can find in the plugin description most of the properties have default values or aren't supported currently.
But if you need to be able to change properties values you need to change the source code of the plugin. A small example how it can be done you'll find here:

@override
Future<void> setState(SetStateRequest request) async {
_mpris.position = request.state.updatePosition;
_isPlaying = request.state.playing;
_mpris.playbackState = _isPlaying ? 'Playing' : 'Paused';
}

If you have ideas how to implement properties fork this repo and create pull request with your changes allowing to do what you want.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants