@desynova-digital/player 3.9.7 → 4.0.1
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/Player.js +945 -0
- package/control/AudioTracksMenuButton.js +91 -0
- package/control/AudioTracksMenuButton.jsx +80 -0
- package/control/ControlBar.js +303 -0
- package/control/ControlBar.jsx +264 -0
- package/control/CurrentTimeDisplay.js +34 -0
- package/control/CurrentTimeDisplay.jsx +35 -0
- package/control/DurationDisplay.js +38 -0
- package/control/DurationDisplay.jsx +48 -0
- package/control/ForwardBackwardControl.js +76 -0
- package/control/ForwardBackwardControl.jsx +79 -0
- package/control/FullscreenToggle.js +82 -0
- package/control/FullscreenToggle.jsx +83 -0
- package/control/MarkInControl.js +124 -0
- package/control/MarkInControl.jsx +109 -0
- package/control/MarkOutControl.js +137 -0
- package/control/MarkOutControl.jsx +131 -0
- package/control/MarkerBar.js +127 -0
- package/control/MarkerBar.jsx +107 -0
- package/control/MarkingControl.js +82 -0
- package/control/MarkingControl.jsx +143 -0
- package/control/MarkingDuration.js +44 -0
- package/control/MarkingPreview.js +49 -0
- package/control/MarkingPreview.jsx +60 -0
- package/control/PlayBackRateControl.js +106 -0
- package/control/PlayBackRateControl.jsx +106 -0
- package/control/PlayProgressBar.js +61 -0
- package/control/PlayProgressBar.jsx +92 -0
- package/control/PlayToggle.js +56 -0
- package/control/PlayToggle.jsx +57 -0
- package/control/PointersBar.js +231 -0
- package/control/PointersBar.jsx +286 -0
- package/control/ProgressControl.js +127 -0
- package/control/ProgressControl.jsx +155 -0
- package/control/SeekBar.js +204 -0
- package/control/SeekBar.jsx +229 -0
- package/control/SettingsMenuButton.js +63 -0
- package/control/SettingsMenuButton.jsx +69 -0
- package/control/Slider.js +274 -0
- package/control/Slider.jsx +243 -0
- package/control/Timeline.js +118 -0
- package/control/Timeline.jsx +131 -0
- package/control/VolumeBar.js +198 -0
- package/control/VolumeBar.jsx +174 -0
- package/control/VolumeLevel.js +61 -0
- package/control/VolumeLevel.jsx +66 -0
- package/control/VolumneMenuButton.js +112 -0
- package/control/VolumneMenuButton.jsx +111 -0
- package/header/Header.js +309 -0
- package/header/Header.jsx +479 -0
- package/index.js +9 -151
- package/media/AudioMeter.js +381 -0
- package/media/AudioMeter.jsx +411 -0
- package/media/SDOutline.js +82 -0
- package/media/SDOutline.jsx +90 -0
- package/media/Video.js +684 -0
- package/media/Video.jsx +714 -0
- package/package.json +5 -1
- package/playlist/Playlist.js +67 -0
- package/playlist/Playlist.jsx +91 -0
- package/playlist/index.js +13 -0
- package/shortcuts/Shortcut.js +662 -0
- package/utils/Menu.js +50 -0
- package/utils/Menu.jsx +105 -0
- package/{colors.js → utils/colors.js} +13 -13
- package/utils/dom.js +6 -16
- package/utils/index.js +52 -122
- package/Manager.js +0 -124
- package/actions/player.js +0 -375
- package/actions/video.js +0 -230
- package/components/AudioMeter.js +0 -414
- package/components/BigPlayButton.js +0 -110
- package/components/ImageViewer.js +0 -318
- package/components/MarkerBar.js +0 -138
- package/components/Menu.js +0 -77
- package/components/Player.js +0 -821
- package/components/PlayerHeader.js +0 -472
- package/components/Playlist.js +0 -133
- package/components/PointersBar.js +0 -299
- package/components/PosterImage.js +0 -61
- package/components/SDOutline.js +0 -68
- package/components/Shortcut.js +0 -621
- package/components/Slider.js +0 -317
- package/components/TagsBar.js +0 -100
- package/components/Video.js +0 -1431
- package/components/control-bar/AudioTracksMenuButton.js +0 -113
- package/components/control-bar/CameraButton.js +0 -88
- package/components/control-bar/CommentsButton.js +0 -216
- package/components/control-bar/ControlBar.js +0 -260
- package/components/control-bar/EditorControlMenuButton.js +0 -412
- package/components/control-bar/ForwardControl.js +0 -17
- package/components/control-bar/ForwardReplayControl.js +0 -122
- package/components/control-bar/FullscreenToggle.js +0 -101
- package/components/control-bar/PlayToggle.js +0 -98
- package/components/control-bar/ReplayControl.js +0 -17
- package/components/control-bar/SettingsMenuButton.js +0 -43
- package/components/control-bar/SubtitleLanguagesMenuButton.js +0 -174
- package/components/control-bar/VolumeMenuButton.js +0 -134
- package/components/control-bar/ZoomMenuButton.js +0 -116
- package/components/marking-controls/MarkInControl.js +0 -140
- package/components/marking-controls/MarkOutControl.js +0 -155
- package/components/marking-controls/MarkingAddButton.js +0 -94
- package/components/marking-controls/MarkingControl.js +0 -135
- package/components/marking-controls/MarkingDeleteButton.js +0 -84
- package/components/marking-controls/MarkingDuration.js +0 -77
- package/components/marking-controls/MarkingPreview.js +0 -86
- package/components/progress-bar/AudioWaveform.js +0 -144
- package/components/progress-bar/LoadProgressBar.js +0 -90
- package/components/progress-bar/MouseTimeDisplay.js +0 -53
- package/components/progress-bar/PlayProgressBar.js +0 -79
- package/components/progress-bar/ProgressControl.js +0 -222
- package/components/progress-bar/SeekBar.js +0 -261
- package/components/progress-bar/Timeline.js +0 -134
- package/components/settings-menu-control/PlaybackRateControl.js +0 -147
- package/components/settings-menu-control/SafeAreaControl.js +0 -92
- package/components/settings-menu-control/SettingsMenu.js +0 -68
- package/components/settings-menu-control/SubtitleControl.js +0 -1
- package/components/time-controls/CurrentTimeDisplay.js +0 -53
- package/components/time-controls/DurationDisplay.js +0 -51
- package/components/time-controls/TimeDivider.js +0 -41
- package/components/volume-control/VolumeBar.js +0 -216
- package/components/volume-control/VolumeControl.js +0 -35
- package/components/volume-control/VolumeLevel.js +0 -78
- package/components/zoom-control/ZoomBar.js +0 -189
- package/components/zoom-control/ZoomLevel.js +0 -68
- package/reducers/index.js +0 -23
- package/reducers/operation.js +0 -36
- package/reducers/player.js +0 -222
- package/utils/browser.js +0 -29
- package/utils/fullscreen.js +0 -73
|
@@ -1,412 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
|
|
7
|
-
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
|
8
|
-
|
|
9
|
-
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; }; }();
|
|
10
|
-
|
|
11
|
-
var _propTypes = require('prop-types');
|
|
12
|
-
|
|
13
|
-
var _react = require('react');
|
|
14
|
-
|
|
15
|
-
var _react2 = _interopRequireDefault(_react);
|
|
16
|
-
|
|
17
|
-
var _styledComponents = require('styled-components');
|
|
18
|
-
|
|
19
|
-
var _styledComponents2 = _interopRequireDefault(_styledComponents);
|
|
20
|
-
|
|
21
|
-
var _components = require('@desynova-digital/components');
|
|
22
|
-
|
|
23
|
-
var _Menu = require('../Menu');
|
|
24
|
-
|
|
25
|
-
var _Menu2 = _interopRequireDefault(_Menu);
|
|
26
|
-
|
|
27
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
28
|
-
|
|
29
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
30
|
-
|
|
31
|
-
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; }
|
|
32
|
-
|
|
33
|
-
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; }
|
|
34
|
-
|
|
35
|
-
var propTypes = {
|
|
36
|
-
player: _propTypes.PropTypes.instanceOf(Object),
|
|
37
|
-
actions: _propTypes.PropTypes.instanceOf(Object),
|
|
38
|
-
style: _propTypes.PropTypes.instanceOf(Object),
|
|
39
|
-
onEditAction: _propTypes.PropTypes.func,
|
|
40
|
-
assetType: _propTypes.PropTypes.oneOf(['fc', 'rc']),
|
|
41
|
-
contentType: _propTypes.PropTypes.string,
|
|
42
|
-
playerType: _propTypes.PropTypes.oneOf(['dubbing_review', 'clipping_default', 'default', 'tagging', 'qc', 'subtitle', 'snp_edit', 'archive', 'restore', 'clipping', 'storyboard', 'panel'])
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
var EditContainer = (0, _styledComponents2.default)('div').withConfig({
|
|
46
|
-
displayName: 'EditorControlMenuButton__EditContainer',
|
|
47
|
-
componentId: 'sc-yoq9bd-0'
|
|
48
|
-
})(['position:relative;']);
|
|
49
|
-
|
|
50
|
-
var EditBlock = (0, _styledComponents2.default)('div').withConfig({
|
|
51
|
-
displayName: 'EditorControlMenuButton__EditBlock',
|
|
52
|
-
componentId: 'sc-yoq9bd-1'
|
|
53
|
-
})(['display:flex;background:transparent;font-family:SFUIText-Medium;font-size:12px;text-transform:uppercase;justify-content:flex-start;align-items:center;border-bottom:1px solid #eeeeee;box-sizing:border-box;height:', ';padding:', ';transition:all 250ms ease-in-out;opacity:', ';pointer-events:', ';overflow:hidden;&:last-child{border:none;}&:hover,&:focus{svg path{fill:#00cec6;}p{color:#00cec6;}}svg path{fill:#afb2ba;}p{margin-left:10px;white-space:nowrap;color:#999999;}'], function (props) {
|
|
54
|
-
return props.active ? '45px' : '0px';
|
|
55
|
-
}, function (props) {
|
|
56
|
-
return props.active ? '15px' : '0px';
|
|
57
|
-
}, function (props) {
|
|
58
|
-
return props.leftMarker > -1 && props.rightMarker > -1 ? 1 : 0.5;
|
|
59
|
-
}, function (props) {
|
|
60
|
-
return props.leftMarker > -1 && props.rightMarker > -1 ? 'all' : 'none';
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
var CommentBlock = (0, _styledComponents2.default)('div').withConfig({
|
|
64
|
-
displayName: 'EditorControlMenuButton__CommentBlock',
|
|
65
|
-
componentId: 'sc-yoq9bd-2'
|
|
66
|
-
})(['position:relative;width:', ';padding:', ';height:', ';overflow:hidden;transition:all 250ms ease-in-out;', '{border:none;resize:none;}'], function (props) {
|
|
67
|
-
return props.active ? '300px' : '0px';
|
|
68
|
-
}, function (props) {
|
|
69
|
-
return props.active ? '15px 45px 15px 15px' : '0px';
|
|
70
|
-
}, function (props) {
|
|
71
|
-
return props.active ? '100px' : '0px';
|
|
72
|
-
}, _components.Textarea.Element);
|
|
73
|
-
|
|
74
|
-
var BackButton = (0, _styledComponents2.default)(_components.Button).withConfig({
|
|
75
|
-
displayName: 'EditorControlMenuButton__BackButton',
|
|
76
|
-
componentId: 'sc-yoq9bd-3'
|
|
77
|
-
})(['background:transparent;border:none;margin:0 !important;width:20px;height:20px;padding:0;right:15px;top:10px;position:absolute;&:hover,&:focus{background:transparent;}', '{transform:translate(-50%,-50%);top:50%;left:50%;position:absolute;svg path{fill:#000;}}'], _components.Icon.Element);
|
|
78
|
-
|
|
79
|
-
var SendButton = (0, _styledComponents2.default)(_components.Button).withConfig({
|
|
80
|
-
displayName: 'EditorControlMenuButton__SendButton',
|
|
81
|
-
componentId: 'sc-yoq9bd-4'
|
|
82
|
-
})(['background:rgba(0,206,198,0.1);border:none;margin:0 !important;width:30px;height:30px;padding:0;position:absolute;right:15px;top:calc(100% - 45px);&:hover,&:focus{background:rgba(0,206,198,0.1);}', '{transform:translate(-50%,-50%);top:50%;left:50%;position:absolute;svg path{fill:#00cec6;}}'], _components.Icon.Element);
|
|
83
|
-
|
|
84
|
-
var EditorControlMenuButton = function (_Component) {
|
|
85
|
-
_inherits(EditorControlMenuButton, _Component);
|
|
86
|
-
|
|
87
|
-
function EditorControlMenuButton(props) {
|
|
88
|
-
_classCallCheck(this, EditorControlMenuButton);
|
|
89
|
-
|
|
90
|
-
var _this = _possibleConstructorReturn(this, (EditorControlMenuButton.__proto__ || Object.getPrototypeOf(EditorControlMenuButton)).call(this, props));
|
|
91
|
-
|
|
92
|
-
_this.state = {
|
|
93
|
-
comment: '',
|
|
94
|
-
commentActive: false,
|
|
95
|
-
commentType: ''
|
|
96
|
-
};
|
|
97
|
-
_this.onClick = _this.onClick.bind(_this);
|
|
98
|
-
return _this;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
_createClass(EditorControlMenuButton, [{
|
|
102
|
-
key: 'onClick',
|
|
103
|
-
value: function onClick(type) {
|
|
104
|
-
switch (type) {
|
|
105
|
-
case 'edit_out':
|
|
106
|
-
case 'mute':
|
|
107
|
-
case 'mute-beep':
|
|
108
|
-
case 'no_smoking':
|
|
109
|
-
case 'no_drinking':
|
|
110
|
-
case 'comment':
|
|
111
|
-
case 'blur':
|
|
112
|
-
this.setState({
|
|
113
|
-
commentActive: true,
|
|
114
|
-
commentType: type
|
|
115
|
-
}, function () {
|
|
116
|
-
var inputElem = document.querySelectorAll('.menu-list textarea')[0];
|
|
117
|
-
if (inputElem) {
|
|
118
|
-
inputElem.focus();
|
|
119
|
-
}
|
|
120
|
-
});
|
|
121
|
-
break;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
}, {
|
|
125
|
-
key: 'onCommentEnter',
|
|
126
|
-
value: function onCommentEnter() {
|
|
127
|
-
var _props = this.props,
|
|
128
|
-
_props$player = _props.player,
|
|
129
|
-
leftMarker = _props$player.leftMarker,
|
|
130
|
-
rightMarker = _props$player.rightMarker,
|
|
131
|
-
onEditAction = _props.onEditAction,
|
|
132
|
-
actions = _props.actions;
|
|
133
|
-
var _state = this.state,
|
|
134
|
-
commentType = _state.commentType,
|
|
135
|
-
comment = _state.comment;
|
|
136
|
-
|
|
137
|
-
var title = '';
|
|
138
|
-
var subTitle = '';
|
|
139
|
-
switch (commentType) {
|
|
140
|
-
case 'comment':
|
|
141
|
-
title = 'Comment';
|
|
142
|
-
subTitle = comment;
|
|
143
|
-
break;
|
|
144
|
-
case 'blur':
|
|
145
|
-
title = 'Blur';
|
|
146
|
-
subTitle = comment;
|
|
147
|
-
break;
|
|
148
|
-
case 'edit_out':
|
|
149
|
-
title = 'Edit Out';
|
|
150
|
-
subTitle = comment;
|
|
151
|
-
break;
|
|
152
|
-
case 'mute':
|
|
153
|
-
title = 'Mute';
|
|
154
|
-
subTitle = comment;
|
|
155
|
-
break;
|
|
156
|
-
case 'mute-beep':
|
|
157
|
-
title = 'Beep';
|
|
158
|
-
subTitle = comment;
|
|
159
|
-
break;
|
|
160
|
-
case 'no_smoking':
|
|
161
|
-
title = 'Smoking Disclaimer';
|
|
162
|
-
subTitle = comment;
|
|
163
|
-
break;
|
|
164
|
-
case 'no_drinking':
|
|
165
|
-
title = 'Drinking Disclaimer';
|
|
166
|
-
subTitle = comment;
|
|
167
|
-
break;
|
|
168
|
-
}
|
|
169
|
-
var data = {
|
|
170
|
-
type: commentType,
|
|
171
|
-
icon: commentType,
|
|
172
|
-
value: {
|
|
173
|
-
title: title,
|
|
174
|
-
sub_title: subTitle,
|
|
175
|
-
in_time: leftMarker,
|
|
176
|
-
out_time: rightMarker,
|
|
177
|
-
is_selected: false
|
|
178
|
-
}
|
|
179
|
-
};
|
|
180
|
-
this.onCommentClose();
|
|
181
|
-
onEditAction(data);
|
|
182
|
-
actions.handleMarkerPointChange('delete');
|
|
183
|
-
}
|
|
184
|
-
}, {
|
|
185
|
-
key: 'onCommentClose',
|
|
186
|
-
value: function onCommentClose() {
|
|
187
|
-
this.setState({
|
|
188
|
-
commentActive: false,
|
|
189
|
-
commentType: '',
|
|
190
|
-
comment: ''
|
|
191
|
-
});
|
|
192
|
-
}
|
|
193
|
-
}, {
|
|
194
|
-
key: 'updateComment',
|
|
195
|
-
value: function updateComment(value) {
|
|
196
|
-
this.setState({
|
|
197
|
-
comment: value
|
|
198
|
-
});
|
|
199
|
-
}
|
|
200
|
-
}, {
|
|
201
|
-
key: 'render',
|
|
202
|
-
value: function render() {
|
|
203
|
-
var _this2 = this;
|
|
204
|
-
|
|
205
|
-
var _props2 = this.props,
|
|
206
|
-
player = _props2.player,
|
|
207
|
-
actions = _props2.actions,
|
|
208
|
-
style = _props2.style,
|
|
209
|
-
playerType = _props2.playerType,
|
|
210
|
-
assetType = _props2.assetType,
|
|
211
|
-
contentType = _props2.contentType;
|
|
212
|
-
var _state2 = this.state,
|
|
213
|
-
comment = _state2.comment,
|
|
214
|
-
commentActive = _state2.commentActive,
|
|
215
|
-
commentType = _state2.commentType;
|
|
216
|
-
|
|
217
|
-
return _react2.default.createElement(
|
|
218
|
-
_react2.default.Fragment,
|
|
219
|
-
null,
|
|
220
|
-
playerType === 'snp_edit' || playerType === 'dubbing_review' ? _react2.default.createElement(
|
|
221
|
-
_Menu2.default,
|
|
222
|
-
{
|
|
223
|
-
icon: 'editor',
|
|
224
|
-
player: player,
|
|
225
|
-
actions: actions,
|
|
226
|
-
style: style,
|
|
227
|
-
active: commentActive
|
|
228
|
-
},
|
|
229
|
-
_react2.default.createElement(
|
|
230
|
-
EditContainer,
|
|
231
|
-
null,
|
|
232
|
-
_react2.default.createElement(
|
|
233
|
-
CommentBlock,
|
|
234
|
-
{ active: commentActive },
|
|
235
|
-
_react2.default.createElement(BackButton, _extends({
|
|
236
|
-
display: 'rounded',
|
|
237
|
-
appearance: 'cta',
|
|
238
|
-
icon: 'cross',
|
|
239
|
-
width: 20,
|
|
240
|
-
height: 20,
|
|
241
|
-
iconWidth: 10,
|
|
242
|
-
iconHeight: 10,
|
|
243
|
-
tabIndex: '0',
|
|
244
|
-
onClick: function onClick() {
|
|
245
|
-
return _this2.onCommentClose();
|
|
246
|
-
}
|
|
247
|
-
}, this.props)),
|
|
248
|
-
_react2.default.createElement(_components.Textarea, {
|
|
249
|
-
type: 'text',
|
|
250
|
-
label: commentType.split('_').join(' '),
|
|
251
|
-
value: comment,
|
|
252
|
-
resize: false,
|
|
253
|
-
onChange: function onChange(e) {
|
|
254
|
-
return _this2.updateComment(e.target.value);
|
|
255
|
-
},
|
|
256
|
-
placeholder: commentType.split('_').join(' ')
|
|
257
|
-
}),
|
|
258
|
-
_react2.default.createElement(SendButton, _extends({
|
|
259
|
-
display: 'rounded',
|
|
260
|
-
appearance: 'cta',
|
|
261
|
-
icon: 'send',
|
|
262
|
-
width: 30,
|
|
263
|
-
height: 30,
|
|
264
|
-
iconWidth: 12,
|
|
265
|
-
iconHeight: 11,
|
|
266
|
-
tabIndex: '0',
|
|
267
|
-
onClick: function onClick() {
|
|
268
|
-
return _this2.onCommentEnter();
|
|
269
|
-
}
|
|
270
|
-
}, this.props))
|
|
271
|
-
),
|
|
272
|
-
_react2.default.createElement(
|
|
273
|
-
EditBlock,
|
|
274
|
-
{
|
|
275
|
-
active: !commentActive,
|
|
276
|
-
leftMarker: player.leftMarker,
|
|
277
|
-
rightMarker: player.rightMarker,
|
|
278
|
-
onClick: function onClick() {
|
|
279
|
-
return _this2.onClick('comment');
|
|
280
|
-
}
|
|
281
|
-
},
|
|
282
|
-
_react2.default.createElement(_components.Icon, { name: 'comment', width: 14, height: 14 }),
|
|
283
|
-
_react2.default.createElement(
|
|
284
|
-
'p',
|
|
285
|
-
null,
|
|
286
|
-
'Comment'
|
|
287
|
-
)
|
|
288
|
-
),
|
|
289
|
-
playerType === 'snp_edit' && assetType === 'fc' && contentType !== 'promo' && _react2.default.createElement(
|
|
290
|
-
EditBlock,
|
|
291
|
-
{
|
|
292
|
-
active: !commentActive,
|
|
293
|
-
leftMarker: player.leftMarker,
|
|
294
|
-
rightMarker: player.rightMarker,
|
|
295
|
-
onClick: function onClick() {
|
|
296
|
-
return _this2.onClick('edit_out');
|
|
297
|
-
}
|
|
298
|
-
},
|
|
299
|
-
_react2.default.createElement(_components.Icon, { name: 'cut', width: 14, height: 14 }),
|
|
300
|
-
_react2.default.createElement(
|
|
301
|
-
'p',
|
|
302
|
-
null,
|
|
303
|
-
'Edit Out'
|
|
304
|
-
)
|
|
305
|
-
),
|
|
306
|
-
(playerType === 'snp_edit' && assetType === 'fc' && contentType !== 'promo' || playerType === 'dubbing_review') && _react2.default.createElement(
|
|
307
|
-
_react2.default.Fragment,
|
|
308
|
-
null,
|
|
309
|
-
_react2.default.createElement(
|
|
310
|
-
EditBlock,
|
|
311
|
-
{
|
|
312
|
-
active: !commentActive,
|
|
313
|
-
leftMarker: player.leftMarker,
|
|
314
|
-
rightMarker: player.rightMarker,
|
|
315
|
-
onClick: function onClick() {
|
|
316
|
-
return _this2.onClick('mute');
|
|
317
|
-
}
|
|
318
|
-
},
|
|
319
|
-
_react2.default.createElement(_components.Icon, { name: 'mute', width: 14, height: 14 }),
|
|
320
|
-
_react2.default.createElement(
|
|
321
|
-
'p',
|
|
322
|
-
null,
|
|
323
|
-
'Mute'
|
|
324
|
-
)
|
|
325
|
-
),
|
|
326
|
-
_react2.default.createElement(
|
|
327
|
-
EditBlock,
|
|
328
|
-
{
|
|
329
|
-
active: !commentActive,
|
|
330
|
-
leftMarker: player.leftMarker,
|
|
331
|
-
rightMarker: player.rightMarker,
|
|
332
|
-
onClick: function onClick() {
|
|
333
|
-
return _this2.onClick('mute-beep');
|
|
334
|
-
}
|
|
335
|
-
},
|
|
336
|
-
_react2.default.createElement(_components.Icon, { name: 'mute-beep', width: 14, height: 14 }),
|
|
337
|
-
_react2.default.createElement(
|
|
338
|
-
'p',
|
|
339
|
-
null,
|
|
340
|
-
'Beep'
|
|
341
|
-
)
|
|
342
|
-
)
|
|
343
|
-
),
|
|
344
|
-
playerType === 'snp_edit' && assetType === 'fc' && contentType !== 'promo' && _react2.default.createElement(
|
|
345
|
-
_react2.default.Fragment,
|
|
346
|
-
null,
|
|
347
|
-
_react2.default.createElement(
|
|
348
|
-
EditBlock,
|
|
349
|
-
{
|
|
350
|
-
active: !commentActive,
|
|
351
|
-
leftMarker: player.leftMarker,
|
|
352
|
-
rightMarker: player.rightMarker,
|
|
353
|
-
onClick: function onClick() {
|
|
354
|
-
return _this2.onClick('blur');
|
|
355
|
-
}
|
|
356
|
-
},
|
|
357
|
-
_react2.default.createElement(_components.Icon, { name: 'blur', width: 14, height: 14 }),
|
|
358
|
-
_react2.default.createElement(
|
|
359
|
-
'p',
|
|
360
|
-
null,
|
|
361
|
-
'Blur'
|
|
362
|
-
)
|
|
363
|
-
),
|
|
364
|
-
_react2.default.createElement(
|
|
365
|
-
EditBlock,
|
|
366
|
-
{
|
|
367
|
-
active: !commentActive,
|
|
368
|
-
leftMarker: player.leftMarker,
|
|
369
|
-
rightMarker: player.rightMarker,
|
|
370
|
-
onClick: function onClick() {
|
|
371
|
-
return _this2.onClick('no_smoking');
|
|
372
|
-
}
|
|
373
|
-
},
|
|
374
|
-
_react2.default.createElement(_components.Icon, { name: 'no_smoking', width: 14, height: 14 }),
|
|
375
|
-
_react2.default.createElement(
|
|
376
|
-
'p',
|
|
377
|
-
null,
|
|
378
|
-
'Smoking Disclaimer'
|
|
379
|
-
)
|
|
380
|
-
),
|
|
381
|
-
_react2.default.createElement(
|
|
382
|
-
EditBlock,
|
|
383
|
-
{
|
|
384
|
-
active: !commentActive,
|
|
385
|
-
leftMarker: player.leftMarker,
|
|
386
|
-
rightMarker: player.rightMarker,
|
|
387
|
-
onClick: function onClick() {
|
|
388
|
-
return _this2.onClick('no_drinking');
|
|
389
|
-
}
|
|
390
|
-
},
|
|
391
|
-
_react2.default.createElement(_components.Icon, { name: 'no_drinking', width: 14, height: 14 }),
|
|
392
|
-
_react2.default.createElement(
|
|
393
|
-
'p',
|
|
394
|
-
null,
|
|
395
|
-
'Drinking Disclaimer'
|
|
396
|
-
)
|
|
397
|
-
)
|
|
398
|
-
)
|
|
399
|
-
)
|
|
400
|
-
) : null
|
|
401
|
-
);
|
|
402
|
-
}
|
|
403
|
-
}]);
|
|
404
|
-
|
|
405
|
-
return EditorControlMenuButton;
|
|
406
|
-
}(_react.Component);
|
|
407
|
-
|
|
408
|
-
exports.default = EditorControlMenuButton;
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
EditorControlMenuButton.propTypes = propTypes;
|
|
412
|
-
EditorControlMenuButton.displayName = 'EditorControlMenuButton';
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
|
|
7
|
-
var _ForwardReplayControl = require('./ForwardReplayControl');
|
|
8
|
-
|
|
9
|
-
var _ForwardReplayControl2 = _interopRequireDefault(_ForwardReplayControl);
|
|
10
|
-
|
|
11
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
-
|
|
13
|
-
// Pass mode into parent function
|
|
14
|
-
var ForwardControl = (0, _ForwardReplayControl2.default)('forward');
|
|
15
|
-
|
|
16
|
-
ForwardControl.displayName = 'ForwardControl';
|
|
17
|
-
exports.default = ForwardControl;
|
|
@@ -1,122 +0,0 @@
|
|
|
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 _propTypes = require('prop-types');
|
|
10
|
-
|
|
11
|
-
var _react = require('react');
|
|
12
|
-
|
|
13
|
-
var _react2 = _interopRequireDefault(_react);
|
|
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 propTypes = {
|
|
30
|
-
actions: _propTypes.PropTypes.instanceOf(Object),
|
|
31
|
-
seconds: _propTypes.PropTypes.number
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
var defaultProps = {
|
|
35
|
-
actions: {},
|
|
36
|
-
seconds: 0.04
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
var ForwardReplayButton = (0, _styledComponents2.default)(_components.Button).withConfig({
|
|
40
|
-
displayName: 'ForwardReplayControl__ForwardReplayButton',
|
|
41
|
-
componentId: 'sc-s2rlry-0'
|
|
42
|
-
})(['background:transparent;border:none;margin:0 10px;&:hover,&:focus{background:transparent;}']);
|
|
43
|
-
|
|
44
|
-
exports.default = function (mode) {
|
|
45
|
-
var ForwardReplayControl = function (_Component) {
|
|
46
|
-
_inherits(ForwardReplayControl, _Component);
|
|
47
|
-
|
|
48
|
-
function ForwardReplayControl(props, context) {
|
|
49
|
-
_classCallCheck(this, ForwardReplayControl);
|
|
50
|
-
|
|
51
|
-
var _this = _possibleConstructorReturn(this, (ForwardReplayControl.__proto__ || Object.getPrototypeOf(ForwardReplayControl)).call(this, props, context));
|
|
52
|
-
|
|
53
|
-
_this.handleClick = _this.handleClick.bind(_this);
|
|
54
|
-
return _this;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
_createClass(ForwardReplayControl, [{
|
|
58
|
-
key: 'getIcon',
|
|
59
|
-
value: function getIcon() {
|
|
60
|
-
var icon = '';
|
|
61
|
-
var seconds = this.props.seconds;
|
|
62
|
-
|
|
63
|
-
if (mode === 'forward') {
|
|
64
|
-
if (seconds === 10) {
|
|
65
|
-
icon = 'forward-10';
|
|
66
|
-
} else {
|
|
67
|
-
icon = 'triangle-double-right';
|
|
68
|
-
}
|
|
69
|
-
} else {
|
|
70
|
-
if (seconds === 10) {
|
|
71
|
-
icon = 'rewind-10';
|
|
72
|
-
} else {
|
|
73
|
-
icon = 'triangle-double-left';
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
return icon;
|
|
78
|
-
}
|
|
79
|
-
}, {
|
|
80
|
-
key: 'handleClick',
|
|
81
|
-
value: function handleClick() {
|
|
82
|
-
var _props = this.props,
|
|
83
|
-
actions = _props.actions,
|
|
84
|
-
seconds = _props.seconds;
|
|
85
|
-
// Depends mode to implement different actions
|
|
86
|
-
|
|
87
|
-
if (mode === 'forward') {
|
|
88
|
-
actions.forward(seconds);
|
|
89
|
-
} else {
|
|
90
|
-
actions.replay(seconds);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}, {
|
|
94
|
-
key: 'render',
|
|
95
|
-
value: function render() {
|
|
96
|
-
var _this2 = this;
|
|
97
|
-
|
|
98
|
-
var seconds = this.props.seconds;
|
|
99
|
-
|
|
100
|
-
return _react2.default.createElement(ForwardReplayButton, {
|
|
101
|
-
display: 'rounded',
|
|
102
|
-
appearance: 'cta',
|
|
103
|
-
icon: this.getIcon(),
|
|
104
|
-
iconWidth: seconds === 10 ? 22 : 14,
|
|
105
|
-
iconHeight: seconds === 10 ? 22 : 14,
|
|
106
|
-
width: 20,
|
|
107
|
-
height: 20,
|
|
108
|
-
ref: function ref(c) {
|
|
109
|
-
_this2.button = c;
|
|
110
|
-
},
|
|
111
|
-
onClick: this.handleClick
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
|
-
}]);
|
|
115
|
-
|
|
116
|
-
return ForwardReplayControl;
|
|
117
|
-
}(_react.Component);
|
|
118
|
-
|
|
119
|
-
ForwardReplayControl.propTypes = propTypes;
|
|
120
|
-
ForwardReplayControl.defaultProps = defaultProps;
|
|
121
|
-
return ForwardReplayControl;
|
|
122
|
-
};
|
|
@@ -1,101 +0,0 @@
|
|
|
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 propTypes = {
|
|
30
|
-
actions: _propTypes.PropTypes.instanceOf(Object),
|
|
31
|
-
player: _propTypes.PropTypes.instanceOf(Object),
|
|
32
|
-
playerType: _propTypes.PropTypes.oneOf(['dubbing_review', 'clipping_default', 'default', 'tagging', 'qc', 'subtitle', 'snp_edit', 'archive', 'restore', 'clipping', 'storyboard', 'panel'])
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
var defaultProps = {
|
|
36
|
-
actions: {},
|
|
37
|
-
player: {}
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
var FullscreenToggleButton = (0, _styledComponents2.default)(_components.Button).withConfig({
|
|
41
|
-
displayName: 'FullscreenToggle__FullscreenToggleButton',
|
|
42
|
-
componentId: 'sc-3sxzvl-0'
|
|
43
|
-
})(['background:transparent;border:none;margin:0 10px;&:hover,&:focus{background:transparent;svg path{fill:#00cec6;}}']);
|
|
44
|
-
|
|
45
|
-
var FullscreenToggle = function (_Component) {
|
|
46
|
-
_inherits(FullscreenToggle, _Component);
|
|
47
|
-
|
|
48
|
-
function FullscreenToggle(props, context) {
|
|
49
|
-
_classCallCheck(this, FullscreenToggle);
|
|
50
|
-
|
|
51
|
-
var _this = _possibleConstructorReturn(this, (FullscreenToggle.__proto__ || Object.getPrototypeOf(FullscreenToggle)).call(this, props, context));
|
|
52
|
-
|
|
53
|
-
_this.handleClick = _this.handleClick.bind(_this);
|
|
54
|
-
return _this;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
_createClass(FullscreenToggle, [{
|
|
58
|
-
key: 'handleClick',
|
|
59
|
-
value: function handleClick() {
|
|
60
|
-
var _props = this.props,
|
|
61
|
-
player = _props.player,
|
|
62
|
-
actions = _props.actions;
|
|
63
|
-
|
|
64
|
-
actions.toggleFullscreen(player);
|
|
65
|
-
}
|
|
66
|
-
}, {
|
|
67
|
-
key: 'render',
|
|
68
|
-
value: function render() {
|
|
69
|
-
var _this2 = this;
|
|
70
|
-
|
|
71
|
-
var playerType = this.props.playerType;
|
|
72
|
-
|
|
73
|
-
return _react2.default.createElement(
|
|
74
|
-
_react2.default.Fragment,
|
|
75
|
-
null,
|
|
76
|
-
playerType !== 'panel' ? _react2.default.createElement(FullscreenToggleButton, {
|
|
77
|
-
display: 'rounded',
|
|
78
|
-
appearance: 'cta',
|
|
79
|
-
icon: 'fullscreen',
|
|
80
|
-
ref: function ref(c) {
|
|
81
|
-
_this2.button = c;
|
|
82
|
-
},
|
|
83
|
-
onClick: this.handleClick,
|
|
84
|
-
iconWidth: 14,
|
|
85
|
-
iconHeight: 14,
|
|
86
|
-
width: 20,
|
|
87
|
-
height: 20
|
|
88
|
-
}) : null
|
|
89
|
-
);
|
|
90
|
-
}
|
|
91
|
-
}]);
|
|
92
|
-
|
|
93
|
-
return FullscreenToggle;
|
|
94
|
-
}(_react.Component);
|
|
95
|
-
|
|
96
|
-
exports.default = FullscreenToggle;
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
FullscreenToggle.propTypes = propTypes;
|
|
100
|
-
FullscreenToggle.defaultProps = defaultProps;
|
|
101
|
-
FullscreenToggle.displayName = 'FullscreenToggle';
|