@desynova-digital/player 3.2.5 → 3.3.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/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,79 @@
|
|
|
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
|
+
return _possibleConstructorReturn(this, (CameraButton.__proto__ || Object.getPrototypeOf(CameraButton)).call(this, props, context));
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
_createClass(CameraButton, [{
|
|
50
|
+
key: "handleClick",
|
|
51
|
+
value: function handleClick() {
|
|
52
|
+
var _props = this.props,
|
|
53
|
+
onTakeSnapshot = _props.onTakeSnapshot,
|
|
54
|
+
video = _props.video;
|
|
55
|
+
|
|
56
|
+
onTakeSnapshot(video.currentTime);
|
|
57
|
+
}
|
|
58
|
+
}, {
|
|
59
|
+
key: "render",
|
|
60
|
+
value: function render() {
|
|
61
|
+
var playerType = this.props.playerType;
|
|
62
|
+
|
|
63
|
+
return playerType === 'tagging' && _react2.default.createElement(CameraButtonIcon, {
|
|
64
|
+
display: "rounded",
|
|
65
|
+
appearance: "cta",
|
|
66
|
+
icon: "camera",
|
|
67
|
+
iconWidth: 18,
|
|
68
|
+
iconHeight: 18,
|
|
69
|
+
width: 20,
|
|
70
|
+
height: 20,
|
|
71
|
+
onClick: this.handleClick
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
}]);
|
|
75
|
+
|
|
76
|
+
return CameraButton;
|
|
77
|
+
}(_react.Component);
|
|
78
|
+
|
|
79
|
+
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, {
|