@applicaster/quick-brick-player 12.0.0-rc.34 → 12.0.0-rc.35
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 +4 -4
- package/src/Player/index.tsx +49 -20
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applicaster/quick-brick-player",
|
|
3
|
-
"version": "12.0.0-rc.
|
|
3
|
+
"version": "12.0.0-rc.35",
|
|
4
4
|
"description": "Quick Brick Player",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -38,9 +38,9 @@
|
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@applicaster/quick-brick-mobile-transport-controls": "12.0.0-rc.33",
|
|
40
40
|
"@applicaster/quick-brick-tv-transport-controls": "11.0.0-rc.133",
|
|
41
|
-
"@applicaster/zapp-react-native-tvos-app": "12.0.0-rc.
|
|
42
|
-
"@applicaster/zapp-react-native-ui-components": "12.0.0-rc.
|
|
43
|
-
"@applicaster/zapp-react-native-utils": "12.0.0-rc.
|
|
41
|
+
"@applicaster/zapp-react-native-tvos-app": "12.0.0-rc.35",
|
|
42
|
+
"@applicaster/zapp-react-native-ui-components": "12.0.0-rc.35",
|
|
43
|
+
"@applicaster/zapp-react-native-utils": "12.0.0-rc.35",
|
|
44
44
|
"keymirror": "^0.1.1",
|
|
45
45
|
"query-string": "7.1.3",
|
|
46
46
|
"react-native-web-linear-gradient": "1.1.2",
|
package/src/Player/index.tsx
CHANGED
|
@@ -36,6 +36,8 @@ import { AudioPlayerWrapper } from "./AudioLayer/AudioPlayerWrapper";
|
|
|
36
36
|
import { playerManager } from "@applicaster/zapp-react-native-utils/appUtils";
|
|
37
37
|
import { getAllAccessibilityProps } from "@applicaster/zapp-react-native-utils/configurationUtils";
|
|
38
38
|
import { PlayNextData } from "@applicaster/zapp-react-native-ui-components/Components/PlayerContainer/PlayerContainer";
|
|
39
|
+
import { getTargetScreenDataFromEntry } from "@applicaster/zapp-react-native-utils/reactHooks/screen/useTargetScreenData";
|
|
40
|
+
import { isAppleTV } from "@applicaster/zapp-react-native-ui-components/Helpers/Platform";
|
|
39
41
|
|
|
40
42
|
const RNPlayerManager = {
|
|
41
43
|
QuickBrickPlayerPlugin: isApplePlatform()
|
|
@@ -555,6 +557,26 @@ export default class VideoPlayer extends React.Component<
|
|
|
555
557
|
this.props.listener?.onPlayerDetached?.(nativeEvent);
|
|
556
558
|
};
|
|
557
559
|
|
|
560
|
+
onVideoFullscreenPlayerDidDismiss = () => {
|
|
561
|
+
this.props.listener?.onVideoFullscreenPlayerDidDismiss?.();
|
|
562
|
+
};
|
|
563
|
+
|
|
564
|
+
onVideoFullscreenPlayerDidPresent = () => {
|
|
565
|
+
this.props.listener?.onVideoFullscreenPlayerDidPresent?.();
|
|
566
|
+
};
|
|
567
|
+
|
|
568
|
+
onVideoFullscreenPlayerWillDismiss = () => {
|
|
569
|
+
this.props.listener?.onVideoFullscreenPlayerWillDismiss?.();
|
|
570
|
+
};
|
|
571
|
+
|
|
572
|
+
onVideoFullscreenPlayerWillPresent = () => {
|
|
573
|
+
this.props.listener?.onVideoFullscreenPlayerWillPresent?.();
|
|
574
|
+
};
|
|
575
|
+
|
|
576
|
+
onPlayerClose = () => {
|
|
577
|
+
this.props.listener?.onPlayerClose?.();
|
|
578
|
+
};
|
|
579
|
+
|
|
558
580
|
onPiPEnter = () => {
|
|
559
581
|
this.setState({ piped: true });
|
|
560
582
|
this.props.openPiP();
|
|
@@ -759,7 +781,6 @@ export default class VideoPlayer extends React.Component<
|
|
|
759
781
|
render() {
|
|
760
782
|
const {
|
|
761
783
|
castAction,
|
|
762
|
-
controls,
|
|
763
784
|
docked,
|
|
764
785
|
entry,
|
|
765
786
|
fullscreen,
|
|
@@ -817,17 +838,31 @@ export default class VideoPlayer extends React.Component<
|
|
|
817
838
|
const liveCatchUpEnabled =
|
|
818
839
|
this.props.pluginConfiguration?.liveCatchUpEnabled;
|
|
819
840
|
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
: {};
|
|
841
|
+
// TODO: Get screen data more reliable way useCurrentScreenData
|
|
842
|
+
const screenData = getTargetScreenDataFromEntry(this.props.playableItem);
|
|
823
843
|
|
|
824
|
-
const
|
|
844
|
+
const isInlineTV = screenData?.ui_components?.length > 0 && isTV();
|
|
845
|
+
|
|
846
|
+
let platformSpecificProps: any = isApplePlatform()
|
|
825
847
|
? {
|
|
826
|
-
...hideNativeControls,
|
|
827
848
|
resizeMode: nativeResizeMode,
|
|
828
849
|
}
|
|
829
850
|
: {};
|
|
830
851
|
|
|
852
|
+
const supportsNativeControls =
|
|
853
|
+
!!this.props.controller?.supportsNativeControls?.();
|
|
854
|
+
|
|
855
|
+
const controls = isAppleTV()
|
|
856
|
+
? supportsNativeControls && !isInlineTV && !this.getPlayNextData()
|
|
857
|
+
: supportsNativeControls && !this.getPlayNextData();
|
|
858
|
+
|
|
859
|
+
const shouldUseNativeControls = controls && !docked;
|
|
860
|
+
|
|
861
|
+
platformSpecificProps = {
|
|
862
|
+
...platformSpecificProps,
|
|
863
|
+
controls: shouldUseNativeControls,
|
|
864
|
+
};
|
|
865
|
+
|
|
831
866
|
const pictureInPictureEnabled =
|
|
832
867
|
this.props.pluginConfiguration?.pictureInPictureEnabled;
|
|
833
868
|
|
|
@@ -835,7 +870,6 @@ export default class VideoPlayer extends React.Component<
|
|
|
835
870
|
entry, // Must be passed first in list
|
|
836
871
|
...platformSpecificProps,
|
|
837
872
|
audioTrackId,
|
|
838
|
-
controls,
|
|
839
873
|
docked,
|
|
840
874
|
enableAutoAudioTrackSelection,
|
|
841
875
|
fullscreen, // TODO: Check fullscreen params not crash
|
|
@@ -890,22 +924,17 @@ export default class VideoPlayer extends React.Component<
|
|
|
890
924
|
onVideoEnd: this.onVideoEnd, // complete
|
|
891
925
|
onVideoError: this.onVideoError, // error
|
|
892
926
|
onVideoProgress: this.onVideoProgress,
|
|
893
|
-
onVideoFullscreenPlayerDidDismiss: this.
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
onVideoFullscreenPlayerWillDismiss: this.unHandledEvent(
|
|
900
|
-
"onVideoFullscreenPlayerWillDismiss"
|
|
901
|
-
),
|
|
902
|
-
onVideoFullscreenPlayerWillPresent: this.unHandledEvent(
|
|
903
|
-
"onVideoFullscreenPlayerWillPresent"
|
|
904
|
-
),
|
|
927
|
+
onVideoFullscreenPlayerDidDismiss: this.onVideoFullscreenPlayerDidDismiss,
|
|
928
|
+
onVideoFullscreenPlayerDidPresent: this.onVideoFullscreenPlayerDidPresent,
|
|
929
|
+
onVideoFullscreenPlayerWillDismiss:
|
|
930
|
+
this.onVideoFullscreenPlayerWillDismiss,
|
|
931
|
+
onVideoFullscreenPlayerWillPresent:
|
|
932
|
+
this.onVideoFullscreenPlayerWillPresent,
|
|
905
933
|
onVideoLoad: this.onVideoLoad,
|
|
906
934
|
onVideoLoadStart: this.unHandledEvent("onVideoLoadStart"),
|
|
907
935
|
onVideoBuffer: this.onVideoBuffer,
|
|
908
936
|
onPlaybackStalled: this.onPlaybackStalled,
|
|
937
|
+
onPlayerClose: this.onPlayerClose,
|
|
909
938
|
onPlayerAttached: this.onPlayerAttached,
|
|
910
939
|
onPlayerDetached: this.onPlayerDetached,
|
|
911
940
|
};
|
|
@@ -979,7 +1008,7 @@ export default class VideoPlayer extends React.Component<
|
|
|
979
1008
|
!needToShowPlayNextOverlay &&
|
|
980
1009
|
this.props.mode !== "PIP";
|
|
981
1010
|
|
|
982
|
-
if (
|
|
1011
|
+
if (shouldUseNativeControls) {
|
|
983
1012
|
return null;
|
|
984
1013
|
}
|
|
985
1014
|
|