@applicaster/quick-brick-player 12.0.0-alpha.9151207838 → 12.0.0-alpha.9262886003

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.9151207838",
3
+ "version": "12.0.0-alpha.9262886003",
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-alpha.9151207838",
39
+ "@applicaster/quick-brick-mobile-transport-controls": "12.0.0-alpha.9262886003",
40
40
  "@applicaster/quick-brick-tv-transport-controls": "11.0.0-rc.133",
41
- "@applicaster/zapp-react-native-tvos-app": "12.0.0-alpha.9151207838",
42
- "@applicaster/zapp-react-native-ui-components": "12.0.0-alpha.9151207838",
43
- "@applicaster/zapp-react-native-utils": "12.0.0-alpha.9151207838",
41
+ "@applicaster/zapp-react-native-tvos-app": "12.0.0-alpha.9262886003",
42
+ "@applicaster/zapp-react-native-ui-components": "12.0.0-alpha.9262886003",
43
+ "@applicaster/zapp-react-native-utils": "12.0.0-alpha.9262886003",
44
44
  "keymirror": "^0.1.1",
45
45
  "query-string": "7.1.3",
46
46
  "react-native-web-linear-gradient": "1.1.2",
@@ -1,8 +1,9 @@
1
1
  import React, { useEffect, useState } from "react";
2
- import { Image, StyleSheet, View } from "react-native";
2
+ import { StyleSheet, View } from "react-native";
3
3
  import { usePlayer } from "@applicaster/zapp-react-native-utils/appUtils/playerManager/usePlayer";
4
4
  import { MUTED_USAGE } from "../const";
5
5
  import { LiveImageManager } from "@applicaster/zapp-react-native-ui-components/Components/VideoLive/LiveImageManager";
6
+ import { QBImage as Image } from "@applicaster/zapp-react-native-ui-components/Components/Image";
6
7
 
7
8
  type Asset = string | undefined;
8
9
 
@@ -17,8 +17,6 @@ import { PlayerDetails } from "@applicaster/zapp-react-native-ui-components/Comp
17
17
  import { isTV } from "@applicaster/zapp-react-native-utils/reactUtils";
18
18
  import { useEffect, useState } from "react";
19
19
  import { MagicBG } from "./MagicBG";
20
- import { addQueryParam, getLiveUrl } from "../Utils";
21
- import { useTitleSummaryOverlay } from "@applicaster/zapp-react-native-utils/appUtils/playerManager/usePlayerTitleSummaryOverlay";
22
20
  import {
23
21
  formatSpeed,
24
22
  hasDatePassed,
@@ -26,6 +24,8 @@ import {
26
24
  NAMESPACE,
27
25
  } from "./utils";
28
26
  import { localStorage } from "@applicaster/zapp-react-native-bridge/ZappStorage/LocalStorage";
27
+ import { getLiveUrl } from "../Utils";
28
+ import { useTitleSummaryOverlay } from "@applicaster/zapp-react-native-utils/appUtils/playerManager/usePlayerTitleSummaryOverlay";
29
29
 
30
30
  const { log_debug } = createLogger({
31
31
  subsystem: "UIComponent",
@@ -145,6 +145,17 @@ export const AudioPlayerWrapper: React.FC<Props> = (props: Props) => {
145
145
 
146
146
  const isTabletLandscape = !isTV() && isTablet && !isTabletPortrait;
147
147
 
148
+ // TODO: Have generic place for live url from configuration. Currently its hardcoded for client.
149
+
150
+ const feedUrl = getLiveUrl(entry?.extensions?.live?.channel_src ?? "");
151
+
152
+ const { title, summary } = useTitleSummaryOverlay(
153
+ feedUrl,
154
+ entry,
155
+ playerState?.isLive,
156
+ configuration?.audio_live_player_update_interval
157
+ );
158
+
148
159
  const [playbackSpeed, setPlaybackSpeed] = useState({
149
160
  asset: configuration["speed_1"],
150
161
  value: 1.0,
@@ -157,15 +168,6 @@ export const AudioPlayerWrapper: React.FC<Props> = (props: Props) => {
157
168
 
158
169
  const [sleepTimerDate, setSleepTimerDate] = useState(0);
159
170
 
160
- const feedUrl = getLiveUrl(entry?.extensions?.live?.channel_src ?? "");
161
-
162
- const { title, summary } = useTitleSummaryOverlay(
163
- feedUrl,
164
- entry,
165
- playerState?.isLive,
166
- configuration?.audio_live_player_update_interval || 60
167
- );
168
-
169
171
  const [dimensions, setDimensions] = React.useState<Dimensions>({
170
172
  width: 0,
171
173
  height: 0,
@@ -193,7 +195,6 @@ export const AudioPlayerWrapper: React.FC<Props> = (props: Props) => {
193
195
  });
194
196
 
195
197
  setSleepTimerDate(0);
196
- player?.pause();
197
198
 
198
199
  await localStorage.removeItem("sleep", NAMESPACE);
199
200
  };
@@ -454,15 +455,17 @@ export const AudioPlayerWrapper: React.FC<Props> = (props: Props) => {
454
455
  if (configuration.magic_background) {
455
456
  const baseUrl = entry?.extensions?.audio_player_background_image ?? "";
456
457
 
457
- const queryParamName =
458
- configuration.audio_player_background_image_query || "width";
459
-
460
- const queryParamValue = 10;
458
+ // TODO: To be added when background is ready
461
459
 
462
- const url = addQueryParam(baseUrl, queryParamName, queryParamValue);
460
+ // const queryParamName =
461
+ // configuration.audio_player_background_image_query || "width";
462
+ //
463
+ // const queryParamValue = 15;
464
+ //
465
+ // const url = addQueryParam(baseUrl, queryParamName, queryParamValue);
463
466
 
464
467
  return (
465
- <MagicBG image={url} fallbackUrl={baseUrl} defaultColor="#000000">
468
+ <MagicBG image={baseUrl} fallbackUrl={baseUrl} defaultColor="#000000">
466
469
  {MainContent}
467
470
  </MagicBG>
468
471
  );
@@ -11,7 +11,7 @@ import {
11
11
 
12
12
  import { playerManager } from "@applicaster/zapp-react-native-utils/appUtils";
13
13
 
14
- import { useIsTablet } from "@applicaster/zapp-react-native-utils/reactHooks/device/useIsTablet";
14
+ import { useIsTablet } from "@applicaster/zapp-react-native-utils/reactHooks";
15
15
  import {
16
16
  forwardButton,
17
17
  playbackButton,
@@ -251,7 +251,7 @@ export default function DefaultLayout(props: LayoutProps) {
251
251
 
252
252
  // Setting up an interval to update the remaining time every second
253
253
  const intervalId = setInterval(() => {
254
- setTimeLeft((prevTimeLeft) => {
254
+ setTimeLeft(() => {
255
255
  const newTimeLeft = sleepTimerDate - Date.now();
256
256
 
257
257
  // If the new remaining time is less than or equal to 0, clear the interval and trigger the cancelSleepTimer function
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import * as React from "react";
2
2
  import {
3
3
  StyleSheet,
4
4
  TouchableWithoutFeedback,
@@ -6,7 +6,7 @@ import {
6
6
  ViewStyle,
7
7
  } from "react-native";
8
8
  import * as R from "ramda";
9
- import { useDimensions } from "@applicaster/zapp-react-native-utils/reactHooks";
9
+ import { useIsTablet } from "@applicaster/zapp-react-native-utils/reactHooks";
10
10
 
11
11
  import {
12
12
  ContentInfo,
@@ -202,9 +202,7 @@ export default function DockedLayout(props: LayoutProps) {
202
202
  summary,
203
203
  } = props;
204
204
 
205
- const {
206
- deviceInfo: { isTablet },
207
- } = useDimensions("screen", { deviceInfo: true });
205
+ const isTablet = useIsTablet();
208
206
 
209
207
  const visible = true;
210
208
  const liveButton = Boolean(value("live_badge_enabled"));
@@ -1011,10 +1011,12 @@ export default class VideoPlayer extends React.Component<
1011
1011
  inline,
1012
1012
  docked,
1013
1013
  isModal,
1014
+ pip: this.state.piped,
1014
1015
  layoutState: {
1015
1016
  inline,
1016
1017
  docked,
1017
1018
  isModal,
1019
+ pip: this.state.piped,
1018
1020
  },
1019
1021
  configuration: this.getPluginConfiguration(),
1020
1022
  fullscreen: fullscreen,
@@ -1091,6 +1093,7 @@ export default class VideoPlayer extends React.Component<
1091
1093
  listener={this.props.listener}
1092
1094
  style={getStyle(playerDimensions)}
1093
1095
  pluginConfiguration={this.getPluginConfiguration()}
1096
+ controller={this.props.controller}
1094
1097
  >
1095
1098
  {this.childrenWithPlayNext()}
1096
1099
  </this.props.PlayerComponent>
@@ -1127,6 +1130,7 @@ export default class VideoPlayer extends React.Component<
1127
1130
  listener={this.props.listener}
1128
1131
  style={this.takeParentStyle}
1129
1132
  pluginConfiguration={this.getPluginConfiguration()}
1133
+ controller={this.props.controller}
1130
1134
  >
1131
1135
  {this.childrenWithPlayNext()}
1132
1136
  </this.props.PlayerComponent>