@applicaster/quick-brick-player 12.0.0-alpha.3021004521 → 12.0.0-alpha.4534459584

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": "12.0.0-alpha.3021004521",
3
+ "version": "12.0.0-alpha.4534459584",
4
4
  "description": "Quick Brick Player",
5
5
  "main": "./src/index.ts",
6
6
  "types": "index.d.ts",
@@ -36,11 +36,11 @@
36
36
  },
37
37
  "homepage": "https://github.com/applicaster/quickbrick#readme",
38
38
  "dependencies": {
39
- "@applicaster/quick-brick-mobile-transport-controls": "12.0.0-rc.3",
39
+ "@applicaster/quick-brick-mobile-transport-controls": "12.0.0-alpha.4534459584",
40
40
  "@applicaster/quick-brick-tv-transport-controls": "11.0.0-rc.133",
41
- "@applicaster/zapp-react-native-tvos-app": "12.0.0-alpha.3021004521",
42
- "@applicaster/zapp-react-native-ui-components": "12.0.0-alpha.3021004521",
43
- "@applicaster/zapp-react-native-utils": "12.0.0-alpha.3021004521",
41
+ "@applicaster/zapp-react-native-tvos-app": "12.0.0-alpha.4534459584",
42
+ "@applicaster/zapp-react-native-ui-components": "12.0.0-alpha.4534459584",
43
+ "@applicaster/zapp-react-native-utils": "12.0.0-alpha.4534459584",
44
44
  "keymirror": "^0.1.1",
45
45
  "react-native-web-linear-gradient": "1.1.2",
46
46
  "shaka-player": "4.3.5",
@@ -1,55 +1,13 @@
1
1
  import * as React from "react";
2
- import { isNotNil } from "@applicaster/zapp-react-native-utils/reactUtils/helpers";
2
+
3
3
  import { useOrientationEffect } from "@applicaster/zapp-react-native-utils/reactHooks/videoModal";
4
4
  import Player from "./Player";
5
5
  import { useActions } from "@applicaster/zapp-react-native-utils/reactHooks/actions";
6
6
  import { isWeb } from "@applicaster/zapp-react-native-utils/reactUtils";
7
7
  import { useNavigation } from "@applicaster/zapp-react-native-utils/reactHooks";
8
- import { toBooleanWithDefaultFalse } from "@applicaster/zapp-react-native-utils/booleanUtils";
9
- import { isEqual } from "@applicaster/zapp-react-native-utils/equalUtils";
10
- import { toNoopIfNil } from "@applicaster/zapp-react-native-utils/functionUtils";
11
8
 
12
9
  const CHROMECAST_IDENTIFIER = "quick-brick-chromecast-action";
13
10
 
14
- const MemoizedPlayer = React.memo(
15
- Player,
16
- isEqual({
17
- byValue: [
18
- "PlayerComponent",
19
- "autoplay",
20
- "controls",
21
- "disableCastAction",
22
- "docked",
23
- "focused",
24
- "fullscreen",
25
- "inline",
26
- "isModal",
27
- "isTabletPortrait",
28
- "muted",
29
- "playerId",
30
- "playerPluginIdentifier",
31
- "mode",
32
- "style",
33
- ],
34
- byReference: [
35
- "controller",
36
- "listener",
37
- "playNextData",
38
- "entry",
39
- "playableItem",
40
- "source",
41
- "playerEvent",
42
- "playerPluginManifest",
43
- "pluginConfiguration",
44
- "setNextVideoPreloadThresholdPercentage",
45
- "toggleFullscreen",
46
- "openPiP",
47
- "closePiP",
48
- "castAction",
49
- ],
50
- })
51
- );
52
-
53
11
  const QuickBrickPlayerComponent = (
54
12
  props: QuickBrickPlayer.PlayerProps,
55
13
  ref
@@ -67,7 +25,7 @@ const QuickBrickPlayerComponent = (
67
25
 
68
26
  const castAction = useActions(CHROMECAST_IDENTIFIER);
69
27
 
70
- const isModal = toBooleanWithDefaultFalse(props?.isModal);
28
+ const isModal = Boolean(props?.isModal);
71
29
  const isScreenDisabled = !controller?.isFullScreenSupported() || !isModal;
72
30
 
73
31
  const {
@@ -77,24 +35,16 @@ const QuickBrickPlayerComponent = (
77
35
  } = useNavigation();
78
36
 
79
37
  useOrientationEffect({
80
- isTabletPortrait: toBooleanWithDefaultFalse(props?.isTabletPortrait),
38
+ isTabletPortrait: props?.isTabletPortrait,
81
39
  docked: mode === "MINIMIZED",
82
- toggleFullscreen: toNoopIfNil(props?.toggleFullscreen),
40
+ toggleFullscreen: props?.toggleFullscreen,
83
41
  disable: isScreenDisabled,
84
42
  skipInitialOrientationEffects: mode === "FULLSCREEN",
85
- isRunningPlayNext: isNotNil(props?.playNextData),
43
+ isRunningPlayNext: !!props?.playNextData,
86
44
  });
87
45
 
88
- // console.log("debug_2", "QuickBrickPlayerComponent - render", {
89
- // mode,
90
- // props,
91
- // disableCastAction: props?.disableCastAction,
92
- // castAction,
93
- // PlayerComponent: props.PlayerComponent,
94
- // });
95
-
96
46
  return (
97
- <MemoizedPlayer
47
+ <Player
98
48
  {...props}
99
49
  ref={ref}
100
50
  castAction={!props?.disableCastAction && castAction}