anni_mpris_service

Creator: coderz1093

Last updated:

0 purchases

anni_mpris_service Image
anni_mpris_service Images

Languages

Categories

Add to Cart

Description:

anni mpris service

anni_mpris_service #
D-Bus MPRIS controls for Linux.
Example #
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<void> onPlayPause() async {
print("onPlayPause");
}

@override
Future<void> onPlay() async {
print("onPlay");
await player.play();
}

@override
Future<void> onPause() async {
print("onPause");
}

@override
Future<void> onPrevious() async {
print("onPrevious");
}

@override
Future<void> onNext() async {
print("onNext");
}

@override
Future<void> onSeek(int offset) async {
print("onSeek");
}

@override
Future<void> onSetPosition(String trackId, int position) async {
print("onSetPosition");
}

@override
Future<void> onLoopStatus(LoopStatus loopStatus) async {
print("onLoopStatus");
this.loopStatus = loopStatus;
}

@override
Future<void> onShuffle(bool shuffle) async {
print("onShuffle");
this.shuffle = shuffle;
}
}
copied to clipboard
License #
Licensed under either of

Apache License, Version 2.0 (LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0)
MIT license (LICENSE-MIT or https://opensource.org/licenses/MIT)

at your option.

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.