senza-sdk 4.4.4-86e7d7a.0 → 4.4.5
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.
- package/dist/bundle.js +1 -1
- package/dist/implementation.bundle.js +2 -0
- package/dist/implementation.bundle.js.LICENSE.txt +82 -0
- package/package.json +8 -7
- package/src/api.js +16 -2
- package/src/implementation/api.js +9 -5
- package/src/implementation/backgroundRenderControl.js +113 -0
- package/src/implementation/deviceManager.js +6 -177
- package/src/implementation/displayManager.js +181 -0
- package/src/implementation/edidParser.js +125 -0
- package/src/implementation/lifecycle.js +42 -17
- package/src/implementation/remotePlayer.js +5 -2
- package/src/interface/api.js +1 -0
- package/src/interface/deviceManager.js +0 -33
- package/src/interface/displayManager.js +126 -0
- package/src/interface/lifecycle.js +18 -1
- package/src/interface/version.js +1 -1
|
@@ -13,6 +13,23 @@ import {
|
|
|
13
13
|
* });
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
+
/**
|
|
17
|
+
* @event Lifecycle#beforestatechange
|
|
18
|
+
* @description Fired before transitioning to a new state. This event is cancelable.<br>
|
|
19
|
+
* Currently only fired when transitioning to BACKGROUND state (e.g., from autoBackground feature).<br>
|
|
20
|
+
* The actual state transition will occur after all event listeners have completed processing.
|
|
21
|
+
* Can be used to prevent automatic transitions to background state when using autoBackground feature.
|
|
22
|
+
* @property {UiState} state - Indicates the target state the lifecycle is trying to transition to.
|
|
23
|
+
* @property {boolean} cancelable - true, indicating the event can be cancelled using preventDefault()
|
|
24
|
+
* @example
|
|
25
|
+
* lifecycle.addEventListener("beforestatechange", (e) => {
|
|
26
|
+
* if (e.state === lifecycle.UiState.BACKGROUND && userIsInteracting) {
|
|
27
|
+
* // Prevent transition to background
|
|
28
|
+
* e.preventDefault();
|
|
29
|
+
* }
|
|
30
|
+
* });
|
|
31
|
+
*/
|
|
32
|
+
|
|
16
33
|
/**
|
|
17
34
|
* @event Lifecycle#userinactivity
|
|
18
35
|
* @description Fired after the ui has been inactive (i.e. no key presses) for a configurable number of seconds.<br>
|
|
@@ -265,7 +282,7 @@ class Lifecycle extends EventTarget {
|
|
|
265
282
|
/**
|
|
266
283
|
* Add event listener for lifecycle events
|
|
267
284
|
* @param {string} type - The event type to listen for
|
|
268
|
-
* @param {Function} listener - The callback function. Listeners for 'userdisconnected' events should return a promise to ensure the event is processed before the application exits.
|
|
285
|
+
* @param {Function} listener - The callback function. Listeners for 'userdisconnected' and 'beforestatechange' events should return a promise to ensure the event is processed before the application exits.
|
|
269
286
|
* @param {Object} options - Event listener options
|
|
270
287
|
*/
|
|
271
288
|
addEventListener(type, listener, options) {
|
package/src/interface/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = "4.4.
|
|
1
|
+
export const version = "4.4.5";
|