freedome_client
Это содержимое пока не доступно на вашем языке.
Pure-Dart client of the Freedome public API v1 (VM, Flutter, web). It talks to a Freedome media server; models come from
freedome_protocol, which is re-exported.
FreedomeClient: REST plus realtime (plain WebSocketfreedome.v1by default, GraphQL over WebSocket, socket.io opt-in);- connection state machine with reconnect and resync, offline cache and outbox;
- credentials: guest, password, pairing, API key, cloud;
- repositories: venues, engine, calibration, playback, content (resumable uploads), OSC, audio (zones, devices, presets, sessions, generator), audio-reactive scenes and live analysis, gateways;
- codecs:
.dome, FDMESH warp meshes,.zelim,.boranko,.comics; - discovery and pairing links.
Entry points
Section titled “Entry points”| Import | Content |
|---|---|
package:freedome_client/freedome_client.dart |
client, repositories, codecs (every platform) |
package:freedome_client/io.dart |
file helpers, mDNS discovery (not on web) |
package:freedome_client/account.dart |
account API of the cloud (FreedomeAccountClient) |
package:freedome_client/socket_io.dart |
socket.io realtime transport (opt-in) |
package:freedome_client/testing.dart |
FakeDomeServer, FakeAccountServer for your tests |
Example
Section titled “Example”import 'dart:io';
import 'package:freedome_client/freedome_client.dart';
Future<void> main() async { final client = FreedomeClient( endpoint: FreedomeEndpoint.parse('http://dome.local:8080'), credentials: const PasswordCredentials('operator', 'secret'), ); await client.open(); final sub = client.playback.states.listen((s) => stdout.writeln(s)); await client.playback.play(const PlayTarget.show('night-sky')); await Future<void>.delayed(const Duration(seconds: 5)); await client.playback.stop(); await sub.cancel(); await client.close();}Live control (play, faders, generator) fails fast with OfflineException while the server cannot be reached and is
never queued. Other writes can be queued through an OutboxStore.
Testing your app
Section titled “Testing your app”FakeDomeServer runs the whole contract in memory, with injected faults (latency, failNext, dropRealtime, seqGap,
bumpApiMajor, …), so the same code runs in unit and widget tests without sockets:
final fake = FakeDomeServer();final client = FreedomeClient(endpoint: fake.endpoint, transports: fake.transports);Flutter apps: freedome_flutter adds secure token storage, Bonjour discovery and lifecycle hooks.
Administration: freedome_admin.
Licence
Section titled “Licence”NativeMindNONC (see LICENSE). Commercial use requires a licence from NativeMind sales:
https://freedome.nativemind.us/commercial.