@desynova-digital/player 3.4.0 → 3.7.0

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.
@@ -290,9 +290,11 @@ 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
+ if (!seek) {
296
+ this.actions.play();
297
+ }
296
298
  this.actions.handleVideoRewind(false);
297
299
  this.actions.seek(start_time);
298
300
  this.actions.handleVideoPreview(true);
@@ -384,6 +384,15 @@ 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' },
@@ -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)) {
@@ -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",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@desynova-digital/player",
3
- "version": "3.4.0",
3
+ "version": "3.7.0",
4
4
  "description": "Video Player Package for Contido Application",
5
5
  "main": "index.js",
6
6
  "scripts": {