@applicaster/quick-brick-player 15.1.24 → 15.1.25-alpha.3342504180

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.24",
3
+ "version": "15.1.25-alpha.3342504180",
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.24",
41
- "@applicaster/zapp-react-native-ui-components": "15.1.24",
42
- "@applicaster/zapp-react-native-utils": "15.1.24",
40
+ "@applicaster/zapp-react-native-tvos-app": "15.1.25-alpha.3342504180",
41
+ "@applicaster/zapp-react-native-ui-components": "15.1.25-alpha.3342504180",
42
+ "@applicaster/zapp-react-native-utils": "15.1.25-alpha.3342504180",
43
43
  "query-string": "7.1.3",
44
44
  "shaka-player": "4.3.5",
45
45
  "typeface-montserrat": "^0.0.54",
@@ -5,7 +5,13 @@
5
5
  import React from "react";
6
6
  import * as R from "ramda";
7
7
 
8
- import { findNodeHandle, StyleSheet, View, ViewStyle } from "react-native";
8
+ import {
9
+ Dimensions,
10
+ findNodeHandle,
11
+ StyleSheet,
12
+ View,
13
+ ViewStyle,
14
+ } from "react-native";
9
15
 
10
16
  import TransportControlsMobile, {
11
17
  ErrorOverlay,
@@ -27,6 +33,7 @@ import {
27
33
  PlayerDetails,
28
34
  PlayerWrapper,
29
35
  } from "@applicaster/zapp-react-native-ui-components/Components/VideoModal";
36
+ import { getVerticalColumnWidth } from "@applicaster/zapp-react-native-ui-components/Components/VideoModal/playerWrapperUtils";
30
37
 
31
38
  import { PlayNextOverlay } from "./PlayNextOverlay";
32
39
  import { PlayerImageBackground } from "@applicaster/zapp-react-native-ui-components/Components/PlayerImageBackground";
@@ -47,6 +54,7 @@ import {
47
54
  isAudioItem as isAudioItemUtil,
48
55
  isInlineTV as isInlineTVUtil,
49
56
  } from "@applicaster/zapp-react-native-utils/playerUtils";
57
+ import { useIsTablet as getIsTablet } from "@applicaster/zapp-react-native-utils/reactHooks";
50
58
 
51
59
  import { TVPlayerView } from "./PlayerView/TVPlayerView";
52
60
  import PlayerModal, { VideoPlayerModal } from "./PlayerModal";
@@ -1369,8 +1377,31 @@ export default class VideoPlayer extends React.Component<
1369
1377
 
1370
1378
  const shouldRenderNativePlayer = !isCasting || this.supportNativeCast;
1371
1379
 
1372
- const aspectRatio =
1373
- !inline && isModal && !piped ? getScreenAspectRatio() : 16 / 9;
1380
+ const isVerticalInlineTabletLandscape =
1381
+ vertical &&
1382
+ inline &&
1383
+ isModal &&
1384
+ !piped &&
1385
+ getIsTablet() &&
1386
+ !isTabletPortrait;
1387
+
1388
+ // Vertical inline on a landscape tablet fills the column height. The
1389
+ // minimise animation and the docked slot both use this ratio, so it has to
1390
+ // describe that box, not 16:9, and both sides have to come from the same
1391
+ // window the layout measures -- getTabletWidth resolves percentages
1392
+ // against the device screen, which is wider than the app in split view.
1393
+ const verticalColumnWidth = isVerticalInlineTabletLandscape
1394
+ ? getVerticalColumnWidth(
1395
+ Dimensions.get("window").width,
1396
+ pluginConfiguration.tablet_landscape_sidebar_width
1397
+ )
1398
+ : undefined;
1399
+
1400
+ const aspectRatio = isVerticalInlineTabletLandscape
1401
+ ? verticalColumnWidth / Dimensions.get("window").height
1402
+ : !inline && isModal && !piped
1403
+ ? getScreenAspectRatio()
1404
+ : 16 / 9;
1374
1405
 
1375
1406
  const audioPlayerProps = {
1376
1407
  ref: this._assignRoot,
@@ -1411,10 +1442,14 @@ export default class VideoPlayer extends React.Component<
1411
1442
  fullscreen={fullscreen}
1412
1443
  modal
1413
1444
  style={{
1414
- tabletLandscapeWidth: getTabletWidth(
1415
- this.getPluginConfiguration().tablet_landscape_sidebar_width,
1416
- style
1417
- ),
1445
+ // The modal freezes this as the player width, so it has to be the
1446
+ // same column the aspect ratio above describes.
1447
+ tabletLandscapeWidth:
1448
+ verticalColumnWidth ??
1449
+ getTabletWidth(
1450
+ this.getPluginConfiguration().tablet_landscape_sidebar_width,
1451
+ style
1452
+ ),
1418
1453
  width: style.width,
1419
1454
  height: style.height,
1420
1455
  }}