@desynova-digital/player 4.0.72 → 4.0.74
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/components/Video.js +146 -134
- package/package.json +1 -1
package/components/Video.js
CHANGED
|
@@ -119,6 +119,11 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
119
119
|
_this = _callSuper(this, Video, [props]);
|
|
120
120
|
_defineProperty(_this, "updateAnnotateVisibility", function () {
|
|
121
121
|
if (!_this.video) return;
|
|
122
|
+
var _this$props = _this.props,
|
|
123
|
+
initialTime = _this$props.initialTime,
|
|
124
|
+
frameRate = _this$props.frameRate;
|
|
125
|
+
var currentFormattedTime = (0, _utils.secondsToTime)(_this.video.currentTime, frameRate, initialTime);
|
|
126
|
+
if (currentFormattedTime) _this.props.onAutoScroll(currentFormattedTime);
|
|
122
127
|
var _this$getTimeData = _this.getTimeData(_this.video.currentTime),
|
|
123
128
|
shouldShow = _this$getTimeData.shouldShow;
|
|
124
129
|
if (_this.state.shouldShowAnnotate !== shouldShow) {
|
|
@@ -130,24 +135,31 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
130
135
|
_defineProperty(_this, "onVideoTimeUpdate", function () {
|
|
131
136
|
_this.updateAnnotateVisibility();
|
|
132
137
|
});
|
|
133
|
-
_defineProperty(_this, "buildSmoothPath", function (points) {
|
|
138
|
+
_defineProperty(_this, "buildSmoothPath", function (points, width, height) {
|
|
134
139
|
if (!points || points.length < 2) return '';
|
|
135
|
-
var
|
|
140
|
+
var startX = points[0].x * width;
|
|
141
|
+
var startY = points[0].y * height;
|
|
142
|
+
var path = "M ".concat(startX, " ").concat(startY);
|
|
136
143
|
for (var i = 1; i < points.length - 1; i++) {
|
|
137
|
-
var
|
|
138
|
-
var
|
|
139
|
-
|
|
144
|
+
var currX = points[i].x * width;
|
|
145
|
+
var currY = points[i].y * height;
|
|
146
|
+
var nextX = points[i + 1].x * width;
|
|
147
|
+
var nextY = points[i + 1].y * height;
|
|
148
|
+
var midX = (currX + nextX) / 2;
|
|
149
|
+
var midY = (currY + nextY) / 2;
|
|
150
|
+
path += " Q ".concat(currX, " ").concat(currY, " ").concat(midX, " ").concat(midY);
|
|
140
151
|
}
|
|
141
|
-
var
|
|
142
|
-
|
|
152
|
+
var lastX = points[points.length - 1].x * width;
|
|
153
|
+
var lastY = points[points.length - 1].y * height;
|
|
154
|
+
path += " L ".concat(lastX, " ").concat(lastY);
|
|
143
155
|
return path;
|
|
144
156
|
});
|
|
145
157
|
_defineProperty(_this, "getTimeData", function (time) {
|
|
146
|
-
var _this$
|
|
147
|
-
inTime = _this$
|
|
148
|
-
outTime = _this$
|
|
149
|
-
initialTime = _this$
|
|
150
|
-
frameRate = _this$
|
|
158
|
+
var _this$props2 = _this.props,
|
|
159
|
+
inTime = _this$props2.inTime,
|
|
160
|
+
outTime = _this$props2.outTime,
|
|
161
|
+
initialTime = _this$props2.initialTime,
|
|
162
|
+
frameRate = _this$props2.frameRate;
|
|
151
163
|
var currentFormattedTime = (0, _utils.secondsToTime)(time, frameRate, initialTime);
|
|
152
164
|
var timecodeToSeconds = function timecodeToSeconds(tc) {
|
|
153
165
|
if (!tc || tc === '-1') return null;
|
|
@@ -268,9 +280,9 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
268
280
|
}, {
|
|
269
281
|
key: "componentDidUpdate",
|
|
270
282
|
value: function componentDidUpdate(prevProps) {
|
|
271
|
-
var _this$
|
|
272
|
-
inTime = _this$
|
|
273
|
-
outTime = _this$
|
|
283
|
+
var _this$props3 = this.props,
|
|
284
|
+
inTime = _this$props3.inTime,
|
|
285
|
+
outTime = _this$props3.outTime;
|
|
274
286
|
if (this.props.isSvgLayer && this.props.isSvgLayer !== prevProps.isSvgLayer) {
|
|
275
287
|
this.toggleViaAnnotatePlay();
|
|
276
288
|
}
|
|
@@ -302,9 +314,9 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
302
314
|
*/
|
|
303
315
|
function checkWatermark() {
|
|
304
316
|
var watermark = this.state.watermark;
|
|
305
|
-
var _this$
|
|
306
|
-
onPlayerClose = _this$
|
|
307
|
-
userEmail = _this$
|
|
317
|
+
var _this$props4 = this.props,
|
|
318
|
+
onPlayerClose = _this$props4.onPlayerClose,
|
|
319
|
+
userEmail = _this$props4.userEmail;
|
|
308
320
|
var watermark_text = document.querySelector('#watermark-text');
|
|
309
321
|
var video_player = null;
|
|
310
322
|
var watermark_dimension = null;
|
|
@@ -337,9 +349,9 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
337
349
|
key: "setupHLS",
|
|
338
350
|
value: function setupHLS(src) {
|
|
339
351
|
var _this2 = this;
|
|
340
|
-
var _this$
|
|
341
|
-
actions = _this$
|
|
342
|
-
activeTrackIndex = _this$
|
|
352
|
+
var _this$props5 = this.props,
|
|
353
|
+
actions = _this$props5.actions,
|
|
354
|
+
activeTrackIndex = _this$props5.activeTrackIndex;
|
|
343
355
|
var self = this;
|
|
344
356
|
// bind them together
|
|
345
357
|
this.hls.attachMedia(this.video);
|
|
@@ -465,10 +477,10 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
465
477
|
var _this$manager$getStat2 = this.manager.getState(),
|
|
466
478
|
player = _this$manager$getStat2.player;
|
|
467
479
|
var style = {};
|
|
468
|
-
var _this$
|
|
469
|
-
aspectRatio = _this$
|
|
470
|
-
width = _this$
|
|
471
|
-
height = _this$
|
|
480
|
+
var _this$props6 = this.props,
|
|
481
|
+
aspectRatio = _this$props6.aspectRatio,
|
|
482
|
+
width = _this$props6.width,
|
|
483
|
+
height = _this$props6.height;
|
|
472
484
|
/*
|
|
473
485
|
* The aspect ratio is either used directly
|
|
474
486
|
* or to calculate width and height.
|
|
@@ -571,12 +583,12 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
571
583
|
}, {
|
|
572
584
|
key: "UNSAFE_componentWillReceiveProps",
|
|
573
585
|
value: function UNSAFE_componentWillReceiveProps(newProps) {
|
|
574
|
-
var _this$
|
|
575
|
-
src = _this$
|
|
576
|
-
activeAudio = _this$
|
|
577
|
-
currentSubtitleObj = _this$
|
|
578
|
-
markers = _this$
|
|
579
|
-
playerType = _this$
|
|
586
|
+
var _this$props7 = this.props,
|
|
587
|
+
src = _this$props7.src,
|
|
588
|
+
activeAudio = _this$props7.player.activeAudio,
|
|
589
|
+
currentSubtitleObj = _this$props7.currentSubtitleObj,
|
|
590
|
+
markers = _this$props7.markers,
|
|
591
|
+
playerType = _this$props7.playerType;
|
|
580
592
|
if (markers && markers !== newProps.markers && newProps.markers) {
|
|
581
593
|
this.displaySubtitle(newProps.markers);
|
|
582
594
|
}
|
|
@@ -737,9 +749,9 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
737
749
|
}, {
|
|
738
750
|
key: "toggleFullscreen",
|
|
739
751
|
value: function toggleFullscreen() {
|
|
740
|
-
var _this$
|
|
741
|
-
player = _this$
|
|
742
|
-
actions = _this$
|
|
752
|
+
var _this$props8 = this.props,
|
|
753
|
+
player = _this$props8.player,
|
|
754
|
+
actions = _this$props8.actions;
|
|
743
755
|
actions.toggleFullscreen(player);
|
|
744
756
|
}
|
|
745
757
|
|
|
@@ -750,10 +762,10 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
750
762
|
}, {
|
|
751
763
|
key: "handleLoadStart",
|
|
752
764
|
value: function handleLoadStart() {
|
|
753
|
-
var _this$
|
|
754
|
-
actions = _this$
|
|
755
|
-
onLoadStart = _this$
|
|
756
|
-
fileType = _this$
|
|
765
|
+
var _this$props9 = this.props,
|
|
766
|
+
actions = _this$props9.actions,
|
|
767
|
+
onLoadStart = _this$props9.onLoadStart,
|
|
768
|
+
fileType = _this$props9.fileType;
|
|
757
769
|
if (fileType === 'audio') {
|
|
758
770
|
this.audioVisualizer();
|
|
759
771
|
}
|
|
@@ -770,9 +782,9 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
770
782
|
}, {
|
|
771
783
|
key: "handleCanPlay",
|
|
772
784
|
value: function handleCanPlay() {
|
|
773
|
-
var _this$
|
|
774
|
-
actions = _this$
|
|
775
|
-
onCanPlay = _this$
|
|
785
|
+
var _this$props10 = this.props,
|
|
786
|
+
actions = _this$props10.actions,
|
|
787
|
+
onCanPlay = _this$props10.onCanPlay;
|
|
776
788
|
actions.handleCanPlay(this.getProperties());
|
|
777
789
|
if (onCanPlay) {
|
|
778
790
|
onCanPlay.apply(void 0, arguments);
|
|
@@ -786,9 +798,9 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
786
798
|
}, {
|
|
787
799
|
key: "handleCanPlayThrough",
|
|
788
800
|
value: function handleCanPlayThrough() {
|
|
789
|
-
var _this$
|
|
790
|
-
actions = _this$
|
|
791
|
-
onCanPlayThrough = _this$
|
|
801
|
+
var _this$props11 = this.props,
|
|
802
|
+
actions = _this$props11.actions,
|
|
803
|
+
onCanPlayThrough = _this$props11.onCanPlayThrough;
|
|
792
804
|
actions.handleCanPlayThrough(this.getProperties());
|
|
793
805
|
if (onCanPlayThrough) {
|
|
794
806
|
onCanPlayThrough.apply(void 0, arguments);
|
|
@@ -802,9 +814,9 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
802
814
|
}, {
|
|
803
815
|
key: "handlePlaying",
|
|
804
816
|
value: function handlePlaying() {
|
|
805
|
-
var _this$
|
|
806
|
-
actions = _this$
|
|
807
|
-
onPlaying = _this$
|
|
817
|
+
var _this$props12 = this.props,
|
|
818
|
+
actions = _this$props12.actions,
|
|
819
|
+
onPlaying = _this$props12.onPlaying;
|
|
808
820
|
actions.handlePlaying(this.getProperties());
|
|
809
821
|
if (onPlaying) {
|
|
810
822
|
onPlaying.apply(void 0, arguments);
|
|
@@ -815,9 +827,9 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
815
827
|
}, {
|
|
816
828
|
key: "handlePlay",
|
|
817
829
|
value: function handlePlay() {
|
|
818
|
-
var _this$
|
|
819
|
-
actions = _this$
|
|
820
|
-
onPlay = _this$
|
|
830
|
+
var _this$props13 = this.props,
|
|
831
|
+
actions = _this$props13.actions,
|
|
832
|
+
onPlay = _this$props13.onPlay;
|
|
821
833
|
actions.handlePlay(this.getProperties());
|
|
822
834
|
if (onPlay) {
|
|
823
835
|
onPlay.apply(void 0, arguments);
|
|
@@ -828,9 +840,9 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
828
840
|
}, {
|
|
829
841
|
key: "handlePause",
|
|
830
842
|
value: function handlePause() {
|
|
831
|
-
var _this$
|
|
832
|
-
actions = _this$
|
|
833
|
-
onPause = _this$
|
|
843
|
+
var _this$props14 = this.props,
|
|
844
|
+
actions = _this$props14.actions,
|
|
845
|
+
onPause = _this$props14.onPause;
|
|
834
846
|
actions.handlePause(this.getProperties());
|
|
835
847
|
if (onPause) {
|
|
836
848
|
onPause.apply(void 0, arguments);
|
|
@@ -844,9 +856,9 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
844
856
|
}, {
|
|
845
857
|
key: "handleDurationChange",
|
|
846
858
|
value: function handleDurationChange() {
|
|
847
|
-
var _this$
|
|
848
|
-
actions = _this$
|
|
849
|
-
onDurationChange = _this$
|
|
859
|
+
var _this$props15 = this.props,
|
|
860
|
+
actions = _this$props15.actions,
|
|
861
|
+
onDurationChange = _this$props15.onDurationChange;
|
|
850
862
|
actions.handleDurationChange(this.getProperties());
|
|
851
863
|
if (onDurationChange) {
|
|
852
864
|
onDurationChange.apply(void 0, arguments);
|
|
@@ -860,9 +872,9 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
860
872
|
}, {
|
|
861
873
|
key: "handleProgress",
|
|
862
874
|
value: function handleProgress() {
|
|
863
|
-
var _this$
|
|
864
|
-
actions = _this$
|
|
865
|
-
onProgress = _this$
|
|
875
|
+
var _this$props16 = this.props,
|
|
876
|
+
actions = _this$props16.actions,
|
|
877
|
+
onProgress = _this$props16.onProgress;
|
|
866
878
|
if (this.video) {
|
|
867
879
|
actions.handleProgressChange(this.getProperties());
|
|
868
880
|
}
|
|
@@ -883,11 +895,11 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
883
895
|
}, {
|
|
884
896
|
key: "displaySubtitle",
|
|
885
897
|
value: function displaySubtitle(marker) {
|
|
886
|
-
var _this$
|
|
887
|
-
markers = _this$
|
|
888
|
-
resetSubtitleData = _this$
|
|
889
|
-
subtitleReadOnly = _this$
|
|
890
|
-
subtitleDataList = _this$
|
|
898
|
+
var _this$props17 = this.props,
|
|
899
|
+
markers = _this$props17.markers,
|
|
900
|
+
resetSubtitleData = _this$props17.resetSubtitleData,
|
|
901
|
+
subtitleReadOnly = _this$props17.subtitleReadOnly,
|
|
902
|
+
subtitleDataList = _this$props17.subtitleDataList;
|
|
891
903
|
var currentSubtitleObj = this.state.currentSubtitleObj;
|
|
892
904
|
if (resetSubtitleData) {
|
|
893
905
|
resetSubtitleData();
|
|
@@ -929,11 +941,11 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
929
941
|
}, {
|
|
930
942
|
key: "handleEnded",
|
|
931
943
|
value: function handleEnded() {
|
|
932
|
-
var _this$
|
|
933
|
-
loop = _this$
|
|
934
|
-
player = _this$
|
|
935
|
-
actions = _this$
|
|
936
|
-
onEnded = _this$
|
|
944
|
+
var _this$props18 = this.props,
|
|
945
|
+
loop = _this$props18.loop,
|
|
946
|
+
player = _this$props18.player,
|
|
947
|
+
actions = _this$props18.actions,
|
|
948
|
+
onEnded = _this$props18.onEnded;
|
|
937
949
|
if (loop) {
|
|
938
950
|
this.seek(0);
|
|
939
951
|
this.play();
|
|
@@ -950,9 +962,9 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
950
962
|
}, {
|
|
951
963
|
key: "handleWaiting",
|
|
952
964
|
value: function handleWaiting() {
|
|
953
|
-
var _this$
|
|
954
|
-
actions = _this$
|
|
955
|
-
onWaiting = _this$
|
|
965
|
+
var _this$props19 = this.props,
|
|
966
|
+
actions = _this$props19.actions,
|
|
967
|
+
onWaiting = _this$props19.onWaiting;
|
|
956
968
|
actions.handleWaiting(this.getProperties());
|
|
957
969
|
if (onWaiting) {
|
|
958
970
|
onWaiting.apply(void 0, arguments);
|
|
@@ -966,9 +978,9 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
966
978
|
}, {
|
|
967
979
|
key: "handleSeeking",
|
|
968
980
|
value: function handleSeeking() {
|
|
969
|
-
var _this$
|
|
970
|
-
actions = _this$
|
|
971
|
-
onSeeking = _this$
|
|
981
|
+
var _this$props20 = this.props,
|
|
982
|
+
actions = _this$props20.actions,
|
|
983
|
+
onSeeking = _this$props20.onSeeking;
|
|
972
984
|
actions.handleSeeking(this.getProperties());
|
|
973
985
|
if (onSeeking) {
|
|
974
986
|
onSeeking.apply(void 0, arguments);
|
|
@@ -982,9 +994,9 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
982
994
|
}, {
|
|
983
995
|
key: "handleSeeked",
|
|
984
996
|
value: function handleSeeked() {
|
|
985
|
-
var _this$
|
|
986
|
-
actions = _this$
|
|
987
|
-
onSeeked = _this$
|
|
997
|
+
var _this$props21 = this.props,
|
|
998
|
+
actions = _this$props21.actions,
|
|
999
|
+
onSeeked = _this$props21.onSeeked;
|
|
988
1000
|
actions.handleSeeked(this.getProperties());
|
|
989
1001
|
if (onSeeked) {
|
|
990
1002
|
onSeeked.apply(void 0, arguments);
|
|
@@ -1003,9 +1015,9 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
1003
1015
|
}, {
|
|
1004
1016
|
key: "handleSuspend",
|
|
1005
1017
|
value: function handleSuspend() {
|
|
1006
|
-
var _this$
|
|
1007
|
-
actions = _this$
|
|
1008
|
-
onSuspend = _this$
|
|
1018
|
+
var _this$props22 = this.props,
|
|
1019
|
+
actions = _this$props22.actions,
|
|
1020
|
+
onSuspend = _this$props22.onSuspend;
|
|
1009
1021
|
actions.handleSuspend(this.getProperties());
|
|
1010
1022
|
if (onSuspend) {
|
|
1011
1023
|
onSuspend.apply(void 0, arguments);
|
|
@@ -1016,9 +1028,9 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
1016
1028
|
}, {
|
|
1017
1029
|
key: "handleAbort",
|
|
1018
1030
|
value: function handleAbort() {
|
|
1019
|
-
var _this$
|
|
1020
|
-
actions = _this$
|
|
1021
|
-
onAbort = _this$
|
|
1031
|
+
var _this$props23 = this.props,
|
|
1032
|
+
actions = _this$props23.actions,
|
|
1033
|
+
onAbort = _this$props23.onAbort;
|
|
1022
1034
|
actions.handleAbort(this.getProperties());
|
|
1023
1035
|
if (onAbort) {
|
|
1024
1036
|
onAbort.apply(void 0, arguments);
|
|
@@ -1029,9 +1041,9 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
1029
1041
|
}, {
|
|
1030
1042
|
key: "handleEmptied",
|
|
1031
1043
|
value: function handleEmptied() {
|
|
1032
|
-
var _this$
|
|
1033
|
-
actions = _this$
|
|
1034
|
-
onEmptied = _this$
|
|
1044
|
+
var _this$props24 = this.props,
|
|
1045
|
+
actions = _this$props24.actions,
|
|
1046
|
+
onEmptied = _this$props24.onEmptied;
|
|
1035
1047
|
actions.handleEmptied(this.getProperties());
|
|
1036
1048
|
if (onEmptied) {
|
|
1037
1049
|
onEmptied.apply(void 0, arguments);
|
|
@@ -1045,9 +1057,9 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
1045
1057
|
}, {
|
|
1046
1058
|
key: "handleStalled",
|
|
1047
1059
|
value: function handleStalled() {
|
|
1048
|
-
var _this$
|
|
1049
|
-
actions = _this$
|
|
1050
|
-
onStalled = _this$
|
|
1060
|
+
var _this$props25 = this.props,
|
|
1061
|
+
actions = _this$props25.actions,
|
|
1062
|
+
onStalled = _this$props25.onStalled;
|
|
1051
1063
|
actions.handleStalled(this.getProperties());
|
|
1052
1064
|
if (onStalled) {
|
|
1053
1065
|
onStalled.apply(void 0, arguments);
|
|
@@ -1061,10 +1073,10 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
1061
1073
|
}, {
|
|
1062
1074
|
key: "handleLoadedMetaData",
|
|
1063
1075
|
value: function handleLoadedMetaData() {
|
|
1064
|
-
var _this$
|
|
1065
|
-
actions = _this$
|
|
1066
|
-
onLoadedMetadata = _this$
|
|
1067
|
-
startTime = _this$
|
|
1076
|
+
var _this$props26 = this.props,
|
|
1077
|
+
actions = _this$props26.actions,
|
|
1078
|
+
onLoadedMetadata = _this$props26.onLoadedMetadata,
|
|
1079
|
+
startTime = _this$props26.startTime;
|
|
1068
1080
|
if (startTime && startTime > 0) {
|
|
1069
1081
|
this.video.currentTime = startTime;
|
|
1070
1082
|
}
|
|
@@ -1081,9 +1093,9 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
1081
1093
|
}, {
|
|
1082
1094
|
key: "handleLoadedData",
|
|
1083
1095
|
value: function handleLoadedData() {
|
|
1084
|
-
var _this$
|
|
1085
|
-
actions = _this$
|
|
1086
|
-
onLoadedData = _this$
|
|
1096
|
+
var _this$props27 = this.props,
|
|
1097
|
+
actions = _this$props27.actions,
|
|
1098
|
+
onLoadedData = _this$props27.onLoadedData;
|
|
1087
1099
|
actions.handleLoadedData(this.getProperties());
|
|
1088
1100
|
if (onLoadedData) {
|
|
1089
1101
|
onLoadedData.apply(void 0, arguments);
|
|
@@ -1097,11 +1109,11 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
1097
1109
|
}, {
|
|
1098
1110
|
key: "handleTimeUpdate",
|
|
1099
1111
|
value: function handleTimeUpdate() {
|
|
1100
|
-
var _this$
|
|
1101
|
-
previewActive = _this$
|
|
1102
|
-
actions = _this$
|
|
1103
|
-
onTimeUpdate = _this$
|
|
1104
|
-
rightMarker = _this$
|
|
1112
|
+
var _this$props28 = this.props,
|
|
1113
|
+
previewActive = _this$props28.player.previewActive,
|
|
1114
|
+
actions = _this$props28.actions,
|
|
1115
|
+
onTimeUpdate = _this$props28.onTimeUpdate,
|
|
1116
|
+
rightMarker = _this$props28.playerSelectedMarker.rightMarker;
|
|
1105
1117
|
|
|
1106
1118
|
//for annotation time updataton for svg
|
|
1107
1119
|
var _this$getTimeData3 = this.getTimeData(this.video.currentTime),
|
|
@@ -1129,9 +1141,9 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
1129
1141
|
}, {
|
|
1130
1142
|
key: "handleRateChange",
|
|
1131
1143
|
value: function handleRateChange() {
|
|
1132
|
-
var _this$
|
|
1133
|
-
actions = _this$
|
|
1134
|
-
onRateChange = _this$
|
|
1144
|
+
var _this$props29 = this.props,
|
|
1145
|
+
actions = _this$props29.actions,
|
|
1146
|
+
onRateChange = _this$props29.onRateChange;
|
|
1135
1147
|
actions.handleRateChange(this.getProperties());
|
|
1136
1148
|
if (onRateChange) {
|
|
1137
1149
|
onRateChange.apply(void 0, arguments);
|
|
@@ -1142,9 +1154,9 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
1142
1154
|
}, {
|
|
1143
1155
|
key: "handleVolumeChange",
|
|
1144
1156
|
value: function handleVolumeChange() {
|
|
1145
|
-
var _this$
|
|
1146
|
-
actions = _this$
|
|
1147
|
-
onVolumeChange = _this$
|
|
1157
|
+
var _this$props30 = this.props,
|
|
1158
|
+
actions = _this$props30.actions,
|
|
1159
|
+
onVolumeChange = _this$props30.onVolumeChange;
|
|
1148
1160
|
actions.handleVolumeChange(this.getProperties());
|
|
1149
1161
|
if (onVolumeChange) {
|
|
1150
1162
|
onVolumeChange.apply(void 0, arguments);
|
|
@@ -1158,9 +1170,9 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
1158
1170
|
}, {
|
|
1159
1171
|
key: "handleError",
|
|
1160
1172
|
value: function handleError() {
|
|
1161
|
-
var _this$
|
|
1162
|
-
actions = _this$
|
|
1163
|
-
onError = _this$
|
|
1173
|
+
var _this$props31 = this.props,
|
|
1174
|
+
actions = _this$props31.actions,
|
|
1175
|
+
onError = _this$props31.onError;
|
|
1164
1176
|
actions.handleError(this.getProperties());
|
|
1165
1177
|
if (onError) {
|
|
1166
1178
|
onError.apply(void 0, arguments);
|
|
@@ -1254,9 +1266,9 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
1254
1266
|
}, {
|
|
1255
1267
|
key: "handleSubtitleContainerClick",
|
|
1256
1268
|
value: function handleSubtitleContainerClick() {
|
|
1257
|
-
var _this$
|
|
1258
|
-
actions = _this$
|
|
1259
|
-
player = _this$
|
|
1269
|
+
var _this$props32 = this.props,
|
|
1270
|
+
actions = _this$props32.actions,
|
|
1271
|
+
player = _this$props32.player;
|
|
1260
1272
|
if (player.paused) {
|
|
1261
1273
|
actions.play();
|
|
1262
1274
|
} else {
|
|
@@ -1266,11 +1278,11 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
1266
1278
|
}, {
|
|
1267
1279
|
key: "handleSubtitleClick",
|
|
1268
1280
|
value: function handleSubtitleClick(e) {
|
|
1269
|
-
var _this$
|
|
1270
|
-
actions = _this$
|
|
1271
|
-
player = _this$
|
|
1272
|
-
onScreenSubtitleClick = _this$
|
|
1273
|
-
controlType = _this$
|
|
1281
|
+
var _this$props33 = this.props,
|
|
1282
|
+
actions = _this$props33.actions,
|
|
1283
|
+
player = _this$props33.player,
|
|
1284
|
+
onScreenSubtitleClick = _this$props33.onScreenSubtitleClick,
|
|
1285
|
+
controlType = _this$props33.controlType;
|
|
1274
1286
|
var currentSubtitleObj = this.state.currentSubtitleObj;
|
|
1275
1287
|
if (controlType === 'advanced') {
|
|
1276
1288
|
if (onScreenSubtitleClick) {
|
|
@@ -1295,21 +1307,21 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
1295
1307
|
_this$props$parentAnn2,
|
|
1296
1308
|
_this$props$parentAnn3,
|
|
1297
1309
|
_this$props$parentAnn4;
|
|
1298
|
-
var _this$
|
|
1299
|
-
loop = _this$
|
|
1300
|
-
poster = _this$
|
|
1301
|
-
preload = _this$
|
|
1302
|
-
autoPlay = _this$
|
|
1303
|
-
playsInline = _this$
|
|
1304
|
-
muted = _this$
|
|
1305
|
-
crossOrigin = _this$
|
|
1306
|
-
videoId = _this$
|
|
1307
|
-
fileType = _this$
|
|
1308
|
-
userEmail = _this$
|
|
1309
|
-
theme = _this$
|
|
1310
|
-
player = _this$
|
|
1311
|
-
playerType = _this$
|
|
1312
|
-
markers = _this$
|
|
1310
|
+
var _this$props34 = this.props,
|
|
1311
|
+
loop = _this$props34.loop,
|
|
1312
|
+
poster = _this$props34.poster,
|
|
1313
|
+
preload = _this$props34.preload,
|
|
1314
|
+
autoPlay = _this$props34.autoPlay,
|
|
1315
|
+
playsInline = _this$props34.playsInline,
|
|
1316
|
+
muted = _this$props34.muted,
|
|
1317
|
+
crossOrigin = _this$props34.crossOrigin,
|
|
1318
|
+
videoId = _this$props34.videoId,
|
|
1319
|
+
fileType = _this$props34.fileType,
|
|
1320
|
+
userEmail = _this$props34.userEmail,
|
|
1321
|
+
theme = _this$props34.theme,
|
|
1322
|
+
player = _this$props34.player,
|
|
1323
|
+
playerType = _this$props34.playerType,
|
|
1324
|
+
markers = _this$props34.markers;
|
|
1313
1325
|
var _this$state2 = this.state,
|
|
1314
1326
|
isBuffering = _this$state2.isBuffering,
|
|
1315
1327
|
watermark = _this$state2.watermark,
|