@applicaster/zapp-react-native-utils 15.0.0-alpha.6351072502 → 15.0.0-alpha.6685355529

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.
@@ -229,8 +229,9 @@ export class PlayerNative extends Player {
229
229
  };
230
230
 
231
231
  closeNativePlayer = () => {
232
- // TODO: Delete does not work
232
+ // TODO: Delete, does not work (component is null)
233
233
  this.currentPlayerComponent()?.closeNativePlayer?.();
234
+ this.getPlayerModule()?.stopBackgroundPlayback?.();
234
235
  };
235
236
 
236
237
  togglePlayPause = () => {
@@ -707,22 +707,6 @@ function getPlayerConfiguration({ platform, version }) {
707
707
  }
708
708
 
709
709
  if (isMobile(platform)) {
710
- localizations.fields.push(
711
- {
712
- type: "text_input",
713
- label: "Restrict playback on mobile networks alert title",
714
- key: "mobile_connection_restricted_alert_title",
715
- initial_value: "Restricted Connection Type",
716
- },
717
- {
718
- type: "text_input",
719
- label: "Restrict playback on mobile networks alert message",
720
- key: "mobile_connection_restricted_alert_message",
721
- initial_value:
722
- "This content can only be viewed over a Wi-Fi or LAN network.",
723
- }
724
- );
725
-
726
710
  general.fields.push(
727
711
  {
728
712
  section: "Default Timestamp Type",
@@ -0,0 +1,13 @@
1
+ function platformIsTV(platform) {
2
+ return [
3
+ "tvos_for_quickbrick",
4
+ "android_tv_for_quickbrick",
5
+ "amazon_fire_tv_for_quickbrick",
6
+ "lg_tv",
7
+ "samsung_tv",
8
+ "web",
9
+ "vizio",
10
+ ].includes(platform);
11
+ }
12
+
13
+ module.exports = { platformIsTV };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applicaster/zapp-react-native-utils",
3
- "version": "15.0.0-alpha.6351072502",
3
+ "version": "15.0.0-alpha.6685355529",
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.0.0-alpha.6351072502",
30
+ "@applicaster/applicaster-types": "15.0.0-alpha.6685355529",
31
31
  "buffer": "^5.2.1",
32
32
  "camelize": "^1.0.0",
33
33
  "dayjs": "^1.11.10",
@@ -0,0 +1,20 @@
1
+ import * as React from "react";
2
+ import { scrollEndReached$ } from "@applicaster/zapp-react-native-ui-components/events";
3
+ import { filter } from "rxjs/operators";
4
+
5
+ /**
6
+ * Subscribe to scroll-end-reached and call loadNextData only when this item is last in the river.
7
+ * Use in Grid/List so they load next page when the user scrolls to the end (river or tabs scroll container).
8
+ */
9
+ export function useScrollEndReachedLoadNext(
10
+ isLast: boolean,
11
+ loadNextData: () => void
12
+ ): void {
13
+ React.useEffect(() => {
14
+ const sub = scrollEndReached$.pipe(filter(() => isLast)).subscribe(() => {
15
+ loadNextData();
16
+ });
17
+
18
+ return () => sub.unsubscribe();
19
+ }, [isLast, loadNextData]);
20
+ }
@@ -15,3 +15,5 @@ export * from "./device";
15
15
  export * from "./screen";
16
16
 
17
17
  export * from "./state";
18
+
19
+ export * from "./events";