@desynova-digital/player 3.3.2 → 3.5.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.
Files changed (68) hide show
  1. package/Manager.js +0 -0
  2. package/actions/player.js +6 -2
  3. package/actions/video.js +0 -0
  4. package/colors.js +0 -0
  5. package/components/AudioMeter.js +0 -0
  6. package/components/BigPlayButton.js +0 -0
  7. package/components/ImageViewer.js +0 -0
  8. package/components/MarkerBar.js +0 -0
  9. package/components/Menu.js +0 -0
  10. package/components/Player.js +2 -2
  11. package/components/PlayerHeader.js +12 -3
  12. package/components/Playlist.js +0 -0
  13. package/components/PointersBar.js +0 -0
  14. package/components/PosterImage.js +0 -0
  15. package/components/SDOutline.js +0 -0
  16. package/components/Shortcut.js +2 -2
  17. package/components/Slider.js +0 -0
  18. package/components/TagsBar.js +0 -0
  19. package/components/Video.js +29 -15
  20. package/components/control-bar/AudioTracksMenuButton.js +2 -2
  21. package/components/control-bar/CameraButton.js +7 -1
  22. package/components/control-bar/CommentsButton.js +0 -0
  23. package/components/control-bar/ControlBar.js +3 -0
  24. package/components/control-bar/EditorControlMenuButton.js +0 -0
  25. package/components/control-bar/ForwardControl.js +0 -0
  26. package/components/control-bar/ForwardReplayControl.js +0 -0
  27. package/components/control-bar/FullscreenToggle.js +0 -0
  28. package/components/control-bar/PlayToggle.js +0 -0
  29. package/components/control-bar/ReplayControl.js +0 -0
  30. package/components/control-bar/SettingsMenuButton.js +0 -0
  31. package/components/control-bar/SubtitleLanguagesMenuButton.js +0 -0
  32. package/components/control-bar/VolumeMenuButton.js +0 -0
  33. package/components/control-bar/ZoomMenuButton.js +0 -0
  34. package/components/marking-controls/MarkInControl.js +0 -0
  35. package/components/marking-controls/MarkOutControl.js +0 -0
  36. package/components/marking-controls/MarkingAddButton.js +0 -0
  37. package/components/marking-controls/MarkingControl.js +0 -0
  38. package/components/marking-controls/MarkingDeleteButton.js +0 -0
  39. package/components/marking-controls/MarkingDuration.js +0 -0
  40. package/components/marking-controls/MarkingPreview.js +0 -0
  41. package/components/progress-bar/AudioWaveform.js +0 -0
  42. package/components/progress-bar/LoadProgressBar.js +0 -0
  43. package/components/progress-bar/MouseTimeDisplay.js +0 -0
  44. package/components/progress-bar/PlayProgressBar.js +0 -0
  45. package/components/progress-bar/ProgressControl.js +0 -0
  46. package/components/progress-bar/SeekBar.js +0 -0
  47. package/components/progress-bar/Timeline.js +0 -0
  48. package/components/settings-menu-control/PlaybackRateControl.js +0 -0
  49. package/components/settings-menu-control/SafeAreaControl.js +0 -0
  50. package/components/settings-menu-control/SettingsMenu.js +0 -0
  51. package/components/settings-menu-control/SubtitleControl.js +0 -0
  52. package/components/time-controls/CurrentTimeDisplay.js +0 -0
  53. package/components/time-controls/DurationDisplay.js +0 -0
  54. package/components/time-controls/TimeDivider.js +0 -0
  55. package/components/volume-control/VolumeBar.js +0 -0
  56. package/components/volume-control/VolumeControl.js +0 -0
  57. package/components/volume-control/VolumeLevel.js +0 -0
  58. package/components/zoom-control/ZoomBar.js +0 -0
  59. package/components/zoom-control/ZoomLevel.js +0 -0
  60. package/index.js +0 -0
  61. package/package.json +1 -1
  62. package/reducers/index.js +0 -0
  63. package/reducers/operation.js +0 -0
  64. package/reducers/player.js +1 -1
  65. package/utils/browser.js +0 -0
  66. package/utils/dom.js +0 -0
  67. package/utils/fullscreen.js +0 -0
  68. package/utils/index.js +0 -0
package/Manager.js CHANGED
File without changes
package/actions/player.js CHANGED
@@ -149,7 +149,9 @@ function forward(seconds) {
149
149
  source: ''
150
150
  };
151
151
 
152
- this.video.pause();
152
+ if (seconds < 1) {
153
+ this.video.pause();
154
+ }
153
155
  this.video.forward(seconds);
154
156
 
155
157
  return {
@@ -165,7 +167,9 @@ function replay(seconds) {
165
167
  source: ''
166
168
  };
167
169
 
168
- this.video.pause();
170
+ if (seconds < 1) {
171
+ this.video.pause();
172
+ }
169
173
  this.video.replay(seconds);
170
174
 
171
175
  return {
package/actions/video.js CHANGED
File without changes
package/colors.js CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -290,9 +290,9 @@ var Player = function (_Component) {
290
290
  }
291
291
  }, {
292
292
  key: 'onSegmentClick',
293
- value: function onSegmentClick(start_time, end_time) {
293
+ value: function onSegmentClick(start_time, end_time, seek) {
294
294
  this.actions.handleMarkerUpdate(start_time, end_time);
295
- this.actions.play();
295
+ seek ? this.actions.pause() : this.actions.play();
296
296
  this.actions.handleVideoRewind(false);
297
297
  this.actions.seek(start_time);
298
298
  this.actions.handleVideoPreview(true);
@@ -78,7 +78,7 @@ var VideoTitle = _styledComponents2.default.button.withConfig({
78
78
  var PlayerDetails = _styledComponents2.default.div.withConfig({
79
79
  displayName: 'PlayerHeader__PlayerDetails',
80
80
  componentId: 'conl4h-2'
81
- })(['margin-left:20px;text-align:left;.video-bottom-container{display:flex;justify-content:flex-start;align-items:center;margin-top:8px;.video-sub-title{color:#afb2ba;font-size:10px;font-family:SFUIText-Medium;margin-right:5px;}.version-category{font-size:10px;letter-spacing:0.4px;color:#fff;font-family:SFUIText-Regular;text-transform:uppercase;}.versions-dropdown-block{position:relative;&:hover{.active-version{cursor:pointer;border-color:#00cec6 !important;}.versions-dropdown-container{visibility:visible;opacity:1;}}.active-version{transition:all 350ms ease-in-out;border:1px solid #fff;border-radius:10px;margin-left:5px;padding:3px 10px;color:#fff;font-size:10px;font-family:SFUIText-Regular;font-weight:bold;pointer-events:none;}.versions-dropdown-container{padding-top:15px;position:absolute;top:13px;left:50%;transform:translateX(-50%);visibility:hidden;opacity:0;transition:all 450ms ease-in-out;&:after{content:\'\';border-bottom:6px solid #00cec6;border-right:6px solid transparent;border-left:6px solid transparent;position:absolute;top:9px;left:50%;transform:translateX(-50%);}.versions-container{overflow-y:auto;overflow-x:hidden;max-height:204px;box-shadow:0px 12px 24px rgb(0 0 0 / 20%);min-width:250px;background:#fff;border-radius:10px;.ingest-versions-container{border-bottom:1px solid rgba(0,0,0,0.1);padding:10px 15px;.ingest-version-block{display:flex;justify-content:space-between;align-items:center;.upload-type{width:6px;height:6px;border-radius:100%;overflow:hidden;left:5px;position:absolute;}.ingest-version-name{color:#182738;font-size:11px;font-family:SFUIText-Regular;font-weight:bold;margin-right:10px;}.video-versions-container{display:inline-flex;align-items:center;.more-dropdown-icon{padding-top:8px;cursor:pointer;}path{fill:#182738;}}}}&::-webkit-scrollbar{width:5px;background-color:#6d6a6a;}}}}.video-time-block{margin-left:5px;.tv-time,.ott-time{display:flex;justify-content:center;align-items:center;margin-left:10px;font-size:10px;p{margin-left:5px;color:#afb2ba;}}}}']);
81
+ })(['margin-left:20px;text-align:left;.video-bottom-container{display:flex;justify-content:flex-start;align-items:center;margin-top:8px;.video-sub-title{color:#afb2ba;font-size:10px;font-family:SFUIText-Medium;margin-right:5px;}.version-category{font-size:10px;letter-spacing:0.4px;color:#fff;font-family:SFUIText-Regular;text-transform:uppercase;}.versions-dropdown-block{position:relative;&:hover{.active-version{cursor:pointer;border-color:#00cec6 !important;}.versions-dropdown-container{visibility:visible;opacity:1;}}.active-version{transition:all 350ms ease-in-out;border:1px solid #fff;border-radius:10px;margin-left:5px;padding:3px 10px;color:#fff;font-size:10px;font-family:SFUIText-Regular;font-weight:bold;pointer-events:none;}.versions-dropdown-container{padding-top:15px;position:absolute;top:13px;left:50%;transform:translateX(-50%);visibility:hidden;opacity:0;transition:all 450ms ease-in-out;&:after{content:\'\';border-bottom:6px solid #00cec6;border-right:6px solid transparent;border-left:6px solid transparent;position:absolute;top:9px;left:50%;transform:translateX(-50%);}.versions-container{overflow-y:auto;overflow-x:hidden;max-height:204px;box-shadow:0px 12px 24px rgb(0 0 0 / 20%);min-width:250px;background:#fff;border-radius:10px;.ingest-versions-container{border-bottom:1px solid rgba(0,0,0,0.1);padding:10px 15px;.ingest-version-block{display:flex;justify-content:space-between;align-items:center;.upload-type{width:6px;height:6px;border-radius:100%;overflow:hidden;left:5px;position:absolute;}.ingest-version-name{color:#182738;font-size:11px;font-family:SFUIText-Regular;font-weight:bold;margin-right:10px;}.video-versions-container{display:inline-flex;align-items:center;.more-dropdown-icon{padding-top:8px;cursor:pointer;}path{fill:#182738;}}}}&::-webkit-scrollbar{width:5px;background-color:#6d6a6a;}}}}.video-time-block{margin-left:5px;display:flex;justify-content:center;align-items:center;.tv-time,.ott-time{display:flex;justify-content:center;align-items:center;margin-left:10px;p{margin-left:5px;color:rgb(175,178,186);font-family:\'SFUIText-Regular\';font-size:10px;align-self:self-end;}}}}']);
82
82
 
83
83
  var VersionBlock = _styledComponents2.default.div.withConfig({
84
84
  displayName: 'PlayerHeader__VersionBlock',
@@ -384,10 +384,19 @@ var PlayerHeader = function (_Component) {
384
384
  _react2.default.createElement(
385
385
  'div',
386
386
  { className: 'video-time-block' },
387
+ videoDetails.txDate ? _react2.default.createElement(
388
+ 'div',
389
+ { className: 'tv-time' },
390
+ _react2.default.createElement(
391
+ 'p',
392
+ null,
393
+ videoDetails.txDate
394
+ )
395
+ ) : null,
387
396
  videoDetails.tvTime ? _react2.default.createElement(
388
397
  'div',
389
398
  { className: 'tv-time' },
390
- _react2.default.createElement(_components.Icon, { name: 'tv', width: 10, height: 9, color: '#afb2ba' }),
399
+ _react2.default.createElement(_components.Icon, { name: 'tv', width: 14, height: 12, color: '#afb2ba' }),
391
400
  _react2.default.createElement(
392
401
  'p',
393
402
  null,
@@ -397,7 +406,7 @@ var PlayerHeader = function (_Component) {
397
406
  videoDetails.ottTime ? _react2.default.createElement(
398
407
  'div',
399
408
  { className: 'ott-time' },
400
- _react2.default.createElement(_components.Icon, { name: 'ott', width: 10, height: 14, color: '#afb2ba' }),
409
+ _react2.default.createElement(_components.Icon, { name: 'tablet', width: 16, height: 12, color: '#afb2ba' }),
401
410
  _react2.default.createElement(
402
411
  'p',
403
412
  null,
File without changes
File without changes
File without changes
File without changes
@@ -201,8 +201,8 @@ var Shortcut = function (_Component) {
201
201
  if (playerReadOnlyMode || disablePlayerActions.includes("marking_controls")) {
202
202
  return;
203
203
  }
204
+ var createPoint = true;
204
205
  if (playerType !== 'panel') {
205
- var createPoint = true;
206
206
  if (markers && markers.length && markers[0].values && markers[0].values.length) {
207
207
  var markerArr = markers[0].values;
208
208
  if (Object.keys(player.selectedMarker).length) {
@@ -230,7 +230,7 @@ var Shortcut = function (_Component) {
230
230
  // }
231
231
  }
232
232
  }
233
- if (player.leftMarker > -1 && player.currentTime > -1 && player.markerCreate) {
233
+ if (player.leftMarker > -1 && player.currentTime > -1 && player.markerCreate && createPoint && player.currentTime > player.leftMarker) {
234
234
  actions.handleMarkerPointChange('create');
235
235
  onAddMarker(player.leftMarker, player.currentTime);
236
236
  }
File without changes
File without changes
@@ -447,7 +447,7 @@ var Video = function (_Component) {
447
447
  }
448
448
  this.forceUpdate(); // make sure the children can get the video property
449
449
  }
450
- if (newProps.player.activeAudio && activeAudio.id !== newProps.player.activeAudio.id) {
450
+ if (newProps.player.activeAudio && activeAudio && activeAudio.id !== newProps.player.activeAudio.id) {
451
451
  this.hls.audioTrack = newProps.player.activeAudio.id;
452
452
  }
453
453
  if (newProps.subtitleObj && newProps.subtitleObj.field && JSON.stringify(newProps.subtitleObj) !== JSON.stringify(currentSubtitleObj)) {
@@ -461,6 +461,8 @@ var Video = function (_Component) {
461
461
  currentSubtitleObj: {
462
462
  line1: newProps.subtitleObj.field.line1,
463
463
  line2: newProps.subtitleObj.field.line2,
464
+ start_time: newProps.subtitleObj.field.in_time,
465
+ end_time: newProps.subtitleObj.field.out_time,
464
466
  style: style
465
467
  }
466
468
  });
@@ -469,6 +471,9 @@ var Video = function (_Component) {
469
471
  if (newProps.markers.length && markers.length && newProps.markers[0].values.length !== markers[0].values.length) {
470
472
  this.displaySubtitle(newProps.markers);
471
473
  }
474
+ if (newProps.subtitleReadOnly && newProps.subtitleDataList) {
475
+ this.displaySubtitle(newProps.subtitleDataList);
476
+ }
472
477
  }
473
478
 
474
479
  // play the video
@@ -551,7 +556,6 @@ var Video = function (_Component) {
551
556
  key: 'forward',
552
557
  value: function forward(seconds) {
553
558
  this.seek(this.video.currentTime + seconds);
554
- this.displaySubtitle();
555
559
  }
556
560
 
557
561
  // jump back x seconds
@@ -560,7 +564,6 @@ var Video = function (_Component) {
560
564
  key: 'replay',
561
565
  value: function replay(seconds) {
562
566
  this.forward(-seconds);
563
- this.displaySubtitle();
564
567
  }
565
568
 
566
569
  // enter or exist full screen
@@ -706,7 +709,6 @@ var Video = function (_Component) {
706
709
  if (onDurationChange) {
707
710
  onDurationChange.apply(undefined, arguments);
708
711
  }
709
- this.displaySubtitle();
710
712
  }
711
713
 
712
714
  /*
@@ -728,7 +730,6 @@ var Video = function (_Component) {
728
730
  if (onProgress) {
729
731
  onProgress.apply(undefined, arguments);
730
732
  }
731
- this.displaySubtitle();
732
733
  }
733
734
  }, {
734
735
  key: 'getSubtitleStyle',
@@ -745,26 +746,40 @@ var Video = function (_Component) {
745
746
  value: function displaySubtitle(marker) {
746
747
  var _props14 = this.props,
747
748
  markers = _props14.markers,
748
- resetSubtitleData = _props14.resetSubtitleData;
749
+ resetSubtitleData = _props14.resetSubtitleData,
750
+ subtitleReadOnly = _props14.subtitleReadOnly,
751
+ subtitleDataList = _props14.subtitleDataList;
752
+ var currentSubtitleObj = this.state.currentSubtitleObj;
749
753
 
750
754
  if (resetSubtitleData) {
751
755
  resetSubtitleData();
752
756
  }
753
757
  var currentTime = this.video.currentTime;
754
758
  var currentMarker = marker || markers;
759
+ if (subtitleReadOnly) {
760
+ currentMarker = marker || subtitleDataList;
761
+ }
755
762
  if (currentMarker && currentMarker[0] && currentMarker[0].name === "Subtitle") {
756
763
  var values = currentMarker[0].values;
757
764
  var currentValue = values.filter(function (ele) {
758
- return ele.in_time <= currentTime && ele.out_time >= currentTime;
765
+ return ele.start_time <= currentTime && ele.end_time >= currentTime;
759
766
  });
760
767
  var style = this.getSubtitleStyle(currentValue[0]);
761
- this.setState({
762
- currentSubtitleObj: {
763
- line1: currentValue[0] && currentValue[0].line1 || '',
764
- line2: currentValue[0] && currentValue[0].line2 || '',
765
- style: style
766
- }
767
- });
768
+ var currentLine1 = currentSubtitleObj && currentSubtitleObj.line1 || '';
769
+ var propsLine1 = currentValue[0] && currentValue[0].line1 || '';
770
+ if (currentValue && currentValue.length && (currentSubtitleObj.start_time === currentValue[0].start_time || currentSubtitleObj.end_time === currentValue[0].end_time) && currentLine1 === propsLine1 || Object.keys(currentSubtitleObj).length && currentValue.length && currentValue.length === currentSubtitleObj.start_time.length && currentValue.length === currentSubtitleObj.end_time.length && currentLine1 === propsLine1) {
771
+ return;
772
+ } else {
773
+ this.setState({
774
+ currentSubtitleObj: {
775
+ line1: currentValue[0] && currentValue[0].line1 || '',
776
+ line2: currentValue[0] && currentValue[0].line2 || '',
777
+ start_time: currentValue[0] && currentValue[0].start_time || '',
778
+ end_time: currentValue[0] && currentValue[0].end_time || '',
779
+ style: style
780
+ }
781
+ });
782
+ }
768
783
  }
769
784
  }
770
785
 
@@ -828,7 +843,6 @@ var Video = function (_Component) {
828
843
  if (onSeeking) {
829
844
  onSeeking.apply(undefined, arguments);
830
845
  }
831
- this.displaySubtitle();
832
846
  }
833
847
 
834
848
  /*
@@ -88,12 +88,12 @@ var AudioTracksMenuButton = function (_Component) {
88
88
  },
89
89
  role: 'presentation',
90
90
  key: track.id,
91
- style: player.activeAudio.id === track.id ? { pointerEvents: 'none' } : null
91
+ style: player.activeAudio && player.activeAudio.id === track.id ? { pointerEvents: 'none' } : null
92
92
  },
93
93
  _react2.default.createElement(
94
94
  'p',
95
95
  {
96
- style: player.activeAudio.id === track.id ? { color: '#00cec6', pointerEvents: 'none' } : { color: '#333333' }
96
+ style: player.activeAudio && player.activeAudio.id === track.id ? { color: '#00cec6', pointerEvents: 'none' } : { color: '#333333' }
97
97
  },
98
98
  track.name
99
99
  )
@@ -18,6 +18,8 @@ var _styledComponents2 = _interopRequireDefault(_styledComponents);
18
18
 
19
19
  var _components = require("@desynova-digital/components");
20
20
 
21
+ var _utils = require("../../utils");
22
+
21
23
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
22
24
 
23
25
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
@@ -56,7 +58,11 @@ var CameraButton = function (_Component) {
56
58
  onTakeSnapshot = _props.onTakeSnapshot,
57
59
  video = _props.video;
58
60
 
59
- onTakeSnapshot(video.currentTime);
61
+ var timeObj = {
62
+ "thumbnail": (0, _utils.secondsToTime)(this.props.video.currentTime, this.props.frameRate, this.props.initialTime),
63
+ "thumbnail_seconds": this.props.video.currentTime
64
+ };
65
+ onTakeSnapshot(timeObj);
60
66
  }
61
67
  }, {
62
68
  key: "render",
File without changes
@@ -191,6 +191,9 @@ var ControlBar = function (_Component) {
191
191
  }, this.props, {
192
192
  key: 'volume-menu-button',
193
193
  order: 8
194
+ })), _react2.default.createElement(_SubtitleLanguagesMenuButton2.default, _extends({}, this.props, {
195
+ key: 'subtitle-menu-button',
196
+ order: 8
194
197
  })), _react2.default.createElement(_CameraButton2.default, {
195
198
  order: 9,
196
199
  playerType: playerType
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/index.js CHANGED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@desynova-digital/player",
3
- "version": "3.3.2",
3
+ "version": "3.5.1",
4
4
  "description": "Video Player Package for Contido Application",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/reducers/index.js CHANGED
File without changes
File without changes
@@ -45,7 +45,7 @@ var initialState = {
45
45
  previewActive: false,
46
46
  audioTracksArr: [],
47
47
  activeAudio: {},
48
- markerCreate: true,
48
+ markerCreate: false,
49
49
  rewindActive: false,
50
50
  HLSConfig: {
51
51
  debug: true,
package/utils/browser.js CHANGED
File without changes
package/utils/dom.js CHANGED
File without changes
File without changes
package/utils/index.js CHANGED
File without changes