@desynova-digital/player 3.2.5 → 3.4.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.
package/actions/player.js
CHANGED
|
@@ -149,7 +149,9 @@ function forward(seconds) {
|
|
|
149
149
|
source: ''
|
|
150
150
|
};
|
|
151
151
|
|
|
152
|
-
|
|
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
|
-
|
|
170
|
+
if (seconds < 1) {
|
|
171
|
+
this.video.pause();
|
|
172
|
+
}
|
|
169
173
|
this.video.replay(seconds);
|
|
170
174
|
|
|
171
175
|
return {
|
|
@@ -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;
|
|
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',
|
|
@@ -387,7 +387,7 @@ var PlayerHeader = function (_Component) {
|
|
|
387
387
|
videoDetails.tvTime ? _react2.default.createElement(
|
|
388
388
|
'div',
|
|
389
389
|
{ className: 'tv-time' },
|
|
390
|
-
_react2.default.createElement(_components.Icon, { name: 'tv', width:
|
|
390
|
+
_react2.default.createElement(_components.Icon, { name: 'tv', width: 14, height: 12, color: '#afb2ba' }),
|
|
391
391
|
_react2.default.createElement(
|
|
392
392
|
'p',
|
|
393
393
|
null,
|
|
@@ -397,7 +397,7 @@ var PlayerHeader = function (_Component) {
|
|
|
397
397
|
videoDetails.ottTime ? _react2.default.createElement(
|
|
398
398
|
'div',
|
|
399
399
|
{ className: 'ott-time' },
|
|
400
|
-
_react2.default.createElement(_components.Icon, { name: '
|
|
400
|
+
_react2.default.createElement(_components.Icon, { name: 'tablet', width: 16, height: 12, color: '#afb2ba' }),
|
|
401
401
|
_react2.default.createElement(
|
|
402
402
|
'p',
|
|
403
403
|
null,
|
|
@@ -136,8 +136,9 @@ var PointersBar = function (_Component) {
|
|
|
136
136
|
this.setState(_extends({}, tooltip), function () {
|
|
137
137
|
var tooltip = _this2.state.tooltip;
|
|
138
138
|
|
|
139
|
+
var tooltipRefOffset = _this2._tooltipRef.current && _this2._tooltipRef.current.offsetWidth ? _this2._tooltipRef.current.offsetWidth / 2 : 0;
|
|
139
140
|
tooltip.isVisible = true;
|
|
140
|
-
tooltip.left = tooltip.left -
|
|
141
|
+
tooltip.left = tooltip.left - tooltipRefOffset;
|
|
141
142
|
_this2.setState(_extends({}, tooltip));
|
|
142
143
|
});
|
|
143
144
|
}
|
package/components/Video.js
CHANGED
|
@@ -747,7 +747,9 @@ var Video = function (_Component) {
|
|
|
747
747
|
markers = _props14.markers,
|
|
748
748
|
resetSubtitleData = _props14.resetSubtitleData;
|
|
749
749
|
|
|
750
|
-
resetSubtitleData
|
|
750
|
+
if (resetSubtitleData) {
|
|
751
|
+
resetSubtitleData();
|
|
752
|
+
}
|
|
751
753
|
var currentTime = this.video.currentTime;
|
|
752
754
|
var currentMarker = marker || markers;
|
|
753
755
|
if (currentMarker && currentMarker[0] && currentMarker[0].name === "Subtitle") {
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
8
|
+
|
|
9
|
+
var _react = require("react");
|
|
10
|
+
|
|
11
|
+
var _react2 = _interopRequireDefault(_react);
|
|
12
|
+
|
|
13
|
+
var _propTypes = require("prop-types");
|
|
14
|
+
|
|
15
|
+
var _styledComponents = require("styled-components");
|
|
16
|
+
|
|
17
|
+
var _styledComponents2 = _interopRequireDefault(_styledComponents);
|
|
18
|
+
|
|
19
|
+
var _components = require("@desynova-digital/components");
|
|
20
|
+
|
|
21
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
22
|
+
|
|
23
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
24
|
+
|
|
25
|
+
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
26
|
+
|
|
27
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
28
|
+
|
|
29
|
+
var CameraButtonIcon = (0, _styledComponents2.default)(_components.Button).withConfig({
|
|
30
|
+
displayName: "CameraButton__CameraButtonIcon",
|
|
31
|
+
componentId: "sc-1iapkc3-0"
|
|
32
|
+
})(["background:transparent;border:none;margin:0px;margin-right:10px;&:hover,&:focus{background:transparent;}"]);
|
|
33
|
+
|
|
34
|
+
var propTypes = {
|
|
35
|
+
actions: _propTypes.PropTypes.instanceOf(Object),
|
|
36
|
+
player: _propTypes.PropTypes.instanceOf(Object),
|
|
37
|
+
handleClick: _propTypes.PropTypes.func
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
var CameraButton = function (_Component) {
|
|
41
|
+
_inherits(CameraButton, _Component);
|
|
42
|
+
|
|
43
|
+
function CameraButton(props, context) {
|
|
44
|
+
_classCallCheck(this, CameraButton);
|
|
45
|
+
|
|
46
|
+
var _this = _possibleConstructorReturn(this, (CameraButton.__proto__ || Object.getPrototypeOf(CameraButton)).call(this, props, context));
|
|
47
|
+
|
|
48
|
+
_this.handleClick = _this.handleClick.bind(_this);
|
|
49
|
+
return _this;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
_createClass(CameraButton, [{
|
|
53
|
+
key: "handleClick",
|
|
54
|
+
value: function handleClick() {
|
|
55
|
+
var _props = this.props,
|
|
56
|
+
onTakeSnapshot = _props.onTakeSnapshot,
|
|
57
|
+
video = _props.video;
|
|
58
|
+
|
|
59
|
+
onTakeSnapshot(video.currentTime);
|
|
60
|
+
}
|
|
61
|
+
}, {
|
|
62
|
+
key: "render",
|
|
63
|
+
value: function render() {
|
|
64
|
+
var playerType = this.props.playerType;
|
|
65
|
+
|
|
66
|
+
return playerType === 'tagging' && _react2.default.createElement(CameraButtonIcon, {
|
|
67
|
+
display: "rounded",
|
|
68
|
+
appearance: "cta",
|
|
69
|
+
icon: "camera",
|
|
70
|
+
iconWidth: 18,
|
|
71
|
+
iconHeight: 18,
|
|
72
|
+
width: 20,
|
|
73
|
+
height: 20,
|
|
74
|
+
onClick: this.handleClick
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
}]);
|
|
78
|
+
|
|
79
|
+
return CameraButton;
|
|
80
|
+
}(_react.Component);
|
|
81
|
+
|
|
82
|
+
exports.default = CameraButton;
|
|
@@ -72,6 +72,10 @@ var _SubtitleLanguagesMenuButton = require('./SubtitleLanguagesMenuButton');
|
|
|
72
72
|
|
|
73
73
|
var _SubtitleLanguagesMenuButton2 = _interopRequireDefault(_SubtitleLanguagesMenuButton);
|
|
74
74
|
|
|
75
|
+
var _CameraButton = require('./CameraButton');
|
|
76
|
+
|
|
77
|
+
var _CameraButton2 = _interopRequireDefault(_CameraButton);
|
|
78
|
+
|
|
75
79
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
76
80
|
|
|
77
81
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
@@ -187,7 +191,10 @@ var ControlBar = function (_Component) {
|
|
|
187
191
|
}, this.props, {
|
|
188
192
|
key: 'volume-menu-button',
|
|
189
193
|
order: 8
|
|
190
|
-
})), _react2.default.createElement(
|
|
194
|
+
})), _react2.default.createElement(_CameraButton2.default, {
|
|
195
|
+
order: 9,
|
|
196
|
+
playerType: playerType
|
|
197
|
+
}), _react2.default.createElement(_AudioTracksMenuButton2.default, _extends({}, this.props, {
|
|
191
198
|
key: 'audio-tracks-menu-button',
|
|
192
199
|
order: 9
|
|
193
200
|
})), _react2.default.createElement(_SettingsMenuButton2.default, _extends({}, this.props, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@desynova-digital/player",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.0",
|
|
4
4
|
"description": "Video Player Package for Contido Application",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -53,8 +53,8 @@
|
|
|
53
53
|
"webpack-dev-server": "^3.11.0"
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@desynova-digital/components": "^8.
|
|
57
|
-
"@desynova-digital/tokens": "^8.
|
|
56
|
+
"@desynova-digital/components": "^8.9.0",
|
|
57
|
+
"@desynova-digital/tokens": "^8.9.0",
|
|
58
58
|
"hls.js": "^0.11.0",
|
|
59
59
|
"latest-version": "^4.0.0",
|
|
60
60
|
"prettycli": "^1.4.3",
|