@desynova-digital/player 3.0.0 → 3.0.1

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.
@@ -40,6 +40,8 @@ var _SDOutline = require('./SDOutline');
40
40
 
41
41
  var _SDOutline2 = _interopRequireDefault(_SDOutline);
42
42
 
43
+ var _components = require('@desynova-digital/components/components');
44
+
43
45
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
44
46
 
45
47
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
@@ -113,7 +115,7 @@ var defaultProps = {
113
115
  var VideoBlock = _styledComponents2.default.div.withConfig({
114
116
  displayName: 'Video__VideoBlock',
115
117
  componentId: 'omlcc3-0'
116
- })(['position:relative;&.video-react-player-block{position:relative;transition:all 0.1s ease-in-out;-moz-transition:all 0.1s ease-in-out;-webkit-transition:all 0.1s ease-in-out;-ms-transition:all 0.1s ease-in-out;-o-transition:all 0.1s ease-in-out;video{position:absolute;top:0;left:0;width:100%;height:100%;right:0;bottom:0;}.audio-tracks{position:relative;display:flex;background:rgba(0,0,0,0.5);color:#fff;z-index:10;position:absolute;width:100%;bottom:0;p{cursor:pointer;padding:10px;}}}&.ratio-border{border:1px solid rgba(255,255,255,0.5);&:after{content:\'16:9 Safe Area\';position:absolute;color:#fff;font-family:SFUIText-Regular;font-size:12px;transform:rotate(-90deg);top:20%;left:-50px;}}']);
118
+ })(['position:relative;&.video-react-player-block{position:relative;transition:all 0.1s ease-in-out;-moz-transition:all 0.1s ease-in-out;-webkit-transition:all 0.1s ease-in-out;-ms-transition:all 0.1s ease-in-out;-o-transition:all 0.1s ease-in-out;video{position:absolute;top:0;left:0;width:100%;height:100%;right:0;bottom:0;}.audio-tracks{position:relative;display:flex;background:rgba(0,0,0,0.5);color:#fff;z-index:10;position:absolute;width:100%;bottom:0;p{cursor:pointer;padding:10px;}}.loader-container{width:100%;height:100%;display:flex;justify-content:center;align-items:center;position:absolute;z-index:10;background:rgba(0,0,0,0.5)}}&.ratio-border{border:1px solid rgba(255,255,255,0.5);&:after{content:\'16:9 Safe Area\';position:absolute;color:#fff;font-family:SFUIText-Regular;font-size:12px;transform:rotate(-90deg);top:20%;left:-50px;}}']);
117
119
 
118
120
  var Video = function (_Component) {
119
121
  _inherits(Video, _Component);
@@ -137,7 +139,8 @@ var Video = function (_Component) {
137
139
  'top': '0px',
138
140
  'left': '0px'
139
141
  },
140
- watermarkInterval: -1
142
+ watermarkInterval: -1,
143
+ isBuffering: false
141
144
  };
142
145
  _this.video = null; // the html5 video
143
146
  _this.manager = new _Manager2.default(props.store);
@@ -1089,7 +1092,7 @@ var Video = function (_Component) {
1089
1092
  fileType = _props28.fileType,
1090
1093
  userEmail = _props28.userEmail;
1091
1094
  var _state2 = this.state,
1092
- audioTracks = _state2.audioTracks,
1095
+ isBuffering = _state2.isBuffering,
1093
1096
  watermark = _state2.watermark;
1094
1097
 
1095
1098
 
@@ -1102,6 +1105,16 @@ var Video = function (_Component) {
1102
1105
  _this5.playerBlock = c;
1103
1106
  },
1104
1107
  style: this.getStyle() },
1108
+ isBuffering && _react2.default.createElement(
1109
+ 'div',
1110
+ {
1111
+ className: 'loader-container',
1112
+ onClick: function onClick() {
1113
+ return _this5.togglePlay();
1114
+ }
1115
+ },
1116
+ _react2.default.createElement(_components.Loader, { loaderName: 'SpinningLoader' })
1117
+ ) || null,
1105
1118
  fileType === 'audio' ? _react2.default.createElement(
1106
1119
  _react2.default.Fragment,
1107
1120
  null,
@@ -1196,25 +1209,6 @@ var Video = function (_Component) {
1196
1209
  _react2.default.createElement('track', { kind: 'captions' }),
1197
1210
  this.renderChildren()
1198
1211
  ),
1199
- audioTracks && audioTracks.length ? _react2.default.createElement(
1200
- 'div',
1201
- { className: 'audio-tracks' },
1202
- audioTracks.map(function (track) {
1203
- return _react2.default.createElement(
1204
- 'p',
1205
- {
1206
- key: track.id,
1207
- onClick: function onClick() {
1208
- _this5.changeAudio(track.id);
1209
- },
1210
- role: 'presentation'
1211
- },
1212
- track.name,
1213
- '-',
1214
- track.groupId
1215
- );
1216
- })
1217
- ) : null,
1218
1212
  children,
1219
1213
  _react2.default.createElement(
1220
1214
  'p',
@@ -141,7 +141,7 @@ var ControlBar = function (_Component) {
141
141
  // order={6.1}
142
142
  // />,
143
143
  _react2.default.createElement(_VolumeMenuButton2.default, _extends({
144
- style: playerType === 'snp_edit' || playerType === 'dubbing_review' ? { margin: '0 10px 0 0' } : { margin: 'auto 10px auto auto' }
144
+ style: { margin: 'auto 10px auto auto' }
145
145
  }, this.props, {
146
146
  key: 'volume-menu-button',
147
147
  order: 7
@@ -176,7 +176,7 @@ var ControlBar = function (_Component) {
176
176
  // order={7}
177
177
  // />,
178
178
  _react2.default.createElement(_VolumeMenuButton2.default, _extends({
179
- style: playerType === 'snp_edit' || playerType === 'dubbing_review' ? { margin: '0 10px 0 0' } : { margin: 'auto 10px auto auto' }
179
+ style: { margin: 'auto 10px auto auto' }
180
180
  }, this.props, {
181
181
  key: 'volume-menu-button',
182
182
  order: 8
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@desynova-digital/player",
3
- "version": "3.0.0",
3
+ "version": "3.0.1",
4
4
  "description": "Video Player Package for Contido Application",
5
5
  "main": "index.js",
6
6
  "scripts": {