@applicaster/zapp-react-native-utils 15.1.16 → 15.1.18-alpha.1091413228
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.
|
@@ -786,6 +786,14 @@ function getPlayerConfiguration({ platform, version }) {
|
|
|
786
786
|
type: "switch",
|
|
787
787
|
label_tooltip:
|
|
788
788
|
"Enable this option to have a floating video player when the app is in the background.",
|
|
789
|
+
},
|
|
790
|
+
{
|
|
791
|
+
key: "vertical_video_player",
|
|
792
|
+
label: "Vertical video mode",
|
|
793
|
+
initial_value: false,
|
|
794
|
+
type: "switch",
|
|
795
|
+
label_tooltip:
|
|
796
|
+
"Enable this option to use the vertical video player layout.",
|
|
789
797
|
}
|
|
790
798
|
);
|
|
791
799
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applicaster/zapp-react-native-utils",
|
|
3
|
-
"version": "15.1.
|
|
3
|
+
"version": "15.1.18-alpha.1091413228",
|
|
4
4
|
"description": "Applicaster Zapp React Native utilities package",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
},
|
|
28
28
|
"homepage": "https://github.com/applicaster/quickbrick#readme",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@applicaster/applicaster-types": "15.1.
|
|
30
|
+
"@applicaster/applicaster-types": "15.1.18-alpha.1091413228",
|
|
31
31
|
"buffer": "^5.2.1",
|
|
32
32
|
"camelize": "^1.0.0",
|
|
33
33
|
"dayjs": "^1.11.10",
|
|
@@ -105,3 +105,29 @@ describe("isActionAvailableFor", () => {
|
|
|
105
105
|
expect(isActionAvailableFor(undefined, entry)).toBe(true);
|
|
106
106
|
});
|
|
107
107
|
});
|
|
108
|
+
|
|
109
|
+
describe("uiActionsRegistry.notifyProviderChanged", () => {
|
|
110
|
+
it("notifies subscribers for a registered provider", () => {
|
|
111
|
+
const unregister = uiActionsRegistry.registerAction("live-action", value);
|
|
112
|
+
const listener = jest.fn();
|
|
113
|
+
const unsubscribe = uiActionsRegistry.subscribe(listener);
|
|
114
|
+
|
|
115
|
+
uiActionsRegistry.notifyProviderChanged("live-action");
|
|
116
|
+
|
|
117
|
+
expect(listener).toHaveBeenCalledTimes(1);
|
|
118
|
+
|
|
119
|
+
unsubscribe();
|
|
120
|
+
unregister();
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
it("ignores names that are not registered", () => {
|
|
124
|
+
const listener = jest.fn();
|
|
125
|
+
const unsubscribe = uiActionsRegistry.subscribe(listener);
|
|
126
|
+
|
|
127
|
+
uiActionsRegistry.notifyProviderChanged("unknown-action");
|
|
128
|
+
|
|
129
|
+
expect(listener).not.toHaveBeenCalled();
|
|
130
|
+
|
|
131
|
+
unsubscribe();
|
|
132
|
+
});
|
|
133
|
+
});
|
|
@@ -246,6 +246,22 @@ class UIActionsRegistry {
|
|
|
246
246
|
this.changeListeners.slice().forEach((listener) => listener());
|
|
247
247
|
}
|
|
248
248
|
|
|
249
|
+
/**
|
|
250
|
+
* Tells consumers that a registered provider now returns different actions.
|
|
251
|
+
*
|
|
252
|
+
* Resolved actions are snapshots: an action whose availability depends on
|
|
253
|
+
* live state (cast devices found, downloads allowed) hands out a new value
|
|
254
|
+
* when that state changes, and consumers that resolved the old one keep
|
|
255
|
+
* asking it until they re-resolve. Registration alone never tells them.
|
|
256
|
+
*/
|
|
257
|
+
notifyProviderChanged(name: string): void {
|
|
258
|
+
if (!this.registeredActions[name]) {
|
|
259
|
+
return;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
this.notifyChanged();
|
|
263
|
+
}
|
|
264
|
+
|
|
249
265
|
/**
|
|
250
266
|
* Register a dynamic action provider under a unique `name`.
|
|
251
267
|
* The provider can return one or more actions and may use the passed `entry`.
|