@desynova-digital/player 4.0.11 → 4.0.13
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/Menu.js
CHANGED
|
@@ -26,9 +26,7 @@ var defaultProps = {
|
|
|
26
26
|
var MenuContainer = _styledComponents["default"].div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 20px;\n position: relative;\n &:hover {\n .menu-popup {\n visibility: visible;\n opacity: 1;\n }\n }\n .menu-popup {\n visibility: hidden;\n opacity: 0;\n position: absolute;\n bottom: 20px;\n padding-bottom: 16px;\n z-index: 10;\n transition: all 350ms ease-in-out;\n &.right {\n left: -10px;\n &:after {\n left: 15px;\n }\n }\n &.center {\n left: 50%;\n transform: translateX(-50%);\n &:after {\n left: 50%;\n transform: translateX(-50%);\n }\n }\n &.left {\n right: -10px;\n &:after {\n right: 15px;\n }\n }\n &.active {\n visibility: visible;\n opacity: 1;\n }\n &:after {\n content: '';\n border-left: 6px solid transparent;\n position: absolute;\n border-right: 6px solid transparent;\n border-top: 6px solid ", ";\n bottom: 10px;\n }\n .menu-list {\n border-radius: 10px;\n background: #fff;\n min-width: 175px;\n max-height: 500px;\n transition: all 250ms ease-in-out;\n overflow: auto;\n max-height: 400px;\n }\n }\n"])), function (props) {
|
|
27
27
|
return props.theme ? " ".concat(_tokens.colors[props.theme].videoPlayer.borderColor) : 'rgb(0, 206, 198)';
|
|
28
28
|
});
|
|
29
|
-
var MenuIcon = (0, _styledComponents["default"])(_components.Button)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n background: transparent;\n border: none;\n margin: 0px;\n &:hover,\n &:focus {\n background: transparent;\n
|
|
30
|
-
return props.theme ? " ".concat(_tokens.colors[props.theme].videoPlayer.themeColor) : '#00cec6';
|
|
31
|
-
});
|
|
29
|
+
var MenuIcon = (0, _styledComponents["default"])(_components.Button)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n background: transparent;\n border: none;\n margin: 0px;\n &:hover,\n &:focus {\n background: transparent;\n }\n"])));
|
|
32
30
|
function Menu(_ref) {
|
|
33
31
|
var style = _ref.style,
|
|
34
32
|
children = _ref.children,
|
package/components/Video.js
CHANGED
|
@@ -440,7 +440,11 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
440
440
|
src = _this$props4.src,
|
|
441
441
|
activeAudio = _this$props4.player.activeAudio,
|
|
442
442
|
currentSubtitleObj = _this$props4.currentSubtitleObj,
|
|
443
|
-
markers = _this$props4.markers
|
|
443
|
+
markers = _this$props4.markers,
|
|
444
|
+
playerType = _this$props4.playerType;
|
|
445
|
+
if (markers && markers !== newProps.markers && newProps.markers) {
|
|
446
|
+
this.displaySubtitle(newProps.markers);
|
|
447
|
+
}
|
|
444
448
|
if (newProps.src !== src) {
|
|
445
449
|
var isM3U8 = this.state.isM3U8;
|
|
446
450
|
if (_hls["default"].isSupported() && isM3U8) {
|
|
@@ -1139,13 +1143,14 @@ var Video = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
1139
1143
|
userEmail = _this$props31.userEmail,
|
|
1140
1144
|
theme = _this$props31.theme,
|
|
1141
1145
|
player = _this$props31.player,
|
|
1142
|
-
playerType = _this$props31.playerType
|
|
1146
|
+
playerType = _this$props31.playerType,
|
|
1147
|
+
markers = _this$props31.markers;
|
|
1143
1148
|
var _this$state2 = this.state,
|
|
1144
1149
|
isBuffering = _this$state2.isBuffering,
|
|
1145
1150
|
watermark = _this$state2.watermark,
|
|
1146
1151
|
currentSubtitleObj = _this$state2.currentSubtitleObj;
|
|
1147
1152
|
var children = this.getChildren(this.props);
|
|
1148
|
-
var isSubtitleActive = player.SubtitleStatus
|
|
1153
|
+
var isSubtitleActive = player.SubtitleStatus && playerType === "default" || playerType === 'subtitle' && markers && markers.length;
|
|
1149
1154
|
return /*#__PURE__*/_react["default"].createElement(VideoBlock, {
|
|
1150
1155
|
className: "video-react-player-block",
|
|
1151
1156
|
ref: function ref(c) {
|
|
@@ -75,14 +75,29 @@ var CaptionControlMenuButton = /*#__PURE__*/function (_Component) {
|
|
|
75
75
|
filterSelectedSubtitle(subtitleData[0].subtitle_info_id);
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
|
+
}, {
|
|
79
|
+
key: "componentDidUpdate",
|
|
80
|
+
value: function componentDidUpdate(prevProps) {
|
|
81
|
+
var _this$props3 = this.props,
|
|
82
|
+
subtitleData = _this$props3.subtitleData,
|
|
83
|
+
actions = _this$props3.actions,
|
|
84
|
+
filterSelectedSubtitle = _this$props3.filterSelectedSubtitle,
|
|
85
|
+
player = _this$props3.player;
|
|
86
|
+
if (subtitleData !== prevProps.subtitleData && subtitleData.length && player.activeCaption === 'Off') {
|
|
87
|
+
actions.handleCaptionTrackChange(subtitleData[0].title);
|
|
88
|
+
filterSelectedSubtitle(subtitleData[0].subtitle_info_id);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
78
91
|
}, {
|
|
79
92
|
key: "render",
|
|
80
93
|
value: function render() {
|
|
81
|
-
var _this$
|
|
82
|
-
SubtitleStatus = _this$
|
|
83
|
-
theme = _this$
|
|
84
|
-
subtitleData = _this$
|
|
85
|
-
|
|
94
|
+
var _this$props4 = this.props,
|
|
95
|
+
SubtitleStatus = _this$props4.player.SubtitleStatus,
|
|
96
|
+
theme = _this$props4.theme,
|
|
97
|
+
subtitleData = _this$props4.subtitleData,
|
|
98
|
+
playerType = _this$props4.playerType;
|
|
99
|
+
var showCaptionButton = subtitleData && subtitleData.length && playerType === 'default';
|
|
100
|
+
return showCaptionButton ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
86
101
|
style: {
|
|
87
102
|
marginRight: '10px'
|
|
88
103
|
}
|
|
@@ -37,9 +37,7 @@ var defaultProps = {
|
|
|
37
37
|
actions: {},
|
|
38
38
|
player: {}
|
|
39
39
|
};
|
|
40
|
-
var FullscreenToggleButton = (0, _styledComponents["default"])(_components.Button)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background: transparent;\n border: none;\n margin: 0 10px;\n &:hover,\n &:focus {\n background: transparent;\n
|
|
41
|
-
return props.theme ? " ".concat(_tokens.colors[props.theme].videoPlayer.themeColor) : '#00cec6';
|
|
42
|
-
});
|
|
40
|
+
var FullscreenToggleButton = (0, _styledComponents["default"])(_components.Button)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background: transparent;\n border: none;\n margin: 0 10px;\n &:hover,\n &:focus {\n background: transparent;\n }\n"])));
|
|
43
41
|
var FullscreenToggle = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
44
42
|
_inherits(FullscreenToggle, _Component);
|
|
45
43
|
function FullscreenToggle(props, context) {
|
package/package.json
CHANGED
package/reducers/player.js
CHANGED
|
@@ -50,7 +50,7 @@ var initialState = {
|
|
|
50
50
|
// state used to show the value of selected subtitle
|
|
51
51
|
markerCreate: false,
|
|
52
52
|
rewindActive: false,
|
|
53
|
-
SubtitleStatus:
|
|
53
|
+
SubtitleStatus: false,
|
|
54
54
|
// state used to show whether subtitle will be shown on player or not
|
|
55
55
|
HLSConfig: {
|
|
56
56
|
debug: true,
|