@sprucelabs/spruce-heartwood-utils 31.2.8 → 32.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import EventEmitter from 'events';
|
|
2
|
-
import { AudioController, CachedValue, Device, TheaterSettingValueTypes, TheatreSettingName } from '@sprucelabs/heartwood-view-controllers';
|
|
2
|
+
import { AudioController, CachedValue, Device, PowerBehaviorOptions, TheaterSettingValueTypes, TheatreSettingName } from '@sprucelabs/heartwood-view-controllers';
|
|
3
3
|
import { Orientation } from '../types/heartwood.types';
|
|
4
4
|
export declare class HeartwoodDevice extends EventEmitter implements Device {
|
|
5
5
|
static Class?: new (storage: Storage) => Device;
|
|
@@ -27,6 +27,7 @@ export declare class HeartwoodDevice extends EventEmitter implements Device {
|
|
|
27
27
|
setTheatreSetting<N extends TheatreSettingName>(name: N, value: TheaterSettingValueTypes[N]): void;
|
|
28
28
|
getTheatreSetting<N extends TheatreSettingName>(name: N): Promise<TheaterSettingValueTypes[N] | null>;
|
|
29
29
|
onMessage<T>(name: string, timeoutMs?: number): Promise<T | null>;
|
|
30
|
+
setPowerBehavior(options: PowerBehaviorOptions): void;
|
|
30
31
|
}
|
|
31
32
|
export type DeviceOnMessageCallback = (callback: (json: string) => void) => void;
|
|
32
33
|
export type DevicePostMessageCallback = (json: string) => void;
|
|
@@ -123,6 +123,9 @@ class HeartwoodDevice extends events_1.default {
|
|
|
123
123
|
window.AndroidInterface?.onMessage?.(cb);
|
|
124
124
|
});
|
|
125
125
|
}
|
|
126
|
+
setPowerBehavior(options) {
|
|
127
|
+
this.sendCommand('setPowerBehavior', options);
|
|
128
|
+
}
|
|
126
129
|
}
|
|
127
130
|
exports.HeartwoodDevice = HeartwoodDevice;
|
|
128
131
|
//# sourceMappingURL=HeartwoodDevice.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import EventEmitter from 'events';
|
|
2
|
-
import { AudioController, CachedValue, Device, TheaterSettingValueTypes, TheatreSettingName } from '@sprucelabs/heartwood-view-controllers';
|
|
2
|
+
import { AudioController, CachedValue, Device, PowerBehaviorOptions, TheaterSettingValueTypes, TheatreSettingName } from '@sprucelabs/heartwood-view-controllers';
|
|
3
3
|
import { Orientation } from '../types/heartwood.types';
|
|
4
4
|
export declare class HeartwoodDevice extends EventEmitter implements Device {
|
|
5
5
|
static Class?: new (storage: Storage) => Device;
|
|
@@ -27,6 +27,7 @@ export declare class HeartwoodDevice extends EventEmitter implements Device {
|
|
|
27
27
|
setTheatreSetting<N extends TheatreSettingName>(name: N, value: TheaterSettingValueTypes[N]): void;
|
|
28
28
|
getTheatreSetting<N extends TheatreSettingName>(name: N): Promise<TheaterSettingValueTypes[N] | null>;
|
|
29
29
|
onMessage<T>(name: string, timeoutMs?: number): Promise<T | null>;
|
|
30
|
+
setPowerBehavior(options: PowerBehaviorOptions): void;
|
|
30
31
|
}
|
|
31
32
|
export type DeviceOnMessageCallback = (callback: (json: string) => void) => void;
|
|
32
33
|
export type DevicePostMessageCallback = (json: string) => void;
|