@desynova-digital/player 3.5.0 → 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.
- package/Manager.js +0 -0
- package/actions/player.js +0 -0
- package/actions/video.js +0 -0
- package/colors.js +0 -0
- package/components/AudioMeter.js +0 -0
- package/components/BigPlayButton.js +0 -0
- package/components/ImageViewer.js +0 -0
- package/components/MarkerBar.js +0 -0
- package/components/Menu.js +0 -0
- package/components/Player.js +2 -2
- package/components/PlayerHeader.js +0 -0
- package/components/Playlist.js +0 -0
- package/components/PointersBar.js +0 -0
- package/components/PosterImage.js +0 -0
- package/components/SDOutline.js +0 -0
- package/components/Shortcut.js +2 -2
- package/components/Slider.js +0 -0
- package/components/TagsBar.js +0 -0
- package/components/Video.js +28 -14
- package/components/control-bar/AudioTracksMenuButton.js +0 -0
- package/components/control-bar/CameraButton.js +7 -1
- package/components/control-bar/CommentsButton.js +0 -0
- package/components/control-bar/ControlBar.js +3 -0
- package/components/control-bar/EditorControlMenuButton.js +0 -0
- package/components/control-bar/ForwardControl.js +0 -0
- package/components/control-bar/ForwardReplayControl.js +0 -0
- package/components/control-bar/FullscreenToggle.js +0 -0
- package/components/control-bar/PlayToggle.js +0 -0
- package/components/control-bar/ReplayControl.js +0 -0
- package/components/control-bar/SettingsMenuButton.js +0 -0
- package/components/control-bar/SubtitleLanguagesMenuButton.js +0 -0
- package/components/control-bar/VolumeMenuButton.js +0 -0
- package/components/control-bar/ZoomMenuButton.js +0 -0
- package/components/marking-controls/MarkInControl.js +0 -0
- package/components/marking-controls/MarkOutControl.js +0 -0
- package/components/marking-controls/MarkingAddButton.js +0 -0
- package/components/marking-controls/MarkingControl.js +0 -0
- package/components/marking-controls/MarkingDeleteButton.js +0 -0
- package/components/marking-controls/MarkingDuration.js +0 -0
- package/components/marking-controls/MarkingPreview.js +0 -0
- package/components/progress-bar/AudioWaveform.js +0 -0
- package/components/progress-bar/LoadProgressBar.js +0 -0
- package/components/progress-bar/MouseTimeDisplay.js +0 -0
- package/components/progress-bar/PlayProgressBar.js +0 -0
- package/components/progress-bar/ProgressControl.js +0 -0
- package/components/progress-bar/SeekBar.js +0 -0
- package/components/progress-bar/Timeline.js +0 -0
- package/components/settings-menu-control/PlaybackRateControl.js +0 -0
- package/components/settings-menu-control/SafeAreaControl.js +0 -0
- package/components/settings-menu-control/SettingsMenu.js +0 -0
- package/components/settings-menu-control/SubtitleControl.js +0 -0
- package/components/time-controls/CurrentTimeDisplay.js +0 -0
- package/components/time-controls/DurationDisplay.js +0 -0
- package/components/time-controls/TimeDivider.js +0 -0
- package/components/volume-control/VolumeBar.js +0 -0
- package/components/volume-control/VolumeControl.js +0 -0
- package/components/volume-control/VolumeLevel.js +0 -0
- package/components/zoom-control/ZoomBar.js +0 -0
- package/components/zoom-control/ZoomLevel.js +0 -0
- package/index.js +0 -0
- package/package.json +1 -1
- package/reducers/index.js +0 -0
- package/reducers/operation.js +0 -0
- package/reducers/player.js +1 -1
- package/utils/browser.js +0 -0
- package/utils/dom.js +0 -0
- package/utils/fullscreen.js +0 -0
- package/utils/index.js +0 -0
package/Manager.js
CHANGED
|
File without changes
|
package/actions/player.js
CHANGED
|
File without changes
|
package/actions/video.js
CHANGED
|
File without changes
|
package/colors.js
CHANGED
|
File without changes
|
package/components/AudioMeter.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/components/MarkerBar.js
CHANGED
|
File without changes
|
package/components/Menu.js
CHANGED
|
File without changes
|
package/components/Player.js
CHANGED
|
@@ -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);
|
|
File without changes
|
package/components/Playlist.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/components/SDOutline.js
CHANGED
|
File without changes
|
package/components/Shortcut.js
CHANGED
|
@@ -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
|
}
|
package/components/Slider.js
CHANGED
|
File without changes
|
package/components/TagsBar.js
CHANGED
|
File without changes
|
package/components/Video.js
CHANGED
|
@@ -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.
|
|
765
|
+
return ele.start_time <= currentTime && ele.end_time >= currentTime;
|
|
759
766
|
});
|
|
760
767
|
var style = this.getSubtitleStyle(currentValue[0]);
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
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
|
/*
|
|
File without changes
|
|
@@ -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
|
-
|
|
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
|
|
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
package/reducers/index.js
CHANGED
|
File without changes
|
package/reducers/operation.js
CHANGED
|
File without changes
|
package/reducers/player.js
CHANGED
package/utils/browser.js
CHANGED
|
File without changes
|
package/utils/dom.js
CHANGED
|
File without changes
|
package/utils/fullscreen.js
CHANGED
|
File without changes
|
package/utils/index.js
CHANGED
|
File without changes
|