Headset audio and text-to-speech support for Conreality live-action games.
Android (5.0+). (iOS support is planned.)
-
Determines whether a wired or wireless headset is currently connected.
-
Provides headset events including connect/disconnect status notifications.
-
Supports speech synthesis (text-to-speech) when a headset is connected.
-
Bluetooth headsets supporting the Headset Profile (HSP) and/or Hands-Free Profile (HFP)
-
Wired headphones connected to the headphone jack
import 'package:conreality_headset/conreality_headset.dart';
var ok = await Headset.isConnected;
print("Headset is " + (ok ? "connected" : "NOT connected"));
Stream<HeadsetEvent> stream = await Headset.subscribe();
stream.listen((HeadsetEvent event) {
print(event);
});
await Headset.speak("Hello, world!");
dependencies:
# See: https://pub.dev/packages/conreality_headset
conreality_headset: ^0.2.0
dependencies:
# See: https://github.com/conreality/conreality-plugins/tree/master/conreality_headset
conreality_headset:
git:
url: https://github.com/conreality/conreality-plugins.git
path: conreality_headset
Follow @ConrealityCode and @ConrealityGame on Twitter for project updates.