snapdart 0.1.4 snapdart: ^0.1.4 copied to clipboard
Snapcast control client and player for Dart and is using the Snapcast JSON-RPC API to control Snapcast
import 'package:snapdart/snapdart.dart';
import 'SnapcastClient.dart';
void main() {
demo();
}
void demo() async {
RemoteControl remoteControl = RemoteControl();
SnapcastClient snapcastClient = SnapcastClient();
await remoteControl.start('192.168.1.117');
remoteControl.addListener(snapcastClient);
//remoteControl.removeStream("Spotify");
//remoteControl.removeStream("Jack");
//remoteControl.addStream("pipe:///tmp/bluesnapfifo?name=Bluetooth");
//remoteControl
// .addStream("pipe:///tmp/snap_jack?name=Jack&sampleformat=44100:16:2");
//remoteControl
// .addStream("pipe:///tmp/spotify?name=Spotify&sampleformat=44100:16:2");
remoteControl.getServerStatus();
}