@applicaster/quick-brick-player 15.1.26-alpha.9986471322 → 15.1.26-rc.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applicaster/quick-brick-player",
3
- "version": "15.1.26-alpha.9986471322",
3
+ "version": "15.1.26-rc.1",
4
4
  "description": "Quick Brick Player",
5
5
  "main": "./src/index.ts",
6
6
  "types": "index.d.ts",
@@ -37,9 +37,9 @@
37
37
  "dependencies": {
38
38
  "@applicaster/quick-brick-mobile-transport-controls": "15.1.23",
39
39
  "@applicaster/quick-brick-tv-transport-controls": "15.1.23",
40
- "@applicaster/zapp-react-native-tvos-app": "15.1.26-alpha.9986471322",
41
- "@applicaster/zapp-react-native-ui-components": "15.1.26-alpha.9986471322",
42
- "@applicaster/zapp-react-native-utils": "15.1.26-alpha.9986471322",
40
+ "@applicaster/zapp-react-native-tvos-app": "15.1.26-rc.1",
41
+ "@applicaster/zapp-react-native-ui-components": "15.1.26-rc.1",
42
+ "@applicaster/zapp-react-native-utils": "15.1.26-rc.1",
43
43
  "query-string": "7.1.3",
44
44
  "shaka-player": "4.3.5",
45
45
  "typeface-montserrat": "^0.0.54",
@@ -167,7 +167,7 @@ describe("playerActions", () => {
167
167
 
168
168
  expect(sheet.options.replace).toBe(true);
169
169
  expect(sheet.options.header.title).toBe("Playback Speed");
170
- expect(sheet.options.content.role).toBe("collection_selector");
170
+ expect(sheet.options.content.role).toBeUndefined();
171
171
  expect(sheet.options.content.behavior.currentSelection).toEqual(["1"]);
172
172
 
173
173
  expect(sheet.options.content.items.map((item) => item.title)).toEqual([
@@ -114,7 +114,6 @@ export async function openPlaybackSpeedAction(
114
114
  title: config.playback_speed_title || "Playback Speed",
115
115
  },
116
116
  content: {
117
- role: "collection_selector",
118
117
  behavior: {
119
118
  selectMode: "single",
120
119
  currentSelection: [String(current.value)],
@@ -154,7 +153,6 @@ export async function openSleepTimerAction(
154
153
  title: config.playback_sleep_title || "Sleep Timer",
155
154
  },
156
155
  content: {
157
- role: "collection_selector",
158
156
  behavior: {
159
157
  selectMode: "single",
160
158
  currentSelection: timerRemaining
@@ -0,0 +1,35 @@
1
+ import { Platform } from "react-native";
2
+ import { isTV } from "@applicaster/zapp-react-native-utils/reactUtils";
3
+
4
+ import * as mobileControls from "../mobileControls";
5
+ import * as webStandIns from "../mobileControls.web";
6
+
7
+ describe("mobile player controls in web builds", () => {
8
+ const originalOS = Platform.OS;
9
+
10
+ afterEach(() => {
11
+ Platform.OS = originalOS;
12
+ });
13
+
14
+ // The web stand-ins are safe only because Player renders `isTV() ? renderTV() : renderMobile()`.
15
+ it.each(["web", "samsung_tv", "lg_tv"])(
16
+ "%s always takes the TV render path",
17
+ (platform) => {
18
+ Platform.OS = platform as typeof Platform.OS;
19
+
20
+ expect(isTV()).toBe(true);
21
+ }
22
+ );
23
+
24
+ it("provides every control the mobile module exports", () => {
25
+ expect(Object.keys(webStandIns).sort()).toEqual(
26
+ Object.keys(mobileControls).sort()
27
+ );
28
+ });
29
+
30
+ it("renders nothing for each stand-in", () => {
31
+ Object.values(webStandIns).forEach((StandIn) => {
32
+ expect((StandIn as () => null)()).toBeNull();
33
+ });
34
+ });
35
+ });
@@ -13,9 +13,6 @@ import {
13
13
  ViewStyle,
14
14
  } from "react-native";
15
15
 
16
- import TransportControlsMobile, {
17
- ErrorOverlay,
18
- } from "@applicaster/quick-brick-mobile-transport-controls";
19
16
  import TransportControlsTV, {
20
17
  ErrorOverlay as TVErrorOverlay,
21
18
  } from "@applicaster/quick-brick-tv-transport-controls";
@@ -58,7 +55,11 @@ import { useIsTablet as getIsTablet } from "@applicaster/zapp-react-native-utils
58
55
 
59
56
  import { TVPlayerView } from "./PlayerView/TVPlayerView";
60
57
  import PlayerModal, { VideoPlayerModal } from "./PlayerModal";
61
- import { DockedControls } from "./AudioLayer/Layout/DockedControls";
58
+ import {
59
+ DockedControls,
60
+ ErrorOverlay,
61
+ TransportControlsMobile,
62
+ } from "./mobileControls";
62
63
  import { FlexImage } from "./AudioLayer/Layout/PlayerImage/FlexImage";
63
64
  import { PlayerError } from "@applicaster/zapp-react-native-utils/appUtils/playerManager/const";
64
65
 
@@ -0,0 +1,7 @@
1
+ // Controls only the mobile player renders (Player's renderMobile path). Web builds resolve mobileControls.web.ts.
2
+ export {
3
+ default as TransportControlsMobile,
4
+ ErrorOverlay,
5
+ } from "@applicaster/quick-brick-mobile-transport-controls";
6
+
7
+ export { DockedControls } from "./AudioLayer/Layout/DockedControls";
@@ -0,0 +1,10 @@
1
+ // Web builds always render the TV player: Player renders `isTV() ? renderTV() : renderMobile()`, and isTV() is true on
2
+ // every web platform. The mobile controls are never rendered there, so web bundles get empty stand-ins and leave the
3
+ // mobile transport controls package out.
4
+ const NotRenderedOnWeb = () => null;
5
+
6
+ export const TransportControlsMobile = NotRenderedOnWeb;
7
+
8
+ export const ErrorOverlay = NotRenderedOnWeb;
9
+
10
+ export const DockedControls = NotRenderedOnWeb;