@applicaster/quick-brick-player 15.0.0-rc.113 → 15.0.0-rc.115

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.0.0-rc.113",
3
+ "version": "15.0.0-rc.115",
4
4
  "description": "Quick Brick Player",
5
5
  "main": "./src/index.ts",
6
6
  "types": "index.d.ts",
@@ -35,11 +35,11 @@
35
35
  },
36
36
  "homepage": "https://github.com/applicaster/quickbrick#readme",
37
37
  "dependencies": {
38
- "@applicaster/quick-brick-mobile-transport-controls": "15.0.0-rc.91",
39
- "@applicaster/quick-brick-tv-transport-controls": "15.0.0-rc.91",
40
- "@applicaster/zapp-react-native-tvos-app": "15.0.0-rc.113",
41
- "@applicaster/zapp-react-native-ui-components": "15.0.0-rc.113",
42
- "@applicaster/zapp-react-native-utils": "15.0.0-rc.113",
38
+ "@applicaster/quick-brick-mobile-transport-controls": "15.0.0-rc.115",
39
+ "@applicaster/quick-brick-tv-transport-controls": "15.0.0-rc.115",
40
+ "@applicaster/zapp-react-native-tvos-app": "15.0.0-rc.115",
41
+ "@applicaster/zapp-react-native-ui-components": "15.0.0-rc.115",
42
+ "@applicaster/zapp-react-native-utils": "15.0.0-rc.115",
43
43
  "query-string": "7.1.3",
44
44
  "shaka-player": "4.3.5",
45
45
  "typeface-montserrat": "^0.0.54",
@@ -7,8 +7,12 @@ import * as R from "ramda";
7
7
 
8
8
  import { findNodeHandle, StyleSheet, View, ViewStyle } from "react-native";
9
9
 
10
- import TransportControlsMobile from "@applicaster/quick-brick-mobile-transport-controls";
11
- import TransportControlsTV from "@applicaster/quick-brick-tv-transport-controls";
10
+ import TransportControlsMobile, {
11
+ ErrorOverlay,
12
+ } from "@applicaster/quick-brick-mobile-transport-controls";
13
+ import TransportControlsTV, {
14
+ ErrorOverlay as TVErrorOverlay,
15
+ } from "@applicaster/quick-brick-tv-transport-controls";
12
16
 
13
17
  import { AudioPlayer } from "@applicaster/zapp-react-native-ui-components/Components/AudioPlayer";
14
18
  import {
@@ -102,6 +106,7 @@ export default class VideoPlayer extends React.Component<
102
106
  isLive?: boolean;
103
107
  seekableDuration?: number;
104
108
  displayOverlay?: boolean;
109
+ error: PlayerError | null;
105
110
  }
106
111
  > {
107
112
  public static propTypes = {};
@@ -121,6 +126,7 @@ export default class VideoPlayer extends React.Component<
121
126
  isLive?: boolean;
122
127
  seekableDuration?: number;
123
128
  displayOverlay?: boolean;
129
+ error: PlayerError | null;
124
130
  } = {
125
131
  // Base required properties from NativePlayerState
126
132
  buffering: false,
@@ -131,7 +137,7 @@ export default class VideoPlayer extends React.Component<
131
137
  isTabletPortrait: false,
132
138
  muted: false,
133
139
  showPoster: false,
134
-
140
+ error: null,
135
141
  // Extended properties
136
142
  audioTrackId: null,
137
143
  textTrackId: null,
@@ -462,6 +468,8 @@ export default class VideoPlayer extends React.Component<
462
468
 
463
469
  const newError = new PlayerError(error, description);
464
470
 
471
+ this.setState({ error: newError });
472
+
465
473
  return this.props?.listener?.onError(newError);
466
474
  };
467
475
 
@@ -749,7 +757,7 @@ export default class VideoPlayer extends React.Component<
749
757
  }
750
758
 
751
759
  renderPlayerContent(playerDimensions: ViewStyle) {
752
- const { entry, docked } = this.props;
760
+ const { entry, docked, fullscreen } = this.props;
753
761
  const { isAd, piped } = this.state;
754
762
 
755
763
  const pluginConfiguration = this.getPluginConfiguration();
@@ -812,6 +820,20 @@ export default class VideoPlayer extends React.Component<
812
820
  pluginConfiguration
813
821
  );
814
822
 
823
+ if (this.state.error) {
824
+ return (
825
+ <View style={styles.container}>
826
+ <ErrorOverlay
827
+ error={this.state.error}
828
+ onClose={() => playerManager.close()}
829
+ configuration={pluginConfiguration}
830
+ docked={docked}
831
+ fullscreen={fullscreen}
832
+ />
833
+ </View>
834
+ );
835
+ }
836
+
815
837
  return (
816
838
  <View style={styles.container}>
817
839
  <View style={[playerContainerStyles, playerDimensions]}>
@@ -1346,6 +1368,18 @@ export default class VideoPlayer extends React.Component<
1346
1368
  style: { ...styles.audio, ...this.takeParentStyle },
1347
1369
  };
1348
1370
 
1371
+ if (this.state.error) {
1372
+ return (
1373
+ <View style={this.takeParentStyle} testID={"player-view"}>
1374
+ <TVErrorOverlay
1375
+ error={this.state.error}
1376
+ onClose={() => playerManager.close()}
1377
+ configuration={this.getPluginConfiguration()}
1378
+ />
1379
+ </View>
1380
+ );
1381
+ }
1382
+
1349
1383
  return (
1350
1384
  <View style={this.takeParentStyle} testID={"player-view"}>
1351
1385
  <TVPlayerView