Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ProjectAnni/mpris_service
D-Bus MPRIS controls for Linux.
https://github.com/ProjectAnni/mpris_service
Last synced: 3 months ago
JSON representation
D-Bus MPRIS controls for Linux.
- Host: GitHub
- URL: https://github.com/ProjectAnni/mpris_service
- Owner: ProjectAnni
- License: apache-2.0
- Created: 2022-07-16T15:08:12.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-09-06T15:27:58.000Z (about 2 years ago)
- Last Synced: 2024-07-22T23:48:32.281Z (4 months ago)
- Language: Dart
- Size: 58.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-flutter-desktop - anni_mpris_service - D-Bus MPRIS controls for Linux. (Packages)
README
# anni_mpris_service
D-Bus MPRIS controls for Linux.
## Example
```dart
class MyMPRISService extends MPRISService {
MyMPRISService()
: super(
"identifier_string",
identity: "Application Name",
emitSeekedSignal: true,
canPlay: true,
canPause: true,
canGoPrevious: true,
canGoNext: true,
canSeek: true,
supportLoopStatus: true,
supportShuffle: true,
);@override
Future onPlayPause() async {
print("onPlayPause");
}@override
Future onPlay() async {
print("onPlay");
await player.play();
}@override
Future onPause() async {
print("onPause");
}@override
Future onPrevious() async {
print("onPrevious");
}@override
Future onNext() async {
print("onNext");
}@override
Future onSeek(int offset) async {
print("onSeek");
}@override
Future onSetPosition(String trackId, int position) async {
print("onSetPosition");
}@override
Future onLoopStatus(LoopStatus loopStatus) async {
print("onLoopStatus");
this.loopStatus = loopStatus;
}@override
Future onShuffle(bool shuffle) async {
print("onShuffle");
this.shuffle = shuffle;
}
}
```## License
Licensed under either of
- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE) or )
- MIT license ([LICENSE-MIT](LICENSE-MIT) or )at your option.