@vidispine/vdt-videojs-react 22.4.0 → 23.1.0-pre.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.
- package/dist/index.es.js +22 -241
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +22 -241
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
package/dist/index.es.js
CHANGED
|
@@ -10,247 +10,28 @@ import { Player, ExternalControls, SeekBar, TimeCodeDisplay } from '@vidispine/v
|
|
|
10
10
|
import '@vidispine/vdt-videojs/dist/index.css';
|
|
11
11
|
import { jsx } from 'react/jsx-runtime';
|
|
12
12
|
|
|
13
|
-
var _excluded = ["
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
function
|
|
17
|
-
|
|
18
|
-
function
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
if (setPlayer) {
|
|
36
|
-
setPlayer(this.player);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
// eslint-disable-next-line camelcase
|
|
41
|
-
}, {
|
|
42
|
-
key: "UNSAFE_componentWillUpdate",
|
|
43
|
-
value: function UNSAFE_componentWillUpdate(props) {
|
|
44
|
-
var _this = this;
|
|
45
|
-
var createPlayer = function createPlayer() {
|
|
46
|
-
var setPlayer = props.setPlayer,
|
|
47
|
-
playerProps = _objectWithoutProperties(props, _excluded2);
|
|
48
|
-
_this.player = new Player(_objectSpread$1({
|
|
49
|
-
target: _this.videoNode
|
|
50
|
-
}, playerProps));
|
|
51
|
-
if (setPlayer) {
|
|
52
|
-
setPlayer(_this.player);
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
if (props.sources && props.sources[0] && props.sources[0].src) {
|
|
56
|
-
// sources changed
|
|
57
|
-
if (!(this.props.sources[0].src === props.sources[0].src)) {
|
|
58
|
-
if (this.player) {
|
|
59
|
-
this.player.videojs.pause();
|
|
60
|
-
// Wait a frame until player is paused
|
|
61
|
-
setTimeout(function () {
|
|
62
|
-
_this.player.videojs.dispose();
|
|
63
|
-
createPlayer();
|
|
64
|
-
}, 0);
|
|
65
|
-
} else {
|
|
66
|
-
createPlayer();
|
|
67
|
-
}
|
|
68
|
-
} else {
|
|
69
|
-
// update reactive props
|
|
70
|
-
this.player.handleNewProps(props);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
// destroy player on unmount
|
|
76
|
-
}, {
|
|
77
|
-
key: "componentWillUnmount",
|
|
78
|
-
value: function componentWillUnmount() {
|
|
79
|
-
var onUnmount = this.props.onUnmount;
|
|
80
|
-
if (this.player) {
|
|
81
|
-
if (onUnmount) onUnmount(this.player);
|
|
82
|
-
this.player.destroy();
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
// wrap the player in a div with a `data-vjs-player` attribute
|
|
87
|
-
// so videojs won't create additional wrapper in the DOM
|
|
88
|
-
// see https://github.com/videojs/video.js/pull/3856
|
|
89
|
-
}, {
|
|
90
|
-
key: "render",
|
|
91
|
-
value: function render() {
|
|
92
|
-
var _this2 = this;
|
|
93
|
-
return /*#__PURE__*/jsx("div", {
|
|
94
|
-
className: "data-vjs-player",
|
|
95
|
-
children: /*#__PURE__*/jsx("div", {
|
|
96
|
-
ref: function ref(node) {
|
|
97
|
-
_this2.videoNode = node;
|
|
98
|
-
}
|
|
99
|
-
})
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
}]);
|
|
103
|
-
return VideoPlayer;
|
|
104
|
-
}(Component);
|
|
105
|
-
|
|
106
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
107
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
108
|
-
function _createSuper$2(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$2(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
109
|
-
function _isNativeReflectConstruct$2() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
110
|
-
var VideoControls = /*#__PURE__*/function (_Component) {
|
|
111
|
-
_inherits(VideoControls, _Component);
|
|
112
|
-
var _super = _createSuper$2(VideoControls);
|
|
113
|
-
function VideoControls() {
|
|
114
|
-
_classCallCheck(this, VideoControls);
|
|
115
|
-
return _super.apply(this, arguments);
|
|
116
|
-
}
|
|
117
|
-
_createClass(VideoControls, [{
|
|
118
|
-
key: "componentDidMount",
|
|
119
|
-
value: function componentDidMount() {
|
|
120
|
-
var player = this.props.player; // player prop is the whole react component
|
|
121
|
-
this.controls = new ExternalControls(_objectSpread(_objectSpread({
|
|
122
|
-
target: this.controlsNode
|
|
123
|
-
}, this.props), {}, {
|
|
124
|
-
player: player.current.player
|
|
125
|
-
}));
|
|
126
|
-
this.controls.handleNewProps(this.props);
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
// eslint-disable-next-line camelcase
|
|
130
|
-
}, {
|
|
131
|
-
key: "UNSAFE_componentWillUpdate",
|
|
132
|
-
value: function UNSAFE_componentWillUpdate(props) {
|
|
133
|
-
this.controls.handleNewProps(props);
|
|
134
|
-
}
|
|
135
|
-
}, {
|
|
136
|
-
key: "render",
|
|
137
|
-
value: function render() {
|
|
138
|
-
var _this = this;
|
|
139
|
-
return /*#__PURE__*/jsx("div", {
|
|
140
|
-
ref: function ref(node) {
|
|
141
|
-
_this.controlsNode = node;
|
|
142
|
-
}
|
|
143
|
-
});
|
|
144
|
-
}
|
|
145
|
-
}]);
|
|
146
|
-
return VideoControls;
|
|
147
|
-
}(Component);
|
|
148
|
-
VideoControls.buttonNames = ExternalControls.buttonNames;
|
|
149
|
-
|
|
150
|
-
function _createSuper$1(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
151
|
-
function _isNativeReflectConstruct$1() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
152
|
-
var VideoSeekBar = /*#__PURE__*/function (_Component) {
|
|
153
|
-
_inherits(VideoSeekBar, _Component);
|
|
154
|
-
var _super = _createSuper$1(VideoSeekBar);
|
|
155
|
-
function VideoSeekBar() {
|
|
156
|
-
_classCallCheck(this, VideoSeekBar);
|
|
157
|
-
return _super.apply(this, arguments);
|
|
158
|
-
}
|
|
159
|
-
_createClass(VideoSeekBar, [{
|
|
160
|
-
key: "componentDidMount",
|
|
161
|
-
value: function componentDidMount() {
|
|
162
|
-
var _this$props = this.props,
|
|
163
|
-
player = _this$props.player,
|
|
164
|
-
bgColor = _this$props.bgColor,
|
|
165
|
-
fillColor = _this$props.fillColor,
|
|
166
|
-
markersEnabled = _this$props.markersEnabled,
|
|
167
|
-
regions = _this$props.regions,
|
|
168
|
-
onRegionClick = _this$props.onRegionClick; // player prop is the whole react component
|
|
169
|
-
|
|
170
|
-
this.seekBar = new SeekBar({
|
|
171
|
-
target: this.seekBarNode,
|
|
172
|
-
player: player.current.player,
|
|
173
|
-
bgColor: bgColor,
|
|
174
|
-
fillColor: fillColor,
|
|
175
|
-
markersEnabled: markersEnabled,
|
|
176
|
-
/* eslint-disable-next-line react/destructuring-assignment */
|
|
177
|
-
"in": this.props["in"],
|
|
178
|
-
// can not use "in" with destructuring statement - reserved word
|
|
179
|
-
/* eslint-disable-next-line react/destructuring-assignment */
|
|
180
|
-
out: this.props.out,
|
|
181
|
-
regions: regions,
|
|
182
|
-
onRegionClick: onRegionClick
|
|
183
|
-
});
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
// eslint-disable-next-line camelcase
|
|
187
|
-
}, {
|
|
188
|
-
key: "UNSAFE_componentWillUpdate",
|
|
189
|
-
value: function UNSAFE_componentWillUpdate(props) {
|
|
190
|
-
this.seekBar.handleNewProps(props);
|
|
191
|
-
}
|
|
192
|
-
}, {
|
|
193
|
-
key: "render",
|
|
194
|
-
value: function render() {
|
|
195
|
-
var _this = this;
|
|
196
|
-
return /*#__PURE__*/jsx("div", {
|
|
197
|
-
ref: function ref(node) {
|
|
198
|
-
_this.seekBarNode = node;
|
|
199
|
-
}
|
|
200
|
-
});
|
|
201
|
-
}
|
|
202
|
-
}]);
|
|
203
|
-
return VideoSeekBar;
|
|
204
|
-
}(Component);
|
|
205
|
-
VideoSeekBar.Region = SeekBar.Region;
|
|
206
|
-
|
|
207
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
208
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
209
|
-
var VideoTimeCode = /*#__PURE__*/function (_Component) {
|
|
210
|
-
_inherits(VideoTimeCode, _Component);
|
|
211
|
-
var _super = _createSuper(VideoTimeCode);
|
|
212
|
-
function VideoTimeCode() {
|
|
213
|
-
_classCallCheck(this, VideoTimeCode);
|
|
214
|
-
return _super.apply(this, arguments);
|
|
215
|
-
}
|
|
216
|
-
_createClass(VideoTimeCode, [{
|
|
217
|
-
key: "componentDidMount",
|
|
218
|
-
value: function componentDidMount() {
|
|
219
|
-
var player = this.props.player; // player prop is the whole react component
|
|
220
|
-
this.timeCode = new TimeCodeDisplay({
|
|
221
|
-
target: this.timecodeNode,
|
|
222
|
-
player: player.current.player,
|
|
223
|
-
onInput: player.current.player
|
|
224
|
-
});
|
|
225
|
-
this.timeCode.update(this.props);
|
|
226
|
-
player.current.player.setupTimeCode(this.timeCode);
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
// eslint-disable-next-line camelcase
|
|
230
|
-
}, {
|
|
231
|
-
key: "UNSAFE_componentWillUpdate",
|
|
232
|
-
value: function UNSAFE_componentWillUpdate(props) {
|
|
233
|
-
this.timeCode.update(props);
|
|
234
|
-
}
|
|
235
|
-
}, {
|
|
236
|
-
key: "render",
|
|
237
|
-
value: function render() {
|
|
238
|
-
var _this = this;
|
|
239
|
-
var _this$props = this.props,
|
|
240
|
-
className = _this$props.className,
|
|
241
|
-
styles = _this$props.styles;
|
|
242
|
-
var ref = function ref(node) {
|
|
243
|
-
_this.timecodeNode = node;
|
|
244
|
-
};
|
|
245
|
-
return /*#__PURE__*/jsx("div", {
|
|
246
|
-
style: styles,
|
|
247
|
-
className: className,
|
|
248
|
-
ref: ref
|
|
249
|
-
});
|
|
250
|
-
}
|
|
251
|
-
}]);
|
|
252
|
-
return VideoTimeCode;
|
|
253
|
-
}(Component);
|
|
13
|
+
var _excluded=["setPlayer"],_excluded2=["setPlayer"];function ownKeys$1(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;})),keys.push.apply(keys,symbols);}return keys;}function _objectSpread$1(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?ownKeys$1(Object(source),!0).forEach(function(key){_defineProperty(target,key,source[key]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys$1(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key));});}return target;}function _createSuper$3(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct$3();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else {result=Super.apply(this,arguments);}return _possibleConstructorReturn(this,result);};}function _isNativeReflectConstruct$3(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true;}catch(e){return false;}}var VideoPlayer=/*#__PURE__*/function(_Component){_inherits(VideoPlayer,_Component);var _super=_createSuper$3(VideoPlayer);function VideoPlayer(){_classCallCheck(this,VideoPlayer);return _super.apply(this,arguments);}_createClass(VideoPlayer,[{key:"componentDidMount",value:function componentDidMount(){var _this$props=this.props,setPlayer=_this$props.setPlayer,playerProps=_objectWithoutProperties(_this$props,_excluded);this.player=new Player(_objectSpread$1({target:this.videoNode},playerProps));if(setPlayer){setPlayer(this.player);}}// eslint-disable-next-line camelcase
|
|
14
|
+
},{key:"UNSAFE_componentWillUpdate",value:function UNSAFE_componentWillUpdate(props){var _this=this;var createPlayer=function createPlayer(){var setPlayer=props.setPlayer,playerProps=_objectWithoutProperties(props,_excluded2);_this.player=new Player(_objectSpread$1({target:_this.videoNode},playerProps));if(setPlayer){setPlayer(_this.player);}};if(props.sources&&props.sources[0]&&props.sources[0].src){// sources changed
|
|
15
|
+
if(!(this.props.sources[0].src===props.sources[0].src)){if(this.player){this.player.videojs.pause();// Wait a frame until player is paused
|
|
16
|
+
setTimeout(function(){_this.player.videojs.dispose();createPlayer();},0);}else {createPlayer();}}else {// update reactive props
|
|
17
|
+
this.player.handleNewProps(props);}}}// destroy player on unmount
|
|
18
|
+
},{key:"componentWillUnmount",value:function componentWillUnmount(){var onUnmount=this.props.onUnmount;if(this.player){if(onUnmount)onUnmount(this.player);this.player.destroy();}}// wrap the player in a div with a `data-vjs-player` attribute
|
|
19
|
+
// so videojs won't create additional wrapper in the DOM
|
|
20
|
+
// see https://github.com/videojs/video.js/pull/3856
|
|
21
|
+
},{key:"render",value:function render(){var _this2=this;return/*#__PURE__*/jsx("div",{className:"data-vjs-player",children:/*#__PURE__*/jsx("div",{ref:function ref(node){_this2.videoNode=node;}})});}}]);return VideoPlayer;}(Component);
|
|
22
|
+
|
|
23
|
+
function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;})),keys.push.apply(keys,symbols);}return keys;}function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?ownKeys(Object(source),!0).forEach(function(key){_defineProperty(target,key,source[key]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key));});}return target;}function _createSuper$2(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct$2();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else {result=Super.apply(this,arguments);}return _possibleConstructorReturn(this,result);};}function _isNativeReflectConstruct$2(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true;}catch(e){return false;}}var VideoControls=/*#__PURE__*/function(_Component){_inherits(VideoControls,_Component);var _super=_createSuper$2(VideoControls);function VideoControls(){_classCallCheck(this,VideoControls);return _super.apply(this,arguments);}_createClass(VideoControls,[{key:"componentDidMount",value:function componentDidMount(){var player=this.props.player;// player prop is the whole react component
|
|
24
|
+
this.controls=new ExternalControls(_objectSpread(_objectSpread({target:this.controlsNode},this.props),{},{player:player.current.player}));this.controls.handleNewProps(this.props);}// eslint-disable-next-line camelcase
|
|
25
|
+
},{key:"UNSAFE_componentWillUpdate",value:function UNSAFE_componentWillUpdate(props){this.controls.handleNewProps(props);}},{key:"render",value:function render(){var _this=this;return/*#__PURE__*/jsx("div",{ref:function ref(node){_this.controlsNode=node;}});}}]);return VideoControls;}(Component);VideoControls.buttonNames=ExternalControls.buttonNames;
|
|
26
|
+
|
|
27
|
+
function _createSuper$1(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct$1();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else {result=Super.apply(this,arguments);}return _possibleConstructorReturn(this,result);};}function _isNativeReflectConstruct$1(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true;}catch(e){return false;}}var VideoSeekBar=/*#__PURE__*/function(_Component){_inherits(VideoSeekBar,_Component);var _super=_createSuper$1(VideoSeekBar);function VideoSeekBar(){_classCallCheck(this,VideoSeekBar);return _super.apply(this,arguments);}_createClass(VideoSeekBar,[{key:"componentDidMount",value:function componentDidMount(){var _this$props=this.props,player=_this$props.player,bgColor=_this$props.bgColor,fillColor=_this$props.fillColor,markersEnabled=_this$props.markersEnabled,regions=_this$props.regions,onRegionClick=_this$props.onRegionClick;// player prop is the whole react component
|
|
28
|
+
this.seekBar=new SeekBar({target:this.seekBarNode,player:player.current.player,bgColor:bgColor,fillColor:fillColor,markersEnabled:markersEnabled,/* eslint-disable-next-line react/destructuring-assignment */"in":this.props["in"],// can not use "in" with destructuring statement - reserved word
|
|
29
|
+
/* eslint-disable-next-line react/destructuring-assignment */out:this.props.out,regions:regions,onRegionClick:onRegionClick});}// eslint-disable-next-line camelcase
|
|
30
|
+
},{key:"UNSAFE_componentWillUpdate",value:function UNSAFE_componentWillUpdate(props){this.seekBar.handleNewProps(props);}},{key:"render",value:function render(){var _this=this;return/*#__PURE__*/jsx("div",{ref:function ref(node){_this.seekBarNode=node;}});}}]);return VideoSeekBar;}(Component);VideoSeekBar.Region=SeekBar.Region;
|
|
31
|
+
|
|
32
|
+
function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else {result=Super.apply(this,arguments);}return _possibleConstructorReturn(this,result);};}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true;}catch(e){return false;}}var VideoTimeCode=/*#__PURE__*/function(_Component){_inherits(VideoTimeCode,_Component);var _super=_createSuper(VideoTimeCode);function VideoTimeCode(){_classCallCheck(this,VideoTimeCode);return _super.apply(this,arguments);}_createClass(VideoTimeCode,[{key:"componentDidMount",value:function componentDidMount(){var player=this.props.player;// player prop is the whole react component
|
|
33
|
+
this.timeCode=new TimeCodeDisplay({target:this.timecodeNode,player:player.current.player,onInput:player.current.player});this.timeCode.update(this.props);player.current.player.setupTimeCode(this.timeCode);}// eslint-disable-next-line camelcase
|
|
34
|
+
},{key:"UNSAFE_componentWillUpdate",value:function UNSAFE_componentWillUpdate(props){this.timeCode.update(props);}},{key:"render",value:function render(){var _this=this;var _this$props=this.props,className=_this$props.className,styles=_this$props.styles;var ref=function ref(node){_this.timecodeNode=node;};return/*#__PURE__*/jsx("div",{style:styles,className:className,ref:ref});}}]);return VideoTimeCode;}(Component);
|
|
254
35
|
|
|
255
36
|
export { VideoControls, VideoPlayer, VideoSeekBar, VideoTimeCode };
|
|
256
37
|
//# sourceMappingURL=index.es.js.map
|
package/dist/index.es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es.js","sources":["../src/VideoPlayer.js","../src/VideoControls.js","../src/VideoSeekBar.js","../src/VideoTimeCode.js"],"sourcesContent":["/* eslint-disable react/destructuring-assignment */\n/* eslint-disable import/prefer-default-export */\nimport { Component } from 'react';\n\nimport { Player } from '@vidispine/vdt-videojs';\n\nimport '@vidispine/vdt-videojs/dist/index.css';\n\nexport class VideoPlayer extends Component {\n componentDidMount() {\n const { setPlayer, ...playerProps } = this.props;\n\n this.player = new Player({\n target: this.videoNode,\n ...playerProps,\n });\n\n if (setPlayer) {\n setPlayer(this.player);\n }\n }\n\n // eslint-disable-next-line camelcase\n UNSAFE_componentWillUpdate(props) {\n const createPlayer = () => {\n const { setPlayer, ...playerProps } = props;\n this.player = new Player({\n target: this.videoNode,\n ...playerProps,\n });\n if (setPlayer) {\n setPlayer(this.player);\n }\n };\n\n if (props.sources && props.sources[0] && props.sources[0].src) {\n // sources changed\n if (!(this.props.sources[0].src === props.sources[0].src)) {\n if (this.player) {\n this.player.videojs.pause();\n // Wait a frame until player is paused\n setTimeout(() => {\n this.player.videojs.dispose();\n createPlayer();\n }, 0);\n } else {\n createPlayer();\n }\n } else {\n // update reactive props\n this.player.handleNewProps(props);\n }\n }\n }\n\n // destroy player on unmount\n componentWillUnmount() {\n const { onUnmount } = this.props;\n\n if (this.player) {\n if (onUnmount) onUnmount(this.player);\n this.player.destroy();\n }\n }\n\n // wrap the player in a div with a `data-vjs-player` attribute\n // so videojs won't create additional wrapper in the DOM\n // see https://github.com/videojs/video.js/pull/3856\n render() {\n return (\n <div className=\"data-vjs-player\">\n <div\n ref={(node) => {\n this.videoNode = node;\n }}\n />\n </div>\n );\n }\n}\n","/* eslint-disable import/prefer-default-export */\nimport { Component } from 'react';\n\nimport { ExternalControls } from '@vidispine/vdt-videojs';\n\nexport class VideoControls extends Component {\n componentDidMount() {\n const { player } = this.props; // player prop is the whole react component\n this.controls = new ExternalControls({\n target: this.controlsNode,\n ...this.props,\n player: player.current.player,\n });\n\n this.controls.handleNewProps(this.props);\n }\n\n // eslint-disable-next-line camelcase\n UNSAFE_componentWillUpdate(props) {\n this.controls.handleNewProps(props);\n }\n\n render() {\n return (\n <div\n ref={(node) => {\n this.controlsNode = node;\n }}\n />\n );\n }\n}\n\nVideoControls.buttonNames = ExternalControls.buttonNames;\n","import { Component } from 'react';\n\nimport { SeekBar } from '@vidispine/vdt-videojs';\n\nexport class VideoSeekBar extends Component {\n componentDidMount() {\n const { player, bgColor, fillColor, markersEnabled, regions, onRegionClick } = this.props; // player prop is the whole react component\n\n this.seekBar = new SeekBar({\n target: this.seekBarNode,\n player: player.current.player,\n bgColor,\n fillColor,\n markersEnabled,\n /* eslint-disable-next-line react/destructuring-assignment */\n in: this.props.in, // can not use \"in\" with destructuring statement - reserved word\n /* eslint-disable-next-line react/destructuring-assignment */\n out: this.props.out,\n regions,\n onRegionClick,\n });\n }\n\n // eslint-disable-next-line camelcase\n UNSAFE_componentWillUpdate(props) {\n this.seekBar.handleNewProps(props);\n }\n\n render() {\n return (\n <div\n ref={(node) => {\n this.seekBarNode = node;\n }}\n />\n );\n }\n}\n\nVideoSeekBar.Region = SeekBar.Region;\n\nexport default VideoSeekBar;\n","import { Component } from 'react';\n\nimport { TimeCodeDisplay } from '@vidispine/vdt-videojs';\n\nexport class VideoTimeCode extends Component {\n componentDidMount() {\n const { player } = this.props; // player prop is the whole react component\n this.timeCode = new TimeCodeDisplay({\n target: this.timecodeNode,\n player: player.current.player,\n onInput: player.current.player,\n });\n\n this.timeCode.update(this.props);\n player.current.player.setupTimeCode(this.timeCode);\n }\n\n // eslint-disable-next-line camelcase\n UNSAFE_componentWillUpdate(props) {\n this.timeCode.update(props);\n }\n\n render() {\n const { className, styles } = this.props;\n const ref = (node) => {\n this.timecodeNode = node;\n };\n return <div style={styles} className={className} ref={ref} />;\n }\n}\n\nexport default VideoTimeCode;\n"],"names":["VideoPlayer","_createSuper","props","setPlayer","playerProps","player","Player","_objectSpread","target","videoNode","createPlayer","sources","src","videojs","pause","setTimeout","dispose","handleNewProps","onUnmount","destroy","_jsx","node","Component","VideoControls","controls","ExternalControls","controlsNode","current","buttonNames","VideoSeekBar","bgColor","fillColor","markersEnabled","regions","onRegionClick","seekBar","SeekBar","seekBarNode","out","Region","VideoTimeCode","timeCode","TimeCodeDisplay","timecodeNode","onInput","update","setupTimeCode","className","styles","ref"],"mappings":";;;;;;;;;;;;;;;;;;AAQA,IAAaA,WAAW,gBAAA,UAAA,UAAA,EAAA;AAAA,EAAA,SAAA,CAAA,WAAA,EAAA,UAAA,CAAA,CAAA;AAAA,EAAA,IAAA,MAAA,GAAAC,cAAA,CAAA,WAAA,CAAA,CAAA;AAAA,EAAA,SAAA,WAAA,GAAA;AAAA,IAAA,eAAA,CAAA,IAAA,EAAA,WAAA,CAAA,CAAA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,CAAA;MACP,IAA8B,WAAA,GAAA,IAAI,CAACA,KAAK;AAAhC6C,QAAAA,SAAS,eAATA,SAAS;AAAEC,QAAAA,MAAM,eAANA,MAAM,CAAA;AACzB,MAAA,IAAMC,GAAG,GAAG,SAANA,GAAG,CAAI5B,IAAI,EAAK;QACpB,KAAI,CAACsB,YAAY,GAAGtB,IAAI,CAAA;OACzB,CAAA;MACD,oBAAOD,GAAA,CAAA,KAAA,EAAA;AAAK,QAAA,KAAK,EAAE4B,MAAO;AAAC,QAAA,SAAS,EAAED,SAAU;AAAC,QAAA,GAAG,EAAEE,GAAAA;OAAO,CAAA,CAAA;AAC/D,KAAA;AAAC,GAAA,CAAA,CAAA,CAAA;AAAA,EAAA,OAAA,aAAA,CAAA;AAAA,CAAA,CAxBgC3B,SAAS;;;;"}
|
|
1
|
+
{"version":3,"file":"index.es.js","sources":["../src/VideoPlayer.js","../src/VideoControls.js","../src/VideoSeekBar.js","../src/VideoTimeCode.js"],"sourcesContent":["/* eslint-disable react/destructuring-assignment */\n/* eslint-disable import/prefer-default-export */\nimport { Component } from 'react';\n\nimport { Player } from '@vidispine/vdt-videojs';\n\nimport '@vidispine/vdt-videojs/dist/index.css';\n\nexport class VideoPlayer extends Component {\n componentDidMount() {\n const { setPlayer, ...playerProps } = this.props;\n\n this.player = new Player({\n target: this.videoNode,\n ...playerProps,\n });\n\n if (setPlayer) {\n setPlayer(this.player);\n }\n }\n\n // eslint-disable-next-line camelcase\n UNSAFE_componentWillUpdate(props) {\n const createPlayer = () => {\n const { setPlayer, ...playerProps } = props;\n this.player = new Player({\n target: this.videoNode,\n ...playerProps,\n });\n if (setPlayer) {\n setPlayer(this.player);\n }\n };\n\n if (props.sources && props.sources[0] && props.sources[0].src) {\n // sources changed\n if (!(this.props.sources[0].src === props.sources[0].src)) {\n if (this.player) {\n this.player.videojs.pause();\n // Wait a frame until player is paused\n setTimeout(() => {\n this.player.videojs.dispose();\n createPlayer();\n }, 0);\n } else {\n createPlayer();\n }\n } else {\n // update reactive props\n this.player.handleNewProps(props);\n }\n }\n }\n\n // destroy player on unmount\n componentWillUnmount() {\n const { onUnmount } = this.props;\n\n if (this.player) {\n if (onUnmount) onUnmount(this.player);\n this.player.destroy();\n }\n }\n\n // wrap the player in a div with a `data-vjs-player` attribute\n // so videojs won't create additional wrapper in the DOM\n // see https://github.com/videojs/video.js/pull/3856\n render() {\n return (\n <div className=\"data-vjs-player\">\n <div\n ref={(node) => {\n this.videoNode = node;\n }}\n />\n </div>\n );\n }\n}\n","/* eslint-disable import/prefer-default-export */\nimport { Component } from 'react';\n\nimport { ExternalControls } from '@vidispine/vdt-videojs';\n\nexport class VideoControls extends Component {\n componentDidMount() {\n const { player } = this.props; // player prop is the whole react component\n this.controls = new ExternalControls({\n target: this.controlsNode,\n ...this.props,\n player: player.current.player,\n });\n\n this.controls.handleNewProps(this.props);\n }\n\n // eslint-disable-next-line camelcase\n UNSAFE_componentWillUpdate(props) {\n this.controls.handleNewProps(props);\n }\n\n render() {\n return (\n <div\n ref={(node) => {\n this.controlsNode = node;\n }}\n />\n );\n }\n}\n\nVideoControls.buttonNames = ExternalControls.buttonNames;\n","import { Component } from 'react';\n\nimport { SeekBar } from '@vidispine/vdt-videojs';\n\nexport class VideoSeekBar extends Component {\n componentDidMount() {\n const { player, bgColor, fillColor, markersEnabled, regions, onRegionClick } = this.props; // player prop is the whole react component\n\n this.seekBar = new SeekBar({\n target: this.seekBarNode,\n player: player.current.player,\n bgColor,\n fillColor,\n markersEnabled,\n /* eslint-disable-next-line react/destructuring-assignment */\n in: this.props.in, // can not use \"in\" with destructuring statement - reserved word\n /* eslint-disable-next-line react/destructuring-assignment */\n out: this.props.out,\n regions,\n onRegionClick,\n });\n }\n\n // eslint-disable-next-line camelcase\n UNSAFE_componentWillUpdate(props) {\n this.seekBar.handleNewProps(props);\n }\n\n render() {\n return (\n <div\n ref={(node) => {\n this.seekBarNode = node;\n }}\n />\n );\n }\n}\n\nVideoSeekBar.Region = SeekBar.Region;\n\nexport default VideoSeekBar;\n","import { Component } from 'react';\n\nimport { TimeCodeDisplay } from '@vidispine/vdt-videojs';\n\nexport class VideoTimeCode extends Component {\n componentDidMount() {\n const { player } = this.props; // player prop is the whole react component\n this.timeCode = new TimeCodeDisplay({\n target: this.timecodeNode,\n player: player.current.player,\n onInput: player.current.player,\n });\n\n this.timeCode.update(this.props);\n player.current.player.setupTimeCode(this.timeCode);\n }\n\n // eslint-disable-next-line camelcase\n UNSAFE_componentWillUpdate(props) {\n this.timeCode.update(props);\n }\n\n render() {\n const { className, styles } = this.props;\n const ref = (node) => {\n this.timecodeNode = node;\n };\n return <div style={styles} className={className} ref={ref} />;\n }\n}\n\nexport default VideoTimeCode;\n"],"names":["VideoPlayer","_createSuper","props","setPlayer","playerProps","player","Player","target","videoNode","createPlayer","sources","src","videojs","pause","setTimeout","dispose","handleNewProps","onUnmount","destroy","_jsx","node","Component","VideoControls","controls","ExternalControls","controlsNode","current","buttonNames","_isNativeReflectConstruct","VideoSeekBar","bgColor","fillColor","markersEnabled","regions","onRegionClick","seekBar","SeekBar","seekBarNode","out","Region","VideoTimeCode","timeCode","TimeCodeDisplay","timecodeNode","onInput","update","setupTimeCode","className","styles","ref"],"mappings":";;;;;;;;;;;;2/CAQaA,IAAAA,WAAW,cACtB,SAAA,UAAA,CAAA,CAAA,SAAA,CAAA,WAAA,CAAA,UAAA,CAAA,CAAA,IAAA,MAAA,CAAAC,cAAA,CAAA,WAAA,CAAA,CAAA,SAAA,WAAA,EAAA,CAAA,eAAA,CAAA,IAAA,CAAA,WAAA,CAAA,CAAA,OAAA,MAAA,CAAA,KAAA,CAAA,IAAA,CAAA,SAAA,CAAA,CAAA,CAAA,YAAA,CAAA,WAAA,CAAA,CAAA,CAAA,GAAA,CAAA,mBAAA,CAAA,KAAA,CAAA,SAAA,iBAAA,EAAoB,CAClB,IAAA,WAAA,CAAsC,IAAI,CAACC,KAAK,CAAxCC,SAAS,CAAA,WAAA,CAATA,SAAS,CAAKC,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,CAACI,MAAM,CAAC,IAAI,CAAC3C,KAAK,CAAC,CAChCG,MAAM,CAACqB,OAAO,CAACrB,MAAM,CAACyC,aAAa,CAAC,IAAI,CAACL,QAAQ,CAAC,CACpD,CAEA;AAAA,CAAA,CAAA,CAAA,GAAA,CAAA,4BAAA,CAAA,KAAA,CACA,SAA2BvC,0BAAAA,CAAAA,KAAK,CAAE,CAChC,IAAI,CAACuC,QAAQ,CAACI,MAAM,CAAC3C,KAAK,CAAC,CAC7B,CAAC,CAAA,CAAA,CAAA,GAAA,CAAA,QAAA,CAAA,KAAA,CAED,SAAS,MAAA,EAAA,CAAA,IAAA,KAAA,CAAA,IAAA,CACP,IAA8B,WAAA,CAAA,IAAI,CAACA,KAAK,CAAhC6C,SAAS,CAAA,WAAA,CAATA,SAAS,CAAEC,MAAM,CAAA,WAAA,CAANA,MAAM,CACzB,IAAS,GAAA,CAAG,SAANC,GAAG,CAAI7B,IAAI,CAAK,CACpB,KAAI,CAACuB,YAAY,CAAGvB,IAAI,CAC1B,CAAC,CACD,mBAAOD,WAAK,KAAK,CAAE6B,MAAO,CAAC,SAAS,CAAED,SAAU,CAAC,GAAG,CAAEE,GAAI,CAAG,CAAA,CAC/D,CAAC,CAAA,CAAA,CAAA,CAAA,OAAA,aAAA,CAAA,CAAA,CAxBgC5B,SAAS;;;;"}
|
package/dist/index.js
CHANGED
|
@@ -24,247 +24,28 @@ var _inherits__default = /*#__PURE__*/_interopDefaultLegacy(_inherits);
|
|
|
24
24
|
var _possibleConstructorReturn__default = /*#__PURE__*/_interopDefaultLegacy(_possibleConstructorReturn);
|
|
25
25
|
var _getPrototypeOf__default = /*#__PURE__*/_interopDefaultLegacy(_getPrototypeOf);
|
|
26
26
|
|
|
27
|
-
var _excluded = ["setPlayer"],
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
function
|
|
31
|
-
|
|
32
|
-
function
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
if (setPlayer) {
|
|
50
|
-
setPlayer(this.player);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
// eslint-disable-next-line camelcase
|
|
55
|
-
}, {
|
|
56
|
-
key: "UNSAFE_componentWillUpdate",
|
|
57
|
-
value: function UNSAFE_componentWillUpdate(props) {
|
|
58
|
-
var _this = this;
|
|
59
|
-
var createPlayer = function createPlayer() {
|
|
60
|
-
var setPlayer = props.setPlayer,
|
|
61
|
-
playerProps = _objectWithoutProperties__default["default"](props, _excluded2);
|
|
62
|
-
_this.player = new vdtVideojs.Player(_objectSpread$1({
|
|
63
|
-
target: _this.videoNode
|
|
64
|
-
}, playerProps));
|
|
65
|
-
if (setPlayer) {
|
|
66
|
-
setPlayer(_this.player);
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
if (props.sources && props.sources[0] && props.sources[0].src) {
|
|
70
|
-
// sources changed
|
|
71
|
-
if (!(this.props.sources[0].src === props.sources[0].src)) {
|
|
72
|
-
if (this.player) {
|
|
73
|
-
this.player.videojs.pause();
|
|
74
|
-
// Wait a frame until player is paused
|
|
75
|
-
setTimeout(function () {
|
|
76
|
-
_this.player.videojs.dispose();
|
|
77
|
-
createPlayer();
|
|
78
|
-
}, 0);
|
|
79
|
-
} else {
|
|
80
|
-
createPlayer();
|
|
81
|
-
}
|
|
82
|
-
} else {
|
|
83
|
-
// update reactive props
|
|
84
|
-
this.player.handleNewProps(props);
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
// destroy player on unmount
|
|
90
|
-
}, {
|
|
91
|
-
key: "componentWillUnmount",
|
|
92
|
-
value: function componentWillUnmount() {
|
|
93
|
-
var onUnmount = this.props.onUnmount;
|
|
94
|
-
if (this.player) {
|
|
95
|
-
if (onUnmount) onUnmount(this.player);
|
|
96
|
-
this.player.destroy();
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
// wrap the player in a div with a `data-vjs-player` attribute
|
|
101
|
-
// so videojs won't create additional wrapper in the DOM
|
|
102
|
-
// see https://github.com/videojs/video.js/pull/3856
|
|
103
|
-
}, {
|
|
104
|
-
key: "render",
|
|
105
|
-
value: function render() {
|
|
106
|
-
var _this2 = this;
|
|
107
|
-
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
108
|
-
className: "data-vjs-player",
|
|
109
|
-
children: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
110
|
-
ref: function ref(node) {
|
|
111
|
-
_this2.videoNode = node;
|
|
112
|
-
}
|
|
113
|
-
})
|
|
114
|
-
});
|
|
115
|
-
}
|
|
116
|
-
}]);
|
|
117
|
-
return VideoPlayer;
|
|
118
|
-
}(react.Component);
|
|
119
|
-
|
|
120
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
121
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty__default["default"](target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
122
|
-
function _createSuper$2(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$2(); return function _createSuperInternal() { var Super = _getPrototypeOf__default["default"](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default["default"](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default["default"](this, result); }; }
|
|
123
|
-
function _isNativeReflectConstruct$2() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
124
|
-
var VideoControls = /*#__PURE__*/function (_Component) {
|
|
125
|
-
_inherits__default["default"](VideoControls, _Component);
|
|
126
|
-
var _super = _createSuper$2(VideoControls);
|
|
127
|
-
function VideoControls() {
|
|
128
|
-
_classCallCheck__default["default"](this, VideoControls);
|
|
129
|
-
return _super.apply(this, arguments);
|
|
130
|
-
}
|
|
131
|
-
_createClass__default["default"](VideoControls, [{
|
|
132
|
-
key: "componentDidMount",
|
|
133
|
-
value: function componentDidMount() {
|
|
134
|
-
var player = this.props.player; // player prop is the whole react component
|
|
135
|
-
this.controls = new vdtVideojs.ExternalControls(_objectSpread(_objectSpread({
|
|
136
|
-
target: this.controlsNode
|
|
137
|
-
}, this.props), {}, {
|
|
138
|
-
player: player.current.player
|
|
139
|
-
}));
|
|
140
|
-
this.controls.handleNewProps(this.props);
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
// eslint-disable-next-line camelcase
|
|
144
|
-
}, {
|
|
145
|
-
key: "UNSAFE_componentWillUpdate",
|
|
146
|
-
value: function UNSAFE_componentWillUpdate(props) {
|
|
147
|
-
this.controls.handleNewProps(props);
|
|
148
|
-
}
|
|
149
|
-
}, {
|
|
150
|
-
key: "render",
|
|
151
|
-
value: function render() {
|
|
152
|
-
var _this = this;
|
|
153
|
-
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
154
|
-
ref: function ref(node) {
|
|
155
|
-
_this.controlsNode = node;
|
|
156
|
-
}
|
|
157
|
-
});
|
|
158
|
-
}
|
|
159
|
-
}]);
|
|
160
|
-
return VideoControls;
|
|
161
|
-
}(react.Component);
|
|
162
|
-
VideoControls.buttonNames = vdtVideojs.ExternalControls.buttonNames;
|
|
163
|
-
|
|
164
|
-
function _createSuper$1(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1(); return function _createSuperInternal() { var Super = _getPrototypeOf__default["default"](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default["default"](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default["default"](this, result); }; }
|
|
165
|
-
function _isNativeReflectConstruct$1() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
166
|
-
var VideoSeekBar = /*#__PURE__*/function (_Component) {
|
|
167
|
-
_inherits__default["default"](VideoSeekBar, _Component);
|
|
168
|
-
var _super = _createSuper$1(VideoSeekBar);
|
|
169
|
-
function VideoSeekBar() {
|
|
170
|
-
_classCallCheck__default["default"](this, VideoSeekBar);
|
|
171
|
-
return _super.apply(this, arguments);
|
|
172
|
-
}
|
|
173
|
-
_createClass__default["default"](VideoSeekBar, [{
|
|
174
|
-
key: "componentDidMount",
|
|
175
|
-
value: function componentDidMount() {
|
|
176
|
-
var _this$props = this.props,
|
|
177
|
-
player = _this$props.player,
|
|
178
|
-
bgColor = _this$props.bgColor,
|
|
179
|
-
fillColor = _this$props.fillColor,
|
|
180
|
-
markersEnabled = _this$props.markersEnabled,
|
|
181
|
-
regions = _this$props.regions,
|
|
182
|
-
onRegionClick = _this$props.onRegionClick; // player prop is the whole react component
|
|
183
|
-
|
|
184
|
-
this.seekBar = new vdtVideojs.SeekBar({
|
|
185
|
-
target: this.seekBarNode,
|
|
186
|
-
player: player.current.player,
|
|
187
|
-
bgColor: bgColor,
|
|
188
|
-
fillColor: fillColor,
|
|
189
|
-
markersEnabled: markersEnabled,
|
|
190
|
-
/* eslint-disable-next-line react/destructuring-assignment */
|
|
191
|
-
"in": this.props["in"],
|
|
192
|
-
// can not use "in" with destructuring statement - reserved word
|
|
193
|
-
/* eslint-disable-next-line react/destructuring-assignment */
|
|
194
|
-
out: this.props.out,
|
|
195
|
-
regions: regions,
|
|
196
|
-
onRegionClick: onRegionClick
|
|
197
|
-
});
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
// eslint-disable-next-line camelcase
|
|
201
|
-
}, {
|
|
202
|
-
key: "UNSAFE_componentWillUpdate",
|
|
203
|
-
value: function UNSAFE_componentWillUpdate(props) {
|
|
204
|
-
this.seekBar.handleNewProps(props);
|
|
205
|
-
}
|
|
206
|
-
}, {
|
|
207
|
-
key: "render",
|
|
208
|
-
value: function render() {
|
|
209
|
-
var _this = this;
|
|
210
|
-
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
211
|
-
ref: function ref(node) {
|
|
212
|
-
_this.seekBarNode = node;
|
|
213
|
-
}
|
|
214
|
-
});
|
|
215
|
-
}
|
|
216
|
-
}]);
|
|
217
|
-
return VideoSeekBar;
|
|
218
|
-
}(react.Component);
|
|
219
|
-
VideoSeekBar.Region = vdtVideojs.SeekBar.Region;
|
|
220
|
-
|
|
221
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf__default["default"](Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf__default["default"](this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn__default["default"](this, result); }; }
|
|
222
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
223
|
-
var VideoTimeCode = /*#__PURE__*/function (_Component) {
|
|
224
|
-
_inherits__default["default"](VideoTimeCode, _Component);
|
|
225
|
-
var _super = _createSuper(VideoTimeCode);
|
|
226
|
-
function VideoTimeCode() {
|
|
227
|
-
_classCallCheck__default["default"](this, VideoTimeCode);
|
|
228
|
-
return _super.apply(this, arguments);
|
|
229
|
-
}
|
|
230
|
-
_createClass__default["default"](VideoTimeCode, [{
|
|
231
|
-
key: "componentDidMount",
|
|
232
|
-
value: function componentDidMount() {
|
|
233
|
-
var player = this.props.player; // player prop is the whole react component
|
|
234
|
-
this.timeCode = new vdtVideojs.TimeCodeDisplay({
|
|
235
|
-
target: this.timecodeNode,
|
|
236
|
-
player: player.current.player,
|
|
237
|
-
onInput: player.current.player
|
|
238
|
-
});
|
|
239
|
-
this.timeCode.update(this.props);
|
|
240
|
-
player.current.player.setupTimeCode(this.timeCode);
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
// eslint-disable-next-line camelcase
|
|
244
|
-
}, {
|
|
245
|
-
key: "UNSAFE_componentWillUpdate",
|
|
246
|
-
value: function UNSAFE_componentWillUpdate(props) {
|
|
247
|
-
this.timeCode.update(props);
|
|
248
|
-
}
|
|
249
|
-
}, {
|
|
250
|
-
key: "render",
|
|
251
|
-
value: function render() {
|
|
252
|
-
var _this = this;
|
|
253
|
-
var _this$props = this.props,
|
|
254
|
-
className = _this$props.className,
|
|
255
|
-
styles = _this$props.styles;
|
|
256
|
-
var ref = function ref(node) {
|
|
257
|
-
_this.timecodeNode = node;
|
|
258
|
-
};
|
|
259
|
-
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
260
|
-
style: styles,
|
|
261
|
-
className: className,
|
|
262
|
-
ref: ref
|
|
263
|
-
});
|
|
264
|
-
}
|
|
265
|
-
}]);
|
|
266
|
-
return VideoTimeCode;
|
|
267
|
-
}(react.Component);
|
|
27
|
+
var _excluded=["setPlayer"],_excluded2=["setPlayer"];function ownKeys$1(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;})),keys.push.apply(keys,symbols);}return keys;}function _objectSpread$1(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?ownKeys$1(Object(source),!0).forEach(function(key){_defineProperty__default["default"](target,key,source[key]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys$1(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key));});}return target;}function _createSuper$3(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct$3();return function _createSuperInternal(){var Super=_getPrototypeOf__default["default"](Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf__default["default"](this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else {result=Super.apply(this,arguments);}return _possibleConstructorReturn__default["default"](this,result);};}function _isNativeReflectConstruct$3(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true;}catch(e){return false;}}var VideoPlayer=/*#__PURE__*/function(_Component){_inherits__default["default"](VideoPlayer,_Component);var _super=_createSuper$3(VideoPlayer);function VideoPlayer(){_classCallCheck__default["default"](this,VideoPlayer);return _super.apply(this,arguments);}_createClass__default["default"](VideoPlayer,[{key:"componentDidMount",value:function componentDidMount(){var _this$props=this.props,setPlayer=_this$props.setPlayer,playerProps=_objectWithoutProperties__default["default"](_this$props,_excluded);this.player=new vdtVideojs.Player(_objectSpread$1({target:this.videoNode},playerProps));if(setPlayer){setPlayer(this.player);}}// eslint-disable-next-line camelcase
|
|
28
|
+
},{key:"UNSAFE_componentWillUpdate",value:function UNSAFE_componentWillUpdate(props){var _this=this;var createPlayer=function createPlayer(){var setPlayer=props.setPlayer,playerProps=_objectWithoutProperties__default["default"](props,_excluded2);_this.player=new vdtVideojs.Player(_objectSpread$1({target:_this.videoNode},playerProps));if(setPlayer){setPlayer(_this.player);}};if(props.sources&&props.sources[0]&&props.sources[0].src){// sources changed
|
|
29
|
+
if(!(this.props.sources[0].src===props.sources[0].src)){if(this.player){this.player.videojs.pause();// Wait a frame until player is paused
|
|
30
|
+
setTimeout(function(){_this.player.videojs.dispose();createPlayer();},0);}else {createPlayer();}}else {// update reactive props
|
|
31
|
+
this.player.handleNewProps(props);}}}// destroy player on unmount
|
|
32
|
+
},{key:"componentWillUnmount",value:function componentWillUnmount(){var onUnmount=this.props.onUnmount;if(this.player){if(onUnmount)onUnmount(this.player);this.player.destroy();}}// wrap the player in a div with a `data-vjs-player` attribute
|
|
33
|
+
// so videojs won't create additional wrapper in the DOM
|
|
34
|
+
// see https://github.com/videojs/video.js/pull/3856
|
|
35
|
+
},{key:"render",value:function render(){var _this2=this;return/*#__PURE__*/jsxRuntime.jsx("div",{className:"data-vjs-player",children:/*#__PURE__*/jsxRuntime.jsx("div",{ref:function ref(node){_this2.videoNode=node;}})});}}]);return VideoPlayer;}(react.Component);
|
|
36
|
+
|
|
37
|
+
function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;})),keys.push.apply(keys,symbols);}return keys;}function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?ownKeys(Object(source),!0).forEach(function(key){_defineProperty__default["default"](target,key,source[key]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key));});}return target;}function _createSuper$2(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct$2();return function _createSuperInternal(){var Super=_getPrototypeOf__default["default"](Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf__default["default"](this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else {result=Super.apply(this,arguments);}return _possibleConstructorReturn__default["default"](this,result);};}function _isNativeReflectConstruct$2(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true;}catch(e){return false;}}var VideoControls=/*#__PURE__*/function(_Component){_inherits__default["default"](VideoControls,_Component);var _super=_createSuper$2(VideoControls);function VideoControls(){_classCallCheck__default["default"](this,VideoControls);return _super.apply(this,arguments);}_createClass__default["default"](VideoControls,[{key:"componentDidMount",value:function componentDidMount(){var player=this.props.player;// player prop is the whole react component
|
|
38
|
+
this.controls=new vdtVideojs.ExternalControls(_objectSpread(_objectSpread({target:this.controlsNode},this.props),{},{player:player.current.player}));this.controls.handleNewProps(this.props);}// eslint-disable-next-line camelcase
|
|
39
|
+
},{key:"UNSAFE_componentWillUpdate",value:function UNSAFE_componentWillUpdate(props){this.controls.handleNewProps(props);}},{key:"render",value:function render(){var _this=this;return/*#__PURE__*/jsxRuntime.jsx("div",{ref:function ref(node){_this.controlsNode=node;}});}}]);return VideoControls;}(react.Component);VideoControls.buttonNames=vdtVideojs.ExternalControls.buttonNames;
|
|
40
|
+
|
|
41
|
+
function _createSuper$1(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct$1();return function _createSuperInternal(){var Super=_getPrototypeOf__default["default"](Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf__default["default"](this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else {result=Super.apply(this,arguments);}return _possibleConstructorReturn__default["default"](this,result);};}function _isNativeReflectConstruct$1(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true;}catch(e){return false;}}var VideoSeekBar=/*#__PURE__*/function(_Component){_inherits__default["default"](VideoSeekBar,_Component);var _super=_createSuper$1(VideoSeekBar);function VideoSeekBar(){_classCallCheck__default["default"](this,VideoSeekBar);return _super.apply(this,arguments);}_createClass__default["default"](VideoSeekBar,[{key:"componentDidMount",value:function componentDidMount(){var _this$props=this.props,player=_this$props.player,bgColor=_this$props.bgColor,fillColor=_this$props.fillColor,markersEnabled=_this$props.markersEnabled,regions=_this$props.regions,onRegionClick=_this$props.onRegionClick;// player prop is the whole react component
|
|
42
|
+
this.seekBar=new vdtVideojs.SeekBar({target:this.seekBarNode,player:player.current.player,bgColor:bgColor,fillColor:fillColor,markersEnabled:markersEnabled,/* eslint-disable-next-line react/destructuring-assignment */"in":this.props["in"],// can not use "in" with destructuring statement - reserved word
|
|
43
|
+
/* eslint-disable-next-line react/destructuring-assignment */out:this.props.out,regions:regions,onRegionClick:onRegionClick});}// eslint-disable-next-line camelcase
|
|
44
|
+
},{key:"UNSAFE_componentWillUpdate",value:function UNSAFE_componentWillUpdate(props){this.seekBar.handleNewProps(props);}},{key:"render",value:function render(){var _this=this;return/*#__PURE__*/jsxRuntime.jsx("div",{ref:function ref(node){_this.seekBarNode=node;}});}}]);return VideoSeekBar;}(react.Component);VideoSeekBar.Region=vdtVideojs.SeekBar.Region;
|
|
45
|
+
|
|
46
|
+
function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf__default["default"](Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf__default["default"](this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else {result=Super.apply(this,arguments);}return _possibleConstructorReturn__default["default"](this,result);};}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true;}catch(e){return false;}}var VideoTimeCode=/*#__PURE__*/function(_Component){_inherits__default["default"](VideoTimeCode,_Component);var _super=_createSuper(VideoTimeCode);function VideoTimeCode(){_classCallCheck__default["default"](this,VideoTimeCode);return _super.apply(this,arguments);}_createClass__default["default"](VideoTimeCode,[{key:"componentDidMount",value:function componentDidMount(){var player=this.props.player;// player prop is the whole react component
|
|
47
|
+
this.timeCode=new vdtVideojs.TimeCodeDisplay({target:this.timecodeNode,player:player.current.player,onInput:player.current.player});this.timeCode.update(this.props);player.current.player.setupTimeCode(this.timeCode);}// eslint-disable-next-line camelcase
|
|
48
|
+
},{key:"UNSAFE_componentWillUpdate",value:function UNSAFE_componentWillUpdate(props){this.timeCode.update(props);}},{key:"render",value:function render(){var _this=this;var _this$props=this.props,className=_this$props.className,styles=_this$props.styles;var ref=function ref(node){_this.timecodeNode=node;};return/*#__PURE__*/jsxRuntime.jsx("div",{style:styles,className:className,ref:ref});}}]);return VideoTimeCode;}(react.Component);
|
|
268
49
|
|
|
269
50
|
exports.VideoControls = VideoControls;
|
|
270
51
|
exports.VideoPlayer = VideoPlayer;
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/VideoPlayer.js","../src/VideoControls.js","../src/VideoSeekBar.js","../src/VideoTimeCode.js"],"sourcesContent":["/* eslint-disable react/destructuring-assignment */\n/* eslint-disable import/prefer-default-export */\nimport { Component } from 'react';\n\nimport { Player } from '@vidispine/vdt-videojs';\n\nimport '@vidispine/vdt-videojs/dist/index.css';\n\nexport class VideoPlayer extends Component {\n componentDidMount() {\n const { setPlayer, ...playerProps } = this.props;\n\n this.player = new Player({\n target: this.videoNode,\n ...playerProps,\n });\n\n if (setPlayer) {\n setPlayer(this.player);\n }\n }\n\n // eslint-disable-next-line camelcase\n UNSAFE_componentWillUpdate(props) {\n const createPlayer = () => {\n const { setPlayer, ...playerProps } = props;\n this.player = new Player({\n target: this.videoNode,\n ...playerProps,\n });\n if (setPlayer) {\n setPlayer(this.player);\n }\n };\n\n if (props.sources && props.sources[0] && props.sources[0].src) {\n // sources changed\n if (!(this.props.sources[0].src === props.sources[0].src)) {\n if (this.player) {\n this.player.videojs.pause();\n // Wait a frame until player is paused\n setTimeout(() => {\n this.player.videojs.dispose();\n createPlayer();\n }, 0);\n } else {\n createPlayer();\n }\n } else {\n // update reactive props\n this.player.handleNewProps(props);\n }\n }\n }\n\n // destroy player on unmount\n componentWillUnmount() {\n const { onUnmount } = this.props;\n\n if (this.player) {\n if (onUnmount) onUnmount(this.player);\n this.player.destroy();\n }\n }\n\n // wrap the player in a div with a `data-vjs-player` attribute\n // so videojs won't create additional wrapper in the DOM\n // see https://github.com/videojs/video.js/pull/3856\n render() {\n return (\n <div className=\"data-vjs-player\">\n <div\n ref={(node) => {\n this.videoNode = node;\n }}\n />\n </div>\n );\n }\n}\n","/* eslint-disable import/prefer-default-export */\nimport { Component } from 'react';\n\nimport { ExternalControls } from '@vidispine/vdt-videojs';\n\nexport class VideoControls extends Component {\n componentDidMount() {\n const { player } = this.props; // player prop is the whole react component\n this.controls = new ExternalControls({\n target: this.controlsNode,\n ...this.props,\n player: player.current.player,\n });\n\n this.controls.handleNewProps(this.props);\n }\n\n // eslint-disable-next-line camelcase\n UNSAFE_componentWillUpdate(props) {\n this.controls.handleNewProps(props);\n }\n\n render() {\n return (\n <div\n ref={(node) => {\n this.controlsNode = node;\n }}\n />\n );\n }\n}\n\nVideoControls.buttonNames = ExternalControls.buttonNames;\n","import { Component } from 'react';\n\nimport { SeekBar } from '@vidispine/vdt-videojs';\n\nexport class VideoSeekBar extends Component {\n componentDidMount() {\n const { player, bgColor, fillColor, markersEnabled, regions, onRegionClick } = this.props; // player prop is the whole react component\n\n this.seekBar = new SeekBar({\n target: this.seekBarNode,\n player: player.current.player,\n bgColor,\n fillColor,\n markersEnabled,\n /* eslint-disable-next-line react/destructuring-assignment */\n in: this.props.in, // can not use \"in\" with destructuring statement - reserved word\n /* eslint-disable-next-line react/destructuring-assignment */\n out: this.props.out,\n regions,\n onRegionClick,\n });\n }\n\n // eslint-disable-next-line camelcase\n UNSAFE_componentWillUpdate(props) {\n this.seekBar.handleNewProps(props);\n }\n\n render() {\n return (\n <div\n ref={(node) => {\n this.seekBarNode = node;\n }}\n />\n );\n }\n}\n\nVideoSeekBar.Region = SeekBar.Region;\n\nexport default VideoSeekBar;\n","import { Component } from 'react';\n\nimport { TimeCodeDisplay } from '@vidispine/vdt-videojs';\n\nexport class VideoTimeCode extends Component {\n componentDidMount() {\n const { player } = this.props; // player prop is the whole react component\n this.timeCode = new TimeCodeDisplay({\n target: this.timecodeNode,\n player: player.current.player,\n onInput: player.current.player,\n });\n\n this.timeCode.update(this.props);\n player.current.player.setupTimeCode(this.timeCode);\n }\n\n // eslint-disable-next-line camelcase\n UNSAFE_componentWillUpdate(props) {\n this.timeCode.update(props);\n }\n\n render() {\n const { className, styles } = this.props;\n const ref = (node) => {\n this.timecodeNode = node;\n };\n return <div style={styles} className={className} ref={ref} />;\n }\n}\n\nexport default VideoTimeCode;\n"],"names":["VideoPlayer","_inherits","_createSuper","_classCallCheck","_createClass","props","setPlayer","playerProps","_objectWithoutProperties","player","Player","_objectSpread","target","videoNode","createPlayer","sources","src","videojs","pause","setTimeout","dispose","handleNewProps","onUnmount","destroy","_jsx","node","Component","VideoControls","controls","ExternalControls","controlsNode","current","buttonNames","VideoSeekBar","bgColor","fillColor","markersEnabled","regions","onRegionClick","seekBar","SeekBar","seekBarNode","out","Region","VideoTimeCode","timeCode","TimeCodeDisplay","timecodeNode","onInput","update","setupTimeCode","className","styles","ref"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,IAAaA,WAAW,gBAAA,UAAA,UAAA,EAAA;AAAA,EAAAC,6BAAA,CAAA,WAAA,EAAA,UAAA,CAAA,CAAA;AAAA,EAAA,IAAA,MAAA,GAAAC,cAAA,CAAA,WAAA,CAAA,CAAA;AAAA,EAAA,SAAA,WAAA,GAAA;AAAA,IAAAC,mCAAA,CAAA,IAAA,EAAA,WAAA,CAAA,CAA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GAAA;AAAA,MAAA,IAAA,KAAA,GAAA,IAAA,CAAA;MACP,IAA8B,WAAA,GAAA,IAAI,CAACA,KAAK;AAAhC8C,QAAAA,SAAS,eAATA,SAAS;AAAEC,QAAAA,MAAM,eAANA,MAAM,CAAA;AACzB,MAAA,IAAMC,GAAG,GAAG,SAANA,GAAG,CAAI5B,IAAI,EAAK;QACpB,KAAI,CAACsB,YAAY,GAAGtB,IAAI,CAAA;OACzB,CAAA;MACD,oBAAOD,cAAA,CAAA,KAAA,EAAA;AAAK,QAAA,KAAK,EAAE4B,MAAO;AAAC,QAAA,SAAS,EAAED,SAAU;AAAC,QAAA,GAAG,EAAEE,GAAAA;OAAO,CAAA,CAAA;AAC/D,KAAA;AAAC,GAAA,CAAA,CAAA,CAAA;AAAA,EAAA,OAAA,aAAA,CAAA;AAAA,CAAA,CAxBgC3B,eAAS;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/VideoPlayer.js","../src/VideoControls.js","../src/VideoSeekBar.js","../src/VideoTimeCode.js"],"sourcesContent":["/* eslint-disable react/destructuring-assignment */\n/* eslint-disable import/prefer-default-export */\nimport { Component } from 'react';\n\nimport { Player } from '@vidispine/vdt-videojs';\n\nimport '@vidispine/vdt-videojs/dist/index.css';\n\nexport class VideoPlayer extends Component {\n componentDidMount() {\n const { setPlayer, ...playerProps } = this.props;\n\n this.player = new Player({\n target: this.videoNode,\n ...playerProps,\n });\n\n if (setPlayer) {\n setPlayer(this.player);\n }\n }\n\n // eslint-disable-next-line camelcase\n UNSAFE_componentWillUpdate(props) {\n const createPlayer = () => {\n const { setPlayer, ...playerProps } = props;\n this.player = new Player({\n target: this.videoNode,\n ...playerProps,\n });\n if (setPlayer) {\n setPlayer(this.player);\n }\n };\n\n if (props.sources && props.sources[0] && props.sources[0].src) {\n // sources changed\n if (!(this.props.sources[0].src === props.sources[0].src)) {\n if (this.player) {\n this.player.videojs.pause();\n // Wait a frame until player is paused\n setTimeout(() => {\n this.player.videojs.dispose();\n createPlayer();\n }, 0);\n } else {\n createPlayer();\n }\n } else {\n // update reactive props\n this.player.handleNewProps(props);\n }\n }\n }\n\n // destroy player on unmount\n componentWillUnmount() {\n const { onUnmount } = this.props;\n\n if (this.player) {\n if (onUnmount) onUnmount(this.player);\n this.player.destroy();\n }\n }\n\n // wrap the player in a div with a `data-vjs-player` attribute\n // so videojs won't create additional wrapper in the DOM\n // see https://github.com/videojs/video.js/pull/3856\n render() {\n return (\n <div className=\"data-vjs-player\">\n <div\n ref={(node) => {\n this.videoNode = node;\n }}\n />\n </div>\n );\n }\n}\n","/* eslint-disable import/prefer-default-export */\nimport { Component } from 'react';\n\nimport { ExternalControls } from '@vidispine/vdt-videojs';\n\nexport class VideoControls extends Component {\n componentDidMount() {\n const { player } = this.props; // player prop is the whole react component\n this.controls = new ExternalControls({\n target: this.controlsNode,\n ...this.props,\n player: player.current.player,\n });\n\n this.controls.handleNewProps(this.props);\n }\n\n // eslint-disable-next-line camelcase\n UNSAFE_componentWillUpdate(props) {\n this.controls.handleNewProps(props);\n }\n\n render() {\n return (\n <div\n ref={(node) => {\n this.controlsNode = node;\n }}\n />\n );\n }\n}\n\nVideoControls.buttonNames = ExternalControls.buttonNames;\n","import { Component } from 'react';\n\nimport { SeekBar } from '@vidispine/vdt-videojs';\n\nexport class VideoSeekBar extends Component {\n componentDidMount() {\n const { player, bgColor, fillColor, markersEnabled, regions, onRegionClick } = this.props; // player prop is the whole react component\n\n this.seekBar = new SeekBar({\n target: this.seekBarNode,\n player: player.current.player,\n bgColor,\n fillColor,\n markersEnabled,\n /* eslint-disable-next-line react/destructuring-assignment */\n in: this.props.in, // can not use \"in\" with destructuring statement - reserved word\n /* eslint-disable-next-line react/destructuring-assignment */\n out: this.props.out,\n regions,\n onRegionClick,\n });\n }\n\n // eslint-disable-next-line camelcase\n UNSAFE_componentWillUpdate(props) {\n this.seekBar.handleNewProps(props);\n }\n\n render() {\n return (\n <div\n ref={(node) => {\n this.seekBarNode = node;\n }}\n />\n );\n }\n}\n\nVideoSeekBar.Region = SeekBar.Region;\n\nexport default VideoSeekBar;\n","import { Component } from 'react';\n\nimport { TimeCodeDisplay } from '@vidispine/vdt-videojs';\n\nexport class VideoTimeCode extends Component {\n componentDidMount() {\n const { player } = this.props; // player prop is the whole react component\n this.timeCode = new TimeCodeDisplay({\n target: this.timecodeNode,\n player: player.current.player,\n onInput: player.current.player,\n });\n\n this.timeCode.update(this.props);\n player.current.player.setupTimeCode(this.timeCode);\n }\n\n // eslint-disable-next-line camelcase\n UNSAFE_componentWillUpdate(props) {\n this.timeCode.update(props);\n }\n\n render() {\n const { className, styles } = this.props;\n const ref = (node) => {\n this.timecodeNode = node;\n };\n return <div style={styles} className={className} ref={ref} />;\n }\n}\n\nexport default VideoTimeCode;\n"],"names":["VideoPlayer","_inherits","_createSuper","_classCallCheck","_createClass","props","setPlayer","playerProps","_objectWithoutProperties","player","Player","target","videoNode","createPlayer","sources","src","videojs","pause","setTimeout","dispose","handleNewProps","onUnmount","destroy","_jsx","node","Component","VideoControls","controls","ExternalControls","controlsNode","current","buttonNames","_isNativeReflectConstruct","_getPrototypeOf","_possibleConstructorReturn","VideoSeekBar","bgColor","fillColor","markersEnabled","regions","onRegionClick","seekBar","SeekBar","seekBarNode","out","Region","VideoTimeCode","timeCode","TimeCodeDisplay","timecodeNode","onInput","update","setupTimeCode","className","styles","ref"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;2kDAQaA,IAAAA,WAAW,cACtB,SAAA,UAAA,CAAA,CAAAC,6BAAA,CAAA,WAAA,CAAA,UAAA,CAAA,CAAA,IAAA,MAAA,CAAAC,cAAA,CAAA,WAAA,CAAA,CAAA,SAAA,WAAA,EAAA,CAAAC,mCAAA,CAAA,IAAA,CAAA,WAAA,CAAA,CAAA,OAAA,MAAA,CAAA,KAAA,CAAA,IAAA,CAAA,SAAA,CAAA,CAAA,CAAAC,gCAAA,CAAA,WAAA,CAAA,CAAA,CAAA,GAAA,CAAA,mBAAA,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AY,CACzBxC,MAAM,CAAEA,MAAM,CAACqB,OAAO,CAACrB,MAAM,CAC7ByC,OAAO,CAAEzC,MAAM,CAACqB,OAAO,CAACrB,MAC1B,CAAC,CAAC,CAEF,IAAI,CAACsC,QAAQ,CAACI,MAAM,CAAC,IAAI,CAAC9C,KAAK,CAAC,CAChCI,MAAM,CAACqB,OAAO,CAACrB,MAAM,CAAC2C,aAAa,CAAC,IAAI,CAACL,QAAQ,CAAC,CACpD,CAEA;AAAA,CAAA,CAAA,CAAA,GAAA,CAAA,4BAAA,CAAA,KAAA,CACA,SAA2B1C,0BAAAA,CAAAA,KAAK,CAAE,CAChC,IAAI,CAAC0C,QAAQ,CAACI,MAAM,CAAC9C,KAAK,CAAC,CAC7B,CAAC,CAAA,CAAA,CAAA,GAAA,CAAA,QAAA,CAAA,KAAA,CAED,SAAS,MAAA,EAAA,CAAA,IAAA,KAAA,CAAA,IAAA,CACP,IAA8B,WAAA,CAAA,IAAI,CAACA,KAAK,CAAhCgD,SAAS,CAAA,WAAA,CAATA,SAAS,CAAEC,MAAM,CAAA,WAAA,CAANA,MAAM,CACzB,IAAS,GAAA,CAAG,SAANC,GAAG,CAAI/B,IAAI,CAAK,CACpB,KAAI,CAACyB,YAAY,CAAGzB,IAAI,CAC1B,CAAC,CACD,mBAAOD,sBAAK,KAAK,CAAE+B,MAAO,CAAC,SAAS,CAAED,SAAU,CAAC,GAAG,CAAEE,GAAI,CAAG,CAAA,CAC/D,CAAC,CAAA,CAAA,CAAA,CAAA,OAAA,aAAA,CAAA,CAAA,CAxBgC9B,eAAS;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vidispine/vdt-videojs-react",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "23.1.0-pre.2",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@babel/runtime": "^7.20.1",
|
|
27
|
-
"@vidispine/vdt-videojs": "
|
|
27
|
+
"@vidispine/vdt-videojs": "23.1.0-pre.2"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"react": "^17.0.0"
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
"@rollup/plugin-commonjs": "21.1.0",
|
|
40
40
|
"@rollup/plugin-json": "4.1.0",
|
|
41
41
|
"@rollup/plugin-node-resolve": "13.3.0",
|
|
42
|
-
"@vidispine/eslint-config-mdx": "
|
|
43
|
-
"@vidispine/eslint-config-react": "
|
|
44
|
-
"@vidispine/eslint-config-storybook": "
|
|
45
|
-
"@vidispine/prettier-config": "
|
|
42
|
+
"@vidispine/eslint-config-mdx": "23.1.0-pre.2",
|
|
43
|
+
"@vidispine/eslint-config-react": "23.1.0-pre.2",
|
|
44
|
+
"@vidispine/eslint-config-storybook": "23.1.0-pre.2",
|
|
45
|
+
"@vidispine/prettier-config": "23.1.0-pre.2",
|
|
46
46
|
"eslint": "8.28.0",
|
|
47
47
|
"prettier": "2.8.0",
|
|
48
48
|
"rimraf": "3.0.2",
|