@applicaster/zapp-react-native-utils 15.0.0-alpha.1089439460 → 15.0.0-alpha.1201747215
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/appUtils/playerManager/player.ts +0 -4
- package/appUtils/playerManager/usePlayerState.tsx +2 -14
- package/manifestUtils/defaultManifestConfigurations/player.js +0 -20
- package/manifestUtils/keys.js +21 -0
- package/manifestUtils/sharedConfiguration/screenPicker/utils.js +1 -0
- package/package.json +2 -2
- package/reactHooks/player/TVSeekControlller/TVSeekController.ts +10 -27
|
@@ -2,7 +2,7 @@ import * as React from "react";
|
|
|
2
2
|
import { Player } from "./player";
|
|
3
3
|
import { usePlayer } from "./usePlayer";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
type PlayerState = {
|
|
6
6
|
currentTime: number;
|
|
7
7
|
duration: number;
|
|
8
8
|
seekableDuration: number;
|
|
@@ -10,8 +10,6 @@ export type PlayerState = {
|
|
|
10
10
|
isPaused: boolean;
|
|
11
11
|
isBuffering: boolean;
|
|
12
12
|
isReadyToPlay: boolean;
|
|
13
|
-
trackState?: QuickBrickPlayer.TracksState;
|
|
14
|
-
isAd: boolean;
|
|
15
13
|
};
|
|
16
14
|
|
|
17
15
|
export const usePlayerState = (
|
|
@@ -26,8 +24,6 @@ export const usePlayerState = (
|
|
|
26
24
|
isPaused: null,
|
|
27
25
|
isBuffering: false,
|
|
28
26
|
isReadyToPlay: false,
|
|
29
|
-
trackState: null,
|
|
30
|
-
isAd: false,
|
|
31
27
|
});
|
|
32
28
|
|
|
33
29
|
const player: Player = usePlayer(playerId);
|
|
@@ -41,8 +37,6 @@ export const usePlayerState = (
|
|
|
41
37
|
isPaused: player.isPaused(),
|
|
42
38
|
isBuffering: player.isBuffering(),
|
|
43
39
|
isReadyToPlay: player.isReadyToPlay(),
|
|
44
|
-
trackState: player.getTracksState(),
|
|
45
|
-
isAd: player.isAd(),
|
|
46
40
|
});
|
|
47
41
|
}, [player]);
|
|
48
42
|
|
|
@@ -60,16 +54,10 @@ export const usePlayerState = (
|
|
|
60
54
|
onPlayerPause: onPlayerChangeState,
|
|
61
55
|
onPlayerResume: onPlayerChangeState,
|
|
62
56
|
onPlayerSeekComplete: onPlayerChangeState,
|
|
63
|
-
onTracksChanged: onPlayerChangeState,
|
|
64
|
-
onAdBreakBegin: onPlayerChangeState,
|
|
65
|
-
onAdBreakEnd: onPlayerChangeState,
|
|
66
|
-
onAdBegin: onPlayerChangeState,
|
|
67
|
-
onAdEnd: onPlayerChangeState,
|
|
68
|
-
onAdError: onPlayerChangeState,
|
|
69
57
|
},
|
|
70
58
|
});
|
|
71
59
|
}
|
|
72
|
-
}, [
|
|
60
|
+
}, [player]);
|
|
73
61
|
|
|
74
62
|
return state;
|
|
75
63
|
};
|
|
@@ -619,26 +619,6 @@ function getPlayerConfiguration({ platform, version }) {
|
|
|
619
619
|
);
|
|
620
620
|
}
|
|
621
621
|
|
|
622
|
-
if (isTV(platform)) {
|
|
623
|
-
general.fields.push(
|
|
624
|
-
{
|
|
625
|
-
key: "liveSeekingEnabled",
|
|
626
|
-
label: "Live Seeking Enabled",
|
|
627
|
-
initial_value: false,
|
|
628
|
-
type: "switch",
|
|
629
|
-
label_tooltip: "Enable Live Seek",
|
|
630
|
-
},
|
|
631
|
-
{
|
|
632
|
-
key: "minimumAllowedSeekableDurationInSeconds",
|
|
633
|
-
label: "Minimum allowed seekable duration in seconds",
|
|
634
|
-
initial_value: 300,
|
|
635
|
-
type: "number_input",
|
|
636
|
-
label_tooltip:
|
|
637
|
-
"If duration less that this value, player will disable 'liveSeekingEnabled' value",
|
|
638
|
-
}
|
|
639
|
-
);
|
|
640
|
-
}
|
|
641
|
-
|
|
642
622
|
if (isMobile(platform)) {
|
|
643
623
|
general.fields.push(
|
|
644
624
|
{
|
package/manifestUtils/keys.js
CHANGED
|
@@ -959,6 +959,27 @@ const TV_CELL_LABEL_FIELDS = [
|
|
|
959
959
|
rules: "conditional",
|
|
960
960
|
conditions: [{ key: "switch", section: "styles", value: true }],
|
|
961
961
|
},
|
|
962
|
+
{
|
|
963
|
+
type: ZAPPIFEST_FIELDS.font_selector.roku,
|
|
964
|
+
suffix: "roku font family",
|
|
965
|
+
tooltip: "",
|
|
966
|
+
rules: "conditional",
|
|
967
|
+
conditions: [{ key: "switch", section: "styles", value: true }],
|
|
968
|
+
},
|
|
969
|
+
{
|
|
970
|
+
type: ZAPPIFEST_FIELDS.number_input,
|
|
971
|
+
suffix: "roku font size",
|
|
972
|
+
tooltip: "",
|
|
973
|
+
rules: "conditional",
|
|
974
|
+
conditions: [{ key: "switch", section: "styles", value: true }],
|
|
975
|
+
},
|
|
976
|
+
{
|
|
977
|
+
type: ZAPPIFEST_FIELDS.number_input,
|
|
978
|
+
suffix: "roku line height",
|
|
979
|
+
tooltip: "",
|
|
980
|
+
rules: "conditional",
|
|
981
|
+
conditions: [{ key: "switch", section: "styles", value: true }],
|
|
982
|
+
},
|
|
962
983
|
{
|
|
963
984
|
type: ZAPPIFEST_FIELDS.select,
|
|
964
985
|
suffix: "text alignment",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applicaster/zapp-react-native-utils",
|
|
3
|
-
"version": "15.0.0-alpha.
|
|
3
|
+
"version": "15.0.0-alpha.1201747215",
|
|
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.
|
|
30
|
+
"@applicaster/applicaster-types": "15.0.0-alpha.1201747215",
|
|
31
31
|
"buffer": "^5.2.1",
|
|
32
32
|
"camelize": "^1.0.0",
|
|
33
33
|
"dayjs": "^1.11.10",
|
|
@@ -147,34 +147,17 @@ export class TVSeekController
|
|
|
147
147
|
|
|
148
148
|
let targetPos = currentPos;
|
|
149
149
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
);
|
|
158
|
-
} else if (this.currentSeekType === SEEK_TYPE.FORWARD) {
|
|
159
|
-
targetPos = Math.max(0, currentPos - offset);
|
|
160
|
-
} else {
|
|
161
|
-
log_warning(
|
|
162
|
-
`TVSeekController: handleDelayedSeek - invalid seek type: ${this.currentSeekType}`
|
|
163
|
-
);
|
|
164
|
-
}
|
|
150
|
+
if (this.currentSeekType === SEEK_TYPE.FORWARD) {
|
|
151
|
+
targetPos = Math.min(
|
|
152
|
+
currentPos + offset,
|
|
153
|
+
this.playerController.getSeekableDuration()
|
|
154
|
+
);
|
|
155
|
+
} else if (this.currentSeekType === SEEK_TYPE.REWIND) {
|
|
156
|
+
targetPos = Math.max(0, currentPos - offset);
|
|
165
157
|
} else {
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
this.playerController.getSeekableDuration()
|
|
170
|
-
);
|
|
171
|
-
} else if (this.currentSeekType === SEEK_TYPE.REWIND) {
|
|
172
|
-
targetPos = Math.max(0, currentPos - offset);
|
|
173
|
-
} else {
|
|
174
|
-
log_warning(
|
|
175
|
-
`TVSeekController: handleDelayedSeek - invalid seek type: ${this.currentSeekType}`
|
|
176
|
-
);
|
|
177
|
-
}
|
|
158
|
+
log_warning(
|
|
159
|
+
`TVSeekController: handleDelayedSeek - invalid seek type: ${this.currentSeekType}`
|
|
160
|
+
);
|
|
178
161
|
}
|
|
179
162
|
|
|
180
163
|
log_debug(
|