@desynova-digital/player 3.2.4 → 3.3.2
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.
|
@@ -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") {
|
|
@@ -989,6 +991,7 @@ var Video = function (_Component) {
|
|
|
989
991
|
if (onTimeUpdate) {
|
|
990
992
|
onTimeUpdate.apply(undefined, arguments);
|
|
991
993
|
}
|
|
994
|
+
this.displaySubtitle();
|
|
992
995
|
}
|
|
993
996
|
|
|
994
997
|
/**
|
|
@@ -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.2
|
|
3
|
+
"version": "3.3.2",
|
|
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",
|