Line data Source code
1 : /// Configuration options for Google Cast functionality.
2 : class GoogleCastOptions {
3 : /// Whether physical volume buttons will control device volume.
4 : final bool physicalVolumeButtonsWillControlDeviceVolume;
5 :
6 : /// Whether to disable discovery autostart.
7 : final bool disableDiscoveryAutostart;
8 :
9 : /// Whether to disable analytics logging.
10 : final bool disableAnalyticsLogging;
11 :
12 : /// Whether to suspend sessions when backgrounded.
13 : final bool suspendSessionsWhenBackgrounded;
14 :
15 : /// Whether to stop receiver application when ending session.
16 : final bool stopReceiverApplicationWhenEndingSession;
17 :
18 : /// Whether to start discovery after first tap on cast button.
19 : final bool startDiscoveryAfterFirstTapOnCastButton;
20 :
21 : /// Creates a new [GoogleCastOptions] instance.
22 2 : GoogleCastOptions({
23 : this.physicalVolumeButtonsWillControlDeviceVolume = true,
24 : this.disableDiscoveryAutostart = false,
25 : this.disableAnalyticsLogging = false,
26 : this.suspendSessionsWhenBackgrounded = true,
27 : this.stopReceiverApplicationWhenEndingSession = false,
28 : this.startDiscoveryAfterFirstTapOnCastButton = true,
29 : });
30 :
31 : /// Converts this options object to a map representation.
32 2 : Map<String, dynamic> toMap() {
33 2 : return {
34 : 'physicalVolumeButtonsWillControlDeviceVolume':
35 2 : physicalVolumeButtonsWillControlDeviceVolume,
36 2 : 'disableDiscoveryAutostart': disableDiscoveryAutostart,
37 2 : 'disableAnalyticsLogging': disableAnalyticsLogging,
38 2 : 'suspendSessionsWhenBackgrounded': suspendSessionsWhenBackgrounded,
39 : 'stopReceiverApplicationWhenEndingSession':
40 2 : stopReceiverApplicationWhenEndingSession,
41 : 'startDiscoveryAfterFirstTapOnCastButton':
42 2 : startDiscoveryAfterFirstTapOnCastButton,
43 : };
44 : }
45 : }
|