@vidispine/vdt-videojs-react 23.1.0-pre.1 → 23.1.0-pre.3

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.
@@ -0,0 +1,15 @@
1
+ import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
+ import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
3
+ import _createClass from '@babel/runtime/helpers/createClass';
4
+ import _inherits from '@babel/runtime/helpers/inherits';
5
+ import _possibleConstructorReturn from '@babel/runtime/helpers/possibleConstructorReturn';
6
+ import _getPrototypeOf from '@babel/runtime/helpers/getPrototypeOf';
7
+ import { Component } from 'react';
8
+ import { ExternalControls } from '@vidispine/vdt-videojs';
9
+ import { jsx } from 'react/jsx-runtime';
10
+
11
+ 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(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 VideoControls=/*#__PURE__*/function(_Component){_inherits(VideoControls,_Component);var _super=_createSuper(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
12
+ 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
13
+ },{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;
14
+
15
+ export { VideoControls };
@@ -0,0 +1,23 @@
1
+ import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
+ import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
3
+ import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
4
+ import _createClass from '@babel/runtime/helpers/createClass';
5
+ import _inherits from '@babel/runtime/helpers/inherits';
6
+ import _possibleConstructorReturn from '@babel/runtime/helpers/possibleConstructorReturn';
7
+ import _getPrototypeOf from '@babel/runtime/helpers/getPrototypeOf';
8
+ import { Component } from 'react';
9
+ import { Player } from '@vidispine/vdt-videojs';
10
+ import '@vidispine/vdt-videojs/dist/index.css';
11
+ import { jsx } from 'react/jsx-runtime';
12
+
13
+ var _excluded=["setPlayer"],_excluded2=["setPlayer"];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(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 VideoPlayer=/*#__PURE__*/function(_Component){_inherits(VideoPlayer,_Component);var _super=_createSuper(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({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({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
+ export { VideoPlayer };
@@ -0,0 +1,15 @@
1
+ import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
2
+ import _createClass from '@babel/runtime/helpers/createClass';
3
+ import _inherits from '@babel/runtime/helpers/inherits';
4
+ import _possibleConstructorReturn from '@babel/runtime/helpers/possibleConstructorReturn';
5
+ import _getPrototypeOf from '@babel/runtime/helpers/getPrototypeOf';
6
+ import { Component } from 'react';
7
+ import { SeekBar } from '@vidispine/vdt-videojs';
8
+ import { jsx } from 'react/jsx-runtime';
9
+
10
+ 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 VideoSeekBar=/*#__PURE__*/function(_Component){_inherits(VideoSeekBar,_Component);var _super=_createSuper(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
11
+ 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
12
+ /* eslint-disable-next-line react/destructuring-assignment */out:this.props.out,regions:regions,onRegionClick:onRegionClick});}// eslint-disable-next-line camelcase
13
+ },{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;
14
+
15
+ export { VideoSeekBar, VideoSeekBar as default };
@@ -0,0 +1,14 @@
1
+ import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
2
+ import _createClass from '@babel/runtime/helpers/createClass';
3
+ import _inherits from '@babel/runtime/helpers/inherits';
4
+ import _possibleConstructorReturn from '@babel/runtime/helpers/possibleConstructorReturn';
5
+ import _getPrototypeOf from '@babel/runtime/helpers/getPrototypeOf';
6
+ import { Component } from 'react';
7
+ import { TimeCodeDisplay } from '@vidispine/vdt-videojs';
8
+ import { jsx } from 'react/jsx-runtime';
9
+
10
+ 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
11
+ 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
12
+ },{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);
13
+
14
+ export { VideoTimeCode, VideoTimeCode as default };
package/dist/index.js CHANGED
@@ -1,273 +1,4 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var _defineProperty = require('@babel/runtime/helpers/defineProperty');
6
- var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
7
- var _classCallCheck = require('@babel/runtime/helpers/classCallCheck');
8
- var _createClass = require('@babel/runtime/helpers/createClass');
9
- var _inherits = require('@babel/runtime/helpers/inherits');
10
- var _possibleConstructorReturn = require('@babel/runtime/helpers/possibleConstructorReturn');
11
- var _getPrototypeOf = require('@babel/runtime/helpers/getPrototypeOf');
12
- var react = require('react');
13
- var vdtVideojs = require('@vidispine/vdt-videojs');
14
- require('@vidispine/vdt-videojs/dist/index.css');
15
- var jsxRuntime = require('react/jsx-runtime');
16
-
17
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
18
-
19
- var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
20
- var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutProperties);
21
- var _classCallCheck__default = /*#__PURE__*/_interopDefaultLegacy(_classCallCheck);
22
- var _createClass__default = /*#__PURE__*/_interopDefaultLegacy(_createClass);
23
- var _inherits__default = /*#__PURE__*/_interopDefaultLegacy(_inherits);
24
- var _possibleConstructorReturn__default = /*#__PURE__*/_interopDefaultLegacy(_possibleConstructorReturn);
25
- var _getPrototypeOf__default = /*#__PURE__*/_interopDefaultLegacy(_getPrototypeOf);
26
-
27
- var _excluded = ["setPlayer"],
28
- _excluded2 = ["setPlayer"];
29
- 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; }
30
- 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; }
31
- 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); }; }
32
- 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; } }
33
- var VideoPlayer = /*#__PURE__*/function (_Component) {
34
- _inherits__default["default"](VideoPlayer, _Component);
35
- var _super = _createSuper$3(VideoPlayer);
36
- function VideoPlayer() {
37
- _classCallCheck__default["default"](this, VideoPlayer);
38
- return _super.apply(this, arguments);
39
- }
40
- _createClass__default["default"](VideoPlayer, [{
41
- key: "componentDidMount",
42
- value: function componentDidMount() {
43
- var _this$props = this.props,
44
- setPlayer = _this$props.setPlayer,
45
- playerProps = _objectWithoutProperties__default["default"](_this$props, _excluded);
46
- this.player = new vdtVideojs.Player(_objectSpread$1({
47
- target: this.videoNode
48
- }, playerProps));
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);
268
-
269
- exports.VideoControls = VideoControls;
270
- exports.VideoPlayer = VideoPlayer;
271
- exports.VideoSeekBar = VideoSeekBar;
272
- exports.VideoTimeCode = VideoTimeCode;
273
- //# sourceMappingURL=index.js.map
1
+ export { VideoPlayer } from './VideoPlayer.js';
2
+ export { VideoControls } from './VideoControls.js';
3
+ export { VideoSeekBar } from './VideoSeekBar.js';
4
+ export { VideoTimeCode } from './VideoTimeCode.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vidispine/vdt-videojs-react",
3
- "version": "23.1.0-pre.1",
3
+ "version": "23.1.0-pre.3",
4
4
  "license": "SEE LICENSE IN LICENSE.md",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -13,7 +13,8 @@
13
13
  "directory": "packages/vdt-videojs-react"
14
14
  },
15
15
  "main": "dist/index.js",
16
- "module": "dist/index.es.js",
16
+ "module": "dist/index.js",
17
+ "sideEffects": false,
17
18
  "files": [
18
19
  "dist"
19
20
  ],
@@ -24,7 +25,7 @@
24
25
  },
25
26
  "dependencies": {
26
27
  "@babel/runtime": "^7.20.1",
27
- "@vidispine/vdt-videojs": "23.1.0-pre.1"
28
+ "@vidispine/vdt-videojs": "23.1.0-pre.3"
28
29
  },
29
30
  "peerDependencies": {
30
31
  "react": "^17.0.0"
@@ -39,10 +40,10 @@
39
40
  "@rollup/plugin-commonjs": "21.1.0",
40
41
  "@rollup/plugin-json": "4.1.0",
41
42
  "@rollup/plugin-node-resolve": "13.3.0",
42
- "@vidispine/eslint-config-mdx": "23.1.0-pre.1",
43
- "@vidispine/eslint-config-react": "23.1.0-pre.1",
44
- "@vidispine/eslint-config-storybook": "23.1.0-pre.1",
45
- "@vidispine/prettier-config": "23.1.0-pre.1",
43
+ "@vidispine/eslint-config-mdx": "23.1.0-pre.3",
44
+ "@vidispine/eslint-config-react": "23.1.0-pre.3",
45
+ "@vidispine/eslint-config-storybook": "23.1.0-pre.3",
46
+ "@vidispine/prettier-config": "23.1.0-pre.3",
46
47
  "eslint": "8.28.0",
47
48
  "prettier": "2.8.0",
48
49
  "rimraf": "3.0.2",
package/dist/index.es.js DELETED
@@ -1,256 +0,0 @@
1
- import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
- import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
3
- import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
4
- import _createClass from '@babel/runtime/helpers/createClass';
5
- import _inherits from '@babel/runtime/helpers/inherits';
6
- import _possibleConstructorReturn from '@babel/runtime/helpers/possibleConstructorReturn';
7
- import _getPrototypeOf from '@babel/runtime/helpers/getPrototypeOf';
8
- import { Component } from 'react';
9
- import { Player, ExternalControls, SeekBar, TimeCodeDisplay } from '@vidispine/vdt-videojs';
10
- import '@vidispine/vdt-videojs/dist/index.css';
11
- import { jsx } from 'react/jsx-runtime';
12
-
13
- var _excluded = ["setPlayer"],
14
- _excluded2 = ["setPlayer"];
15
- 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; }
16
- 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; }
17
- 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); }; }
18
- 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; } }
19
- var VideoPlayer = /*#__PURE__*/function (_Component) {
20
- _inherits(VideoPlayer, _Component);
21
- var _super = _createSuper$3(VideoPlayer);
22
- function VideoPlayer() {
23
- _classCallCheck(this, VideoPlayer);
24
- return _super.apply(this, arguments);
25
- }
26
- _createClass(VideoPlayer, [{
27
- key: "componentDidMount",
28
- value: function componentDidMount() {
29
- var _this$props = this.props,
30
- setPlayer = _this$props.setPlayer,
31
- playerProps = _objectWithoutProperties(_this$props, _excluded);
32
- this.player = new Player(_objectSpread$1({
33
- target: this.videoNode
34
- }, playerProps));
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);
254
-
255
- export { VideoControls, VideoPlayer, VideoSeekBar, VideoTimeCode };
256
- //# sourceMappingURL=index.es.js.map
@@ -1 +0,0 @@
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;AAAA,IAAA,OAAA,MAAA,CAAA,KAAA,CAAA,IAAA,EAAA,SAAA,CAAA,CAAA;AAAA,GAAA;AAAA,EAAA,YAAA,CAAA,WAAA,EAAA,CAAA;AAAA,IAAA,GAAA,EAAA,mBAAA;AAAA,IAAA,KAAA,EACtB,SAAoB,iBAAA,GAAA;MAClB,IAAsC,WAAA,GAAA,IAAI,CAACC,KAAK;AAAxCC,QAAAA,SAAS,eAATA,SAAS;QAAKC,WAAW,GAAA,wBAAA,CAAA,WAAA,EAAA,SAAA,CAAA,CAAA;AAEjC,MAAA,IAAI,CAACC,MAAM,GAAG,IAAIC,MAAM,CAAAC,eAAA,CAAA;QACtBC,MAAM,EAAE,IAAI,CAACC,SAAAA;AAAS,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AAA,CAAA;AAAA,CAAA,CAxBgC3B,SAAS;;;;"}
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
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,CAAA;AAAA,IAAA,OAAA,MAAA,CAAA,KAAA,CAAA,IAAA,EAAA,SAAA,CAAA,CAAA;AAAA,GAAA;AAAA,EAAAC,gCAAA,CAAA,WAAA,EAAA,CAAA;AAAA,IAAA,GAAA,EAAA,mBAAA;AAAA,IAAA,KAAA,EACtB,SAAoB,iBAAA,GAAA;MAClB,IAAsC,WAAA,GAAA,IAAI,CAACC,KAAK;AAAxCC,QAAAA,SAAS,eAATA,SAAS;QAAKC,WAAW,GAAAC,4CAAA,CAAA,WAAA,EAAA,SAAA,CAAA,CAAA;AAEjC,MAAA,IAAI,CAACC,MAAM,GAAG,IAAIC,iBAAM,CAAAC,eAAA,CAAA;QACtBC,MAAM,EAAE,IAAI,CAACC,SAAAA;AAAS,OAAA,EACnBN,WAAW,CACd,CAAA,CAAA;AAEF,MAAA,IAAID,SAAS,EAAE;AACbA,QAAAA,SAAS,CAAC,IAAI,CAACG,MAAM,CAAC,CAAA;AACxB,OAA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