@applicaster/quick-brick-player 13.0.0-rc.95 → 13.0.0-rc.97
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": "13.0.0-rc.
|
|
3
|
+
"version": "13.0.0-rc.97",
|
|
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": "13.0.0-rc.95",
|
|
39
39
|
"@applicaster/quick-brick-tv-transport-controls": "13.0.0-rc.56",
|
|
40
|
-
"@applicaster/zapp-react-native-tvos-app": "13.0.0-rc.
|
|
41
|
-
"@applicaster/zapp-react-native-ui-components": "13.0.0-rc.
|
|
42
|
-
"@applicaster/zapp-react-native-utils": "13.0.0-rc.
|
|
40
|
+
"@applicaster/zapp-react-native-tvos-app": "13.0.0-rc.97",
|
|
41
|
+
"@applicaster/zapp-react-native-ui-components": "13.0.0-rc.97",
|
|
42
|
+
"@applicaster/zapp-react-native-utils": "13.0.0-rc.97",
|
|
43
43
|
"query-string": "7.1.3",
|
|
44
44
|
"react-native-web-linear-gradient": "1.1.2",
|
|
45
45
|
"shaka-player": "4.3.5",
|
|
@@ -266,7 +266,11 @@ export const AudioPlayerWrapper: React.FC<Props> = (props: Props) => {
|
|
|
266
266
|
iconPlacement: "right",
|
|
267
267
|
},
|
|
268
268
|
options: {
|
|
269
|
-
supportedOrientations: [
|
|
269
|
+
supportedOrientations: [
|
|
270
|
+
"portrait",
|
|
271
|
+
"landscape",
|
|
272
|
+
"portrait-upside-down",
|
|
273
|
+
],
|
|
270
274
|
},
|
|
271
275
|
});
|
|
272
276
|
}, [playbackSpeed, onSpeedSelect, configuration["playback_speed_title"]]);
|
|
@@ -290,7 +294,11 @@ export const AudioPlayerWrapper: React.FC<Props> = (props: Props) => {
|
|
|
290
294
|
iconPlacement: "right",
|
|
291
295
|
},
|
|
292
296
|
options: {
|
|
293
|
-
supportedOrientations: [
|
|
297
|
+
supportedOrientations: [
|
|
298
|
+
"portrait",
|
|
299
|
+
"landscape",
|
|
300
|
+
"portrait-upside-down",
|
|
301
|
+
],
|
|
294
302
|
},
|
|
295
303
|
});
|
|
296
304
|
}, [
|
|
@@ -3,11 +3,9 @@ import { LayoutChangeEvent } from "react-native";
|
|
|
3
3
|
|
|
4
4
|
import { toNumber } from "@applicaster/zapp-react-native-utils/numberUtils";
|
|
5
5
|
import { Subject } from "rxjs";
|
|
6
|
-
import {
|
|
6
|
+
import { take, last } from "rxjs/operators";
|
|
7
7
|
import { useRefWithInitialValue } from "@applicaster/zapp-react-native-utils/reactHooks/state/useRefWithInitialValue";
|
|
8
8
|
|
|
9
|
-
const TIMEOUT = 200; // ms
|
|
10
|
-
|
|
11
9
|
type Layout = {
|
|
12
10
|
x: number;
|
|
13
11
|
y: number;
|
|
@@ -47,7 +45,7 @@ export const useImageSize = ({ isPortraitMode }: Props): Return => {
|
|
|
47
45
|
React.useEffect(() => {
|
|
48
46
|
const subscription = layoutRef.current.layoutChange$
|
|
49
47
|
// for landscape layout we need to wait the second layout change in order to get proper size of image
|
|
50
|
-
.pipe(
|
|
48
|
+
.pipe(take(isPortraitMode ? 1 : 2), last())
|
|
51
49
|
.subscribe({
|
|
52
50
|
next: (layout: Layout) => {
|
|
53
51
|
const size = isPortraitMode
|
|
@@ -65,7 +63,8 @@ export const useImageSize = ({ isPortraitMode }: Props): Return => {
|
|
|
65
63
|
|
|
66
64
|
React.useEffect(() => {
|
|
67
65
|
const subscription = layoutRef.current.layoutChange$
|
|
68
|
-
|
|
66
|
+
// wait the second layout change in order to get proper offsetY
|
|
67
|
+
.pipe(take(2), last())
|
|
69
68
|
.subscribe({
|
|
70
69
|
next: (layout: Layout) => {
|
|
71
70
|
setOffsetY(layout.y);
|