@mjhls/mjh-framework 1.0.243 → 1.0.245
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/README.md +171 -172
- package/dist/cjs/DeckContent.js +9 -9
- package/dist/cjs/DeckQueue.js +1 -1
- package/dist/cjs/{GridContent-463c504f.js → GridContent-f9e3fff5.js} +2 -2
- package/dist/cjs/GridContent.js +2 -2
- package/dist/cjs/IssueContentDeck.js +1 -1
- package/dist/cjs/IssueDeck.js +1 -1
- package/dist/cjs/MasterDeck.js +9 -9
- package/dist/cjs/{Normal-0f06cc52.js → Normal-0497eb61.js} +29 -29
- package/dist/cjs/PublicationDeck.js +1 -1
- package/dist/cjs/QueueDeckExpanded.js +1 -1
- package/dist/cjs/{TaxonomyCard-e3566492.js → TaxonomyCard-b5074d6e.js} +1 -1
- package/dist/cjs/TaxonomyCard.js +2 -2
- package/dist/cjs/TemplateNormal.js +1 -1
- package/dist/cjs/ThumbnailCard.js +1 -1
- package/dist/cjs/VideoSeriesListing.js +1 -1
- package/dist/cjs/{YoutubeGroup-5f480446.js → YoutubeGroup-fd44f8a0.js} +4 -4
- package/dist/cjs/YoutubeGroup.js +1 -1
- package/dist/cjs/{index-be0c82be.js → index-39beccb3.js} +2 -1
- package/dist/cjs/index.js +638 -529
- package/dist/esm/DeckContent.js +9 -9
- package/dist/esm/DeckQueue.js +1 -1
- package/dist/esm/{GridContent-2a48fb19.js → GridContent-d4f5457e.js} +1 -1
- package/dist/esm/GridContent.js +2 -2
- package/dist/esm/IssueContentDeck.js +1 -1
- package/dist/esm/IssueDeck.js +1 -1
- package/dist/esm/MasterDeck.js +9 -9
- package/dist/esm/{Normal-aa76b53c.js → Normal-e1855047.js} +29 -29
- package/dist/esm/PublicationDeck.js +1 -1
- package/dist/esm/QueueDeckExpanded.js +1 -1
- package/dist/esm/{TaxonomyCard-2d0ab635.js → TaxonomyCard-ee1a22ae.js} +1 -1
- package/dist/esm/TaxonomyCard.js +2 -2
- package/dist/esm/TemplateNormal.js +1 -1
- package/dist/esm/ThumbnailCard.js +1 -1
- package/dist/esm/VideoSeriesListing.js +1 -1
- package/dist/esm/{YoutubeGroup-78d93d44.js → YoutubeGroup-1b3eca73.js} +4 -4
- package/dist/esm/YoutubeGroup.js +1 -1
- package/dist/esm/{index-73819142.js → index-3849e3fe.js} +2 -1
- package/dist/esm/index.js +641 -532
- package/package.json +103 -103
package/dist/cjs/index.js
CHANGED
|
@@ -26,7 +26,7 @@ var Link = _interopDefault(require('next/link'));
|
|
|
26
26
|
var Router = require('next/router');
|
|
27
27
|
var Router__default = _interopDefault(Router);
|
|
28
28
|
require('react-dom');
|
|
29
|
-
var index$1 = require('./index-
|
|
29
|
+
var index$1 = require('./index-39beccb3.js');
|
|
30
30
|
require('./index-fa0fb52c.js');
|
|
31
31
|
var entities = require('./entities-310b46ee.js');
|
|
32
32
|
var slicedToArray = require('./slicedToArray-e38fb29d.js');
|
|
@@ -34,13 +34,13 @@ var AdSlot = require('./AdSlot-c472fff6.js');
|
|
|
34
34
|
require('./promise-b96c61f8.js');
|
|
35
35
|
var DeckContent = require('./DeckContent.js');
|
|
36
36
|
require('./get-1f91592f.js');
|
|
37
|
-
var GridContent = require('./GridContent-
|
|
37
|
+
var GridContent = require('./GridContent-f9e3fff5.js');
|
|
38
38
|
var DeckQueue = require('./DeckQueue.js');
|
|
39
39
|
require('react-bootstrap/Media');
|
|
40
40
|
var ThumbnailCard = require('./ThumbnailCard.js');
|
|
41
|
-
var TaxonomyCard = require('./TaxonomyCard-
|
|
41
|
+
var TaxonomyCard = require('./TaxonomyCard-b5074d6e.js');
|
|
42
42
|
var GroupDeck = require('./GroupDeck.js');
|
|
43
|
-
var YoutubeGroup = require('./YoutubeGroup-
|
|
43
|
+
var YoutubeGroup = require('./YoutubeGroup-fd44f8a0.js');
|
|
44
44
|
var reactBootstrap = require('react-bootstrap');
|
|
45
45
|
var QueueDeckExpanded = require('./QueueDeckExpanded.js');
|
|
46
46
|
var index_esm = require('./index.esm-340d3792.js');
|
|
@@ -52,7 +52,7 @@ var IssueDeck = require('./IssueDeck.js');
|
|
|
52
52
|
require('react-bootstrap/Badge');
|
|
53
53
|
var IssueContentDeck = require('./IssueContentDeck.js');
|
|
54
54
|
var Spinner = _interopDefault(require('react-bootstrap/Spinner'));
|
|
55
|
-
var TemplateNormal = require('./Normal-
|
|
55
|
+
var TemplateNormal = require('./Normal-0497eb61.js');
|
|
56
56
|
require('react-bootstrap/ListGroup');
|
|
57
57
|
var Head = _interopDefault(require('next/head'));
|
|
58
58
|
var Accordion = _interopDefault(require('react-bootstrap/Accordion'));
|
|
@@ -3046,21 +3046,18 @@ var Slideshow = function Slideshow(_ref) {
|
|
|
3046
3046
|
);
|
|
3047
3047
|
};
|
|
3048
3048
|
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3049
|
+
// do not edit .js files directly - edit src/index.jst
|
|
3050
|
+
|
|
3051
|
+
|
|
3052
3052
|
|
|
3053
3053
|
var fastDeepEqual = function equal(a, b) {
|
|
3054
3054
|
if (a === b) return true;
|
|
3055
3055
|
|
|
3056
3056
|
if (a && b && typeof a == 'object' && typeof b == 'object') {
|
|
3057
|
-
|
|
3058
|
-
, arrB = isArray(b)
|
|
3059
|
-
, i
|
|
3060
|
-
, length
|
|
3061
|
-
, key;
|
|
3057
|
+
if (a.constructor !== b.constructor) return false;
|
|
3062
3058
|
|
|
3063
|
-
|
|
3059
|
+
var length, i, keys;
|
|
3060
|
+
if (Array.isArray(a)) {
|
|
3064
3061
|
length = a.length;
|
|
3065
3062
|
if (length != b.length) return false;
|
|
3066
3063
|
for (i = length; i-- !== 0;)
|
|
@@ -3068,35 +3065,29 @@ var fastDeepEqual = function equal(a, b) {
|
|
|
3068
3065
|
return true;
|
|
3069
3066
|
}
|
|
3070
3067
|
|
|
3071
|
-
if (arrA != arrB) return false;
|
|
3072
3068
|
|
|
3073
|
-
var dateA = a instanceof Date
|
|
3074
|
-
, dateB = b instanceof Date;
|
|
3075
|
-
if (dateA != dateB) return false;
|
|
3076
|
-
if (dateA && dateB) return a.getTime() == b.getTime();
|
|
3077
3069
|
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
if (
|
|
3081
|
-
if (regexpA && regexpB) return a.toString() == b.toString();
|
|
3070
|
+
if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
|
|
3071
|
+
if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
|
|
3072
|
+
if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
|
|
3082
3073
|
|
|
3083
|
-
|
|
3074
|
+
keys = Object.keys(a);
|
|
3084
3075
|
length = keys.length;
|
|
3085
|
-
|
|
3086
|
-
if (length !== keyList(b).length)
|
|
3087
|
-
return false;
|
|
3076
|
+
if (length !== Object.keys(b).length) return false;
|
|
3088
3077
|
|
|
3089
3078
|
for (i = length; i-- !== 0;)
|
|
3090
|
-
if (!
|
|
3079
|
+
if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
|
|
3091
3080
|
|
|
3092
3081
|
for (i = length; i-- !== 0;) {
|
|
3093
|
-
key = keys[i];
|
|
3082
|
+
var key = keys[i];
|
|
3083
|
+
|
|
3094
3084
|
if (!equal(a[key], b[key])) return false;
|
|
3095
3085
|
}
|
|
3096
3086
|
|
|
3097
3087
|
return true;
|
|
3098
3088
|
}
|
|
3099
3089
|
|
|
3090
|
+
// true if both NaN, false otherwise
|
|
3100
3091
|
return a!==a && b!==b;
|
|
3101
3092
|
};
|
|
3102
3093
|
|
|
@@ -4119,7 +4110,7 @@ function formatValue(ctx, value, recurseTimes) {
|
|
|
4119
4110
|
var base = '', array = false, braces = ['{', '}'];
|
|
4120
4111
|
|
|
4121
4112
|
// Make Array say that they are Array
|
|
4122
|
-
if (isArray
|
|
4113
|
+
if (isArray(value)) {
|
|
4123
4114
|
array = true;
|
|
4124
4115
|
braces = ['[', ']'];
|
|
4125
4116
|
}
|
|
@@ -4298,7 +4289,7 @@ function reduceToSingleString(output, base, braces) {
|
|
|
4298
4289
|
|
|
4299
4290
|
// NOTE: These type checking functions intentionally don't use `instanceof`
|
|
4300
4291
|
// because it is fragile and can be easily faked with `Object.create()`.
|
|
4301
|
-
function isArray
|
|
4292
|
+
function isArray(ar) {
|
|
4302
4293
|
return Array.isArray(ar);
|
|
4303
4294
|
}
|
|
4304
4295
|
|
|
@@ -4425,7 +4416,7 @@ var util = {
|
|
|
4425
4416
|
isNullOrUndefined: isNullOrUndefined,
|
|
4426
4417
|
isNull: isNull,
|
|
4427
4418
|
isBoolean: isBoolean,
|
|
4428
|
-
isArray: isArray
|
|
4419
|
+
isArray: isArray,
|
|
4429
4420
|
inspect: inspect,
|
|
4430
4421
|
deprecate: deprecate,
|
|
4431
4422
|
format: format,
|
|
@@ -5092,199 +5083,235 @@ module.exports = exports['default'];
|
|
|
5092
5083
|
|
|
5093
5084
|
var youTubePlayer = _commonjsHelpers.unwrapExports(dist);
|
|
5094
5085
|
|
|
5095
|
-
|
|
5096
|
-
|
|
5097
|
-
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
|
5086
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
5098
5087
|
|
|
5099
5088
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
5100
5089
|
|
|
5101
|
-
function
|
|
5090
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
5091
|
+
|
|
5092
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
5093
|
+
|
|
5094
|
+
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
5095
|
+
|
|
5096
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
5097
|
+
|
|
5098
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
5102
5099
|
|
|
5103
|
-
function
|
|
5100
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
5104
5101
|
|
|
5105
|
-
|
|
5106
|
-
|
|
5107
|
-
|
|
5108
|
-
|
|
5109
|
-
|
|
5102
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
5103
|
+
|
|
5104
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
5105
|
+
|
|
5106
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
5107
|
+
|
|
5108
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
5109
|
+
|
|
5110
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
5111
|
+
|
|
5112
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5113
|
+
/**
|
|
5114
|
+
* Check whether a `props` change should result in the video being updated.
|
|
5115
|
+
*
|
|
5116
|
+
* @param {Object} prevProps
|
|
5117
|
+
* @param {Object} props
|
|
5110
5118
|
*/
|
|
5119
|
+
|
|
5111
5120
|
function shouldUpdateVideo(prevProps, props) {
|
|
5112
5121
|
// A changing video should always trigger an update
|
|
5113
5122
|
if (prevProps.videoId !== props.videoId) {
|
|
5114
5123
|
return true;
|
|
5115
|
-
}
|
|
5116
|
-
|
|
5117
|
-
// Otherwise, a change in the start/end time playerVars also requires a player
|
|
5124
|
+
} // Otherwise, a change in the start/end time playerVars also requires a player
|
|
5118
5125
|
// update.
|
|
5126
|
+
|
|
5127
|
+
|
|
5119
5128
|
var prevVars = prevProps.opts.playerVars || {};
|
|
5120
5129
|
var vars = props.opts.playerVars || {};
|
|
5121
|
-
|
|
5122
5130
|
return prevVars.start !== vars.start || prevVars.end !== vars.end;
|
|
5123
5131
|
}
|
|
5124
|
-
|
|
5125
|
-
|
|
5126
|
-
*
|
|
5127
|
-
*
|
|
5128
|
-
*
|
|
5129
|
-
*
|
|
5130
|
-
* @param {Object} opts
|
|
5132
|
+
/**
|
|
5133
|
+
* Neutralize API options that only require a video update, leaving only options
|
|
5134
|
+
* that require a player reset. The results can then be compared to see if a
|
|
5135
|
+
* player reset is necessary.
|
|
5136
|
+
*
|
|
5137
|
+
* @param {Object} opts
|
|
5131
5138
|
*/
|
|
5139
|
+
|
|
5140
|
+
|
|
5132
5141
|
function filterResetOptions(opts) {
|
|
5133
|
-
return
|
|
5134
|
-
playerVars:
|
|
5142
|
+
return _objectSpread({}, opts, {
|
|
5143
|
+
playerVars: _objectSpread({}, opts.playerVars, {
|
|
5135
5144
|
autoplay: 0,
|
|
5136
5145
|
start: 0,
|
|
5137
5146
|
end: 0
|
|
5138
5147
|
})
|
|
5139
5148
|
});
|
|
5140
5149
|
}
|
|
5141
|
-
|
|
5142
|
-
|
|
5143
|
-
*
|
|
5144
|
-
*
|
|
5145
|
-
*
|
|
5146
|
-
*
|
|
5147
|
-
*
|
|
5148
|
-
* @param {Object}
|
|
5149
|
-
* @param {Object} props
|
|
5150
|
+
/**
|
|
5151
|
+
* Check whether a `props` change should result in the player being reset.
|
|
5152
|
+
* The player is reset when the `props.opts` change, except if the only change
|
|
5153
|
+
* is in the `start` and `end` playerVars, because a video update can deal with
|
|
5154
|
+
* those.
|
|
5155
|
+
*
|
|
5156
|
+
* @param {Object} prevProps
|
|
5157
|
+
* @param {Object} props
|
|
5150
5158
|
*/
|
|
5159
|
+
|
|
5160
|
+
|
|
5151
5161
|
function shouldResetPlayer(prevProps, props) {
|
|
5152
5162
|
return !fastDeepEqual(filterResetOptions(prevProps.opts), filterResetOptions(props.opts));
|
|
5153
5163
|
}
|
|
5154
|
-
|
|
5155
|
-
|
|
5156
|
-
*
|
|
5157
|
-
*
|
|
5158
|
-
* @param {Object}
|
|
5159
|
-
* @param {Object} props
|
|
5164
|
+
/**
|
|
5165
|
+
* Check whether a props change should result in an id or className update.
|
|
5166
|
+
*
|
|
5167
|
+
* @param {Object} prevProps
|
|
5168
|
+
* @param {Object} props
|
|
5160
5169
|
*/
|
|
5170
|
+
|
|
5171
|
+
|
|
5161
5172
|
function shouldUpdatePlayer(prevProps, props) {
|
|
5162
5173
|
return prevProps.id !== props.id || prevProps.className !== props.className;
|
|
5163
5174
|
}
|
|
5164
5175
|
|
|
5165
|
-
var YouTube = function (_React$Component) {
|
|
5176
|
+
var YouTube = /*#__PURE__*/function (_React$Component) {
|
|
5166
5177
|
_inherits(YouTube, _React$Component);
|
|
5167
5178
|
|
|
5179
|
+
var _super = _createSuper(YouTube);
|
|
5180
|
+
|
|
5181
|
+
/**
|
|
5182
|
+
* Expose PlayerState constants for convenience. These constants can also be
|
|
5183
|
+
* accessed through the global YT object after the YouTube IFrame API is instantiated.
|
|
5184
|
+
* https://developers.google.com/youtube/iframe_api_reference#onStateChange
|
|
5185
|
+
*/
|
|
5168
5186
|
function YouTube(props) {
|
|
5187
|
+
var _this;
|
|
5188
|
+
|
|
5169
5189
|
_classCallCheck(this, YouTube);
|
|
5170
5190
|
|
|
5171
|
-
|
|
5191
|
+
_this = _super.call(this, props);
|
|
5172
5192
|
|
|
5173
|
-
_this
|
|
5193
|
+
_defineProperty(_assertThisInitialized(_this), "onPlayerReady", function (event) {
|
|
5174
5194
|
return _this.props.onReady(event);
|
|
5175
|
-
};
|
|
5195
|
+
});
|
|
5176
5196
|
|
|
5177
|
-
_this
|
|
5197
|
+
_defineProperty(_assertThisInitialized(_this), "onPlayerError", function (event) {
|
|
5178
5198
|
return _this.props.onError(event);
|
|
5179
|
-
};
|
|
5199
|
+
});
|
|
5180
5200
|
|
|
5181
|
-
_this
|
|
5201
|
+
_defineProperty(_assertThisInitialized(_this), "onPlayerStateChange", function (event) {
|
|
5182
5202
|
_this.props.onStateChange(event);
|
|
5183
|
-
switch (event.data) {
|
|
5184
5203
|
|
|
5204
|
+
switch (event.data) {
|
|
5185
5205
|
case YouTube.PlayerState.ENDED:
|
|
5186
5206
|
_this.props.onEnd(event);
|
|
5207
|
+
|
|
5187
5208
|
break;
|
|
5188
5209
|
|
|
5189
5210
|
case YouTube.PlayerState.PLAYING:
|
|
5190
5211
|
_this.props.onPlay(event);
|
|
5212
|
+
|
|
5191
5213
|
break;
|
|
5192
5214
|
|
|
5193
5215
|
case YouTube.PlayerState.PAUSED:
|
|
5194
5216
|
_this.props.onPause(event);
|
|
5217
|
+
|
|
5195
5218
|
break;
|
|
5196
5219
|
}
|
|
5197
|
-
};
|
|
5220
|
+
});
|
|
5198
5221
|
|
|
5199
|
-
_this
|
|
5222
|
+
_defineProperty(_assertThisInitialized(_this), "onPlayerPlaybackRateChange", function (event) {
|
|
5200
5223
|
return _this.props.onPlaybackRateChange(event);
|
|
5201
|
-
};
|
|
5224
|
+
});
|
|
5202
5225
|
|
|
5203
|
-
_this
|
|
5226
|
+
_defineProperty(_assertThisInitialized(_this), "onPlayerPlaybackQualityChange", function (event) {
|
|
5204
5227
|
return _this.props.onPlaybackQualityChange(event);
|
|
5205
|
-
};
|
|
5228
|
+
});
|
|
5206
5229
|
|
|
5207
|
-
_this
|
|
5230
|
+
_defineProperty(_assertThisInitialized(_this), "createPlayer", function () {
|
|
5208
5231
|
// do not attempt to create a player server-side, it won't work
|
|
5209
|
-
if (typeof document === 'undefined') return;
|
|
5210
|
-
|
|
5211
|
-
var playerOpts =
|
|
5232
|
+
if (typeof document === 'undefined') return; // create player
|
|
5233
|
+
|
|
5234
|
+
var playerOpts = _objectSpread({}, _this.props.opts, {
|
|
5212
5235
|
// preload the `videoId` video if one is already given
|
|
5213
5236
|
videoId: _this.props.videoId
|
|
5214
5237
|
});
|
|
5215
|
-
|
|
5216
|
-
// attach event handlers
|
|
5238
|
+
|
|
5239
|
+
_this.internalPlayer = youTubePlayer(_this.container, playerOpts); // attach event handlers
|
|
5240
|
+
|
|
5217
5241
|
_this.internalPlayer.on('ready', _this.onPlayerReady);
|
|
5242
|
+
|
|
5218
5243
|
_this.internalPlayer.on('error', _this.onPlayerError);
|
|
5244
|
+
|
|
5219
5245
|
_this.internalPlayer.on('stateChange', _this.onPlayerStateChange);
|
|
5246
|
+
|
|
5220
5247
|
_this.internalPlayer.on('playbackRateChange', _this.onPlayerPlaybackRateChange);
|
|
5248
|
+
|
|
5221
5249
|
_this.internalPlayer.on('playbackQualityChange', _this.onPlayerPlaybackQualityChange);
|
|
5222
|
-
};
|
|
5250
|
+
});
|
|
5223
5251
|
|
|
5224
|
-
_this
|
|
5252
|
+
_defineProperty(_assertThisInitialized(_this), "resetPlayer", function () {
|
|
5225
5253
|
return _this.internalPlayer.destroy().then(_this.createPlayer);
|
|
5226
|
-
};
|
|
5254
|
+
});
|
|
5227
5255
|
|
|
5228
|
-
_this
|
|
5256
|
+
_defineProperty(_assertThisInitialized(_this), "updatePlayer", function () {
|
|
5229
5257
|
_this.internalPlayer.getIframe().then(function (iframe) {
|
|
5230
5258
|
if (_this.props.id) iframe.setAttribute('id', _this.props.id);else iframe.removeAttribute('id');
|
|
5231
5259
|
if (_this.props.className) iframe.setAttribute('class', _this.props.className);else iframe.removeAttribute('class');
|
|
5232
5260
|
});
|
|
5233
|
-
};
|
|
5261
|
+
});
|
|
5234
5262
|
|
|
5235
|
-
_this
|
|
5263
|
+
_defineProperty(_assertThisInitialized(_this), "updateVideo", function () {
|
|
5236
5264
|
if (typeof _this.props.videoId === 'undefined' || _this.props.videoId === null) {
|
|
5237
5265
|
_this.internalPlayer.stopVideo();
|
|
5266
|
+
|
|
5238
5267
|
return;
|
|
5239
|
-
}
|
|
5268
|
+
} // set queueing options
|
|
5269
|
+
|
|
5240
5270
|
|
|
5241
|
-
// set queueing options
|
|
5242
5271
|
var autoplay = false;
|
|
5243
5272
|
var opts = {
|
|
5244
5273
|
videoId: _this.props.videoId
|
|
5245
5274
|
};
|
|
5275
|
+
|
|
5246
5276
|
if ('playerVars' in _this.props.opts) {
|
|
5247
5277
|
autoplay = _this.props.opts.playerVars.autoplay === 1;
|
|
5278
|
+
|
|
5248
5279
|
if ('start' in _this.props.opts.playerVars) {
|
|
5249
5280
|
opts.startSeconds = _this.props.opts.playerVars.start;
|
|
5250
5281
|
}
|
|
5282
|
+
|
|
5251
5283
|
if ('end' in _this.props.opts.playerVars) {
|
|
5252
5284
|
opts.endSeconds = _this.props.opts.playerVars.end;
|
|
5253
5285
|
}
|
|
5254
|
-
}
|
|
5286
|
+
} // if autoplay is enabled loadVideoById
|
|
5287
|
+
|
|
5255
5288
|
|
|
5256
|
-
// if autoplay is enabled loadVideoById
|
|
5257
5289
|
if (autoplay) {
|
|
5258
5290
|
_this.internalPlayer.loadVideoById(opts);
|
|
5291
|
+
|
|
5259
5292
|
return;
|
|
5260
|
-
}
|
|
5261
|
-
|
|
5293
|
+
} // default behaviour just cues the video
|
|
5294
|
+
|
|
5295
|
+
|
|
5262
5296
|
_this.internalPlayer.cueVideoById(opts);
|
|
5263
|
-
};
|
|
5297
|
+
});
|
|
5264
5298
|
|
|
5265
|
-
_this
|
|
5299
|
+
_defineProperty(_assertThisInitialized(_this), "refContainer", function (container) {
|
|
5266
5300
|
_this.container = container;
|
|
5267
|
-
};
|
|
5301
|
+
});
|
|
5268
5302
|
|
|
5269
5303
|
_this.container = null;
|
|
5270
5304
|
_this.internalPlayer = null;
|
|
5271
5305
|
return _this;
|
|
5272
5306
|
}
|
|
5273
5307
|
|
|
5274
|
-
/**
|
|
5275
|
-
* Expose PlayerState constants for convenience. These constants can also be
|
|
5276
|
-
* accessed through the global YT object after the YouTube IFrame API is instantiated.
|
|
5277
|
-
* https://developers.google.com/youtube/iframe_api_reference#onStateChange
|
|
5278
|
-
*/
|
|
5279
|
-
|
|
5280
|
-
|
|
5281
5308
|
_createClass(YouTube, [{
|
|
5282
|
-
key:
|
|
5309
|
+
key: "componentDidMount",
|
|
5283
5310
|
value: function componentDidMount() {
|
|
5284
5311
|
this.createPlayer();
|
|
5285
5312
|
}
|
|
5286
5313
|
}, {
|
|
5287
|
-
key:
|
|
5314
|
+
key: "componentDidUpdate",
|
|
5288
5315
|
value: function componentDidUpdate(prevProps) {
|
|
5289
5316
|
if (shouldUpdatePlayer(prevProps, this.props)) {
|
|
5290
5317
|
this.updatePlayer();
|
|
@@ -5299,112 +5326,58 @@ var YouTube = function (_React$Component) {
|
|
|
5299
5326
|
}
|
|
5300
5327
|
}
|
|
5301
5328
|
}, {
|
|
5302
|
-
key:
|
|
5329
|
+
key: "componentWillUnmount",
|
|
5303
5330
|
value: function componentWillUnmount() {
|
|
5304
|
-
/**
|
|
5305
|
-
* Note: The `youtube-player` package that is used promisifies all
|
|
5306
|
-
* Player API calls, which introduces a delay of a tick before it actually
|
|
5307
|
-
* gets destroyed. Since React attempts to remove the element instantly
|
|
5308
|
-
* this method isn't quick enough to reset the container element.
|
|
5331
|
+
/**
|
|
5332
|
+
* Note: The `youtube-player` package that is used promisifies all YouTube
|
|
5333
|
+
* Player API calls, which introduces a delay of a tick before it actually
|
|
5334
|
+
* gets destroyed. Since React attempts to remove the element instantly
|
|
5335
|
+
* this method isn't quick enough to reset the container element.
|
|
5309
5336
|
*/
|
|
5310
5337
|
this.internalPlayer.destroy();
|
|
5311
5338
|
}
|
|
5312
|
-
|
|
5313
|
-
|
|
5314
|
-
*
|
|
5315
|
-
*
|
|
5316
|
-
*
|
|
5317
|
-
* @param {Object} target - player object
|
|
5318
|
-
*/
|
|
5319
|
-
|
|
5320
|
-
|
|
5321
|
-
/**
|
|
5322
|
-
* https://developers.google.com/youtube/iframe_api_reference#onError
|
|
5323
|
-
*
|
|
5324
|
-
* @param {Object} event
|
|
5325
|
-
* @param {Integer} data - error type
|
|
5326
|
-
* @param {Object} target - player object
|
|
5327
|
-
*/
|
|
5328
|
-
|
|
5329
|
-
|
|
5330
|
-
/**
|
|
5331
|
-
* https://developers.google.com/youtube/iframe_api_reference#onStateChange
|
|
5332
|
-
*
|
|
5333
|
-
* @param {Object} event
|
|
5334
|
-
* @param {Integer} data - status change type
|
|
5335
|
-
* @param {Object} target - actual YT player
|
|
5336
|
-
*/
|
|
5337
|
-
|
|
5338
|
-
|
|
5339
|
-
/**
|
|
5340
|
-
* https://developers.google.com/youtube/iframe_api_reference#onPlaybackRateChange
|
|
5341
|
-
*
|
|
5342
|
-
* @param {Object} event
|
|
5343
|
-
* @param {Float} data - playback rate
|
|
5344
|
-
* @param {Object} target - actual YT player
|
|
5345
|
-
*/
|
|
5346
|
-
|
|
5347
|
-
|
|
5348
|
-
/**
|
|
5349
|
-
* https://developers.google.com/youtube/iframe_api_reference#onPlaybackQualityChange
|
|
5350
|
-
*
|
|
5351
|
-
* @param {Object} event
|
|
5352
|
-
* @param {String} data - playback quality
|
|
5353
|
-
* @param {Object} target - actual YT player
|
|
5354
|
-
*/
|
|
5355
|
-
|
|
5356
|
-
|
|
5357
|
-
/**
|
|
5358
|
-
* Initialize the Youtube Player API on the container and attach event handlers
|
|
5359
|
-
*/
|
|
5360
|
-
|
|
5361
|
-
|
|
5362
|
-
/**
|
|
5363
|
-
* Shorthand for destroying and then re-creating the Youtube Player
|
|
5364
|
-
*/
|
|
5365
|
-
|
|
5366
|
-
|
|
5367
|
-
/**
|
|
5368
|
-
* Method to update the id and class of the Youtube Player iframe.
|
|
5369
|
-
* React should update this automatically but since the Youtube Player API
|
|
5370
|
-
* replaced the DIV that is mounted by React we need to do this manually.
|
|
5371
|
-
*/
|
|
5372
|
-
|
|
5373
|
-
|
|
5374
|
-
/**
|
|
5375
|
-
* Call Youtube Player API methods to update the currently playing video.
|
|
5376
|
-
* Depeding on the `opts.playerVars.autoplay` this function uses one of two
|
|
5377
|
-
* Youtube Player API methods to update the video.
|
|
5339
|
+
/**
|
|
5340
|
+
* https://developers.google.com/youtube/iframe_api_reference#onReady
|
|
5341
|
+
*
|
|
5342
|
+
* @param {Object} event
|
|
5343
|
+
* @param {Object} target - player object
|
|
5378
5344
|
*/
|
|
5379
5345
|
|
|
5380
5346
|
}, {
|
|
5381
|
-
key:
|
|
5347
|
+
key: "render",
|
|
5382
5348
|
value: function render() {
|
|
5383
|
-
return React__default.createElement(
|
|
5384
|
-
|
|
5385
|
-
|
|
5386
|
-
|
|
5387
|
-
|
|
5349
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
5350
|
+
className: this.props.containerClassName
|
|
5351
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
5352
|
+
id: this.props.id,
|
|
5353
|
+
className: this.props.className,
|
|
5354
|
+
ref: this.refContainer
|
|
5355
|
+
}));
|
|
5388
5356
|
}
|
|
5389
5357
|
}]);
|
|
5390
5358
|
|
|
5391
5359
|
return YouTube;
|
|
5392
5360
|
}(React__default.Component);
|
|
5393
5361
|
|
|
5362
|
+
_defineProperty(YouTube, "PlayerState", {
|
|
5363
|
+
UNSTARTED: -1,
|
|
5364
|
+
ENDED: 0,
|
|
5365
|
+
PLAYING: 1,
|
|
5366
|
+
PAUSED: 2,
|
|
5367
|
+
BUFFERING: 3,
|
|
5368
|
+
CUED: 5
|
|
5369
|
+
});
|
|
5370
|
+
|
|
5394
5371
|
YouTube.propTypes = {
|
|
5395
5372
|
videoId: PropTypes.string,
|
|
5396
|
-
|
|
5397
5373
|
// custom ID for player element
|
|
5398
5374
|
id: PropTypes.string,
|
|
5399
|
-
|
|
5400
5375
|
// custom class name for player element
|
|
5401
5376
|
className: PropTypes.string,
|
|
5402
5377
|
// custom class name for player container element
|
|
5403
5378
|
containerClassName: PropTypes.string,
|
|
5404
|
-
|
|
5405
5379
|
// https://developers.google.com/youtube/iframe_api_reference#Loading_a_Video_Player
|
|
5406
5380
|
opts: PropTypes.objectOf(PropTypes.any),
|
|
5407
|
-
|
|
5408
5381
|
// event subscriptions
|
|
5409
5382
|
onReady: PropTypes.func,
|
|
5410
5383
|
onError: PropTypes.func,
|
|
@@ -5416,6 +5389,7 @@ YouTube.propTypes = {
|
|
|
5416
5389
|
onPlaybackQualityChange: PropTypes.func
|
|
5417
5390
|
};
|
|
5418
5391
|
YouTube.defaultProps = {
|
|
5392
|
+
videoId: null,
|
|
5419
5393
|
id: null,
|
|
5420
5394
|
className: null,
|
|
5421
5395
|
opts: {},
|
|
@@ -5429,14 +5403,6 @@ YouTube.defaultProps = {
|
|
|
5429
5403
|
onPlaybackRateChange: function onPlaybackRateChange() {},
|
|
5430
5404
|
onPlaybackQualityChange: function onPlaybackQualityChange() {}
|
|
5431
5405
|
};
|
|
5432
|
-
YouTube.PlayerState = {
|
|
5433
|
-
UNSTARTED: -1,
|
|
5434
|
-
ENDED: 0,
|
|
5435
|
-
PLAYING: 1,
|
|
5436
|
-
PAUSED: 2,
|
|
5437
|
-
BUFFERING: 3,
|
|
5438
|
-
CUED: 5
|
|
5439
|
-
};
|
|
5440
5406
|
|
|
5441
5407
|
var YouTubePlayer = function YouTubePlayer(_ref) {
|
|
5442
5408
|
var url = _ref.url;
|
|
@@ -6471,8 +6437,8 @@ var window_1 = win;
|
|
|
6471
6437
|
|
|
6472
6438
|
/*! @name @brightcove/react-player-loader @version 1.4.0 @license Apache-2.0 */
|
|
6473
6439
|
|
|
6474
|
-
function _extends
|
|
6475
|
-
_extends
|
|
6440
|
+
function _extends() {
|
|
6441
|
+
_extends = Object.assign || function (target) {
|
|
6476
6442
|
for (var i = 1; i < arguments.length; i++) {
|
|
6477
6443
|
var source = arguments[i];
|
|
6478
6444
|
|
|
@@ -6486,7 +6452,7 @@ function _extends$1() {
|
|
|
6486
6452
|
return target;
|
|
6487
6453
|
};
|
|
6488
6454
|
|
|
6489
|
-
return _extends
|
|
6455
|
+
return _extends.apply(this, arguments);
|
|
6490
6456
|
}
|
|
6491
6457
|
|
|
6492
6458
|
function _inheritsLoose(subClass, superClass) {
|
|
@@ -6495,7 +6461,7 @@ function _inheritsLoose(subClass, superClass) {
|
|
|
6495
6461
|
subClass.__proto__ = superClass;
|
|
6496
6462
|
}
|
|
6497
6463
|
|
|
6498
|
-
function _assertThisInitialized(self) {
|
|
6464
|
+
function _assertThisInitialized$1(self) {
|
|
6499
6465
|
if (self === void 0) {
|
|
6500
6466
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
6501
6467
|
}
|
|
@@ -6505,8 +6471,8 @@ function _assertThisInitialized(self) {
|
|
|
6505
6471
|
|
|
6506
6472
|
/*! @name @brightcove/player-loader @version 1.7.1 @license Apache-2.0 */
|
|
6507
6473
|
|
|
6508
|
-
function _extends$1
|
|
6509
|
-
_extends$1
|
|
6474
|
+
function _extends$1() {
|
|
6475
|
+
_extends$1 = Object.assign || function (target) {
|
|
6510
6476
|
for (var i = 1; i < arguments.length; i++) {
|
|
6511
6477
|
var source = arguments[i];
|
|
6512
6478
|
|
|
@@ -6520,7 +6486,7 @@ function _extends$1$1() {
|
|
|
6520
6486
|
return target;
|
|
6521
6487
|
};
|
|
6522
6488
|
|
|
6523
|
-
return _extends$1
|
|
6489
|
+
return _extends$1.apply(this, arguments);
|
|
6524
6490
|
}
|
|
6525
6491
|
|
|
6526
6492
|
var version$1 = "1.7.1";
|
|
@@ -6528,7 +6494,7 @@ var version$1 = "1.7.1";
|
|
|
6528
6494
|
/*! @name @brightcove/player-url @version 1.2.0 @license Apache-2.0 */
|
|
6529
6495
|
var version$1$1 = "1.2.0";
|
|
6530
6496
|
|
|
6531
|
-
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
|
|
6497
|
+
var _typeof$1 = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
|
|
6532
6498
|
return typeof obj;
|
|
6533
6499
|
} : function (obj) {
|
|
6534
6500
|
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
@@ -6663,7 +6629,7 @@ var brightcovePlayerUrl = function brightcovePlayerUrl(_ref) {
|
|
|
6663
6629
|
|
|
6664
6630
|
var qs = '';
|
|
6665
6631
|
|
|
6666
|
-
if (iframe && queryParams && (typeof queryParams === 'undefined' ? 'undefined' : _typeof(queryParams)) === 'object') {
|
|
6632
|
+
if (iframe && queryParams && (typeof queryParams === 'undefined' ? 'undefined' : _typeof$1(queryParams)) === 'object') {
|
|
6667
6633
|
qs = getQueryString(queryParams);
|
|
6668
6634
|
}
|
|
6669
6635
|
|
|
@@ -6897,7 +6863,7 @@ var wrapResponsive = function wrapResponsive(embedType, embedOptions, el) {
|
|
|
6897
6863
|
el.style.width = '100%';
|
|
6898
6864
|
el.style.height = '100%';
|
|
6899
6865
|
|
|
6900
|
-
var responsive = _extends$1
|
|
6866
|
+
var responsive = _extends$1({
|
|
6901
6867
|
aspectRatio: DEFAULT_ASPECT_RATIO,
|
|
6902
6868
|
iframeHorizontalPlaylist: DEFAULT_IFRAME_HORIZONTAL_PLAYLIST,
|
|
6903
6869
|
maxWidth: DEFAULT_MAX_WIDTH
|
|
@@ -7582,7 +7548,7 @@ var loadPlayer = function loadPlayer(params, resolve, reject) {
|
|
|
7582
7548
|
|
|
7583
7549
|
|
|
7584
7550
|
var brightcovePlayerLoader = function brightcovePlayerLoader(parameters) {
|
|
7585
|
-
var params = _extends$1
|
|
7551
|
+
var params = _extends$1({}, DEFAULTS, parameters);
|
|
7586
7552
|
|
|
7587
7553
|
var Promise = params.Promise,
|
|
7588
7554
|
onSuccess = params.onSuccess,
|
|
@@ -7724,7 +7690,7 @@ function (_React$Component) {
|
|
|
7724
7690
|
_this.refNode = ref;
|
|
7725
7691
|
};
|
|
7726
7692
|
|
|
7727
|
-
_this.loadPlayer = _this.loadPlayer.bind(_assertThisInitialized(_this));
|
|
7693
|
+
_this.loadPlayer = _this.loadPlayer.bind(_assertThisInitialized$1(_this));
|
|
7728
7694
|
return _this;
|
|
7729
7695
|
}
|
|
7730
7696
|
/**
|
|
@@ -7745,7 +7711,7 @@ function (_React$Component) {
|
|
|
7745
7711
|
var userSuccess = this.props.onSuccess;
|
|
7746
7712
|
var userFailure = this.props.onFailure;
|
|
7747
7713
|
|
|
7748
|
-
var options = _extends
|
|
7714
|
+
var options = _extends({}, this.props, {
|
|
7749
7715
|
refNode: this.refNode,
|
|
7750
7716
|
refNodeInsert: 'append',
|
|
7751
7717
|
onSuccess: function onSuccess(_ref) {
|
|
@@ -8054,7 +8020,7 @@ function (_React$Component) {
|
|
|
8054
8020
|
;
|
|
8055
8021
|
|
|
8056
8022
|
_proto.render = function render() {
|
|
8057
|
-
var props = _extends
|
|
8023
|
+
var props = _extends({
|
|
8058
8024
|
className: 'brightcove-react-player-loader'
|
|
8059
8025
|
}, this.props.attrs, {
|
|
8060
8026
|
ref: this.setRefNode
|
|
@@ -8468,11 +8434,17 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
|
8468
8434
|
|
|
8469
8435
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
8470
8436
|
|
|
8471
|
-
function
|
|
8437
|
+
function _createForOfIteratorHelper(o) { if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (o = _unsupportedIterableToArray(o))) { var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var it, normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
8438
|
+
|
|
8439
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
8440
|
+
|
|
8441
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
8442
|
+
|
|
8443
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
8472
8444
|
|
|
8473
|
-
function
|
|
8445
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
8474
8446
|
|
|
8475
|
-
function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr)
|
|
8447
|
+
function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
8476
8448
|
|
|
8477
8449
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
8478
8450
|
|
|
@@ -8602,12 +8574,12 @@ function getSDK(url, sdkGlobal) {
|
|
|
8602
8574
|
|
|
8603
8575
|
function getConfig(props$1, defaultProps, showWarning) {
|
|
8604
8576
|
var config = (0, _deepmerge["default"])(defaultProps.config, props$1.config);
|
|
8605
|
-
|
|
8606
|
-
var
|
|
8607
|
-
|
|
8577
|
+
|
|
8578
|
+
var _iterator = _createForOfIteratorHelper(props.DEPRECATED_CONFIG_PROPS),
|
|
8579
|
+
_step;
|
|
8608
8580
|
|
|
8609
8581
|
try {
|
|
8610
|
-
for (
|
|
8582
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
8611
8583
|
var p = _step.value;
|
|
8612
8584
|
|
|
8613
8585
|
if (props$1[p]) {
|
|
@@ -8622,18 +8594,9 @@ function getConfig(props$1, defaultProps, showWarning) {
|
|
|
8622
8594
|
}
|
|
8623
8595
|
}
|
|
8624
8596
|
} catch (err) {
|
|
8625
|
-
|
|
8626
|
-
_iteratorError = err;
|
|
8597
|
+
_iterator.e(err);
|
|
8627
8598
|
} finally {
|
|
8628
|
-
|
|
8629
|
-
if (!_iteratorNormalCompletion && _iterator["return"] != null) {
|
|
8630
|
-
_iterator["return"]();
|
|
8631
|
-
}
|
|
8632
|
-
} finally {
|
|
8633
|
-
if (_didIteratorError) {
|
|
8634
|
-
throw _iteratorError;
|
|
8635
|
-
}
|
|
8636
|
-
}
|
|
8599
|
+
_iterator.f();
|
|
8637
8600
|
}
|
|
8638
8601
|
|
|
8639
8602
|
return config;
|
|
@@ -8780,12 +8743,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
8780
8743
|
|
|
8781
8744
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
8782
8745
|
|
|
8783
|
-
function
|
|
8746
|
+
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
8784
8747
|
|
|
8785
|
-
function
|
|
8748
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
8786
8749
|
|
|
8787
8750
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
8788
8751
|
|
|
8752
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
8753
|
+
|
|
8754
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
8755
|
+
|
|
8789
8756
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
8790
8757
|
|
|
8791
8758
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -8794,14 +8761,12 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
8794
8761
|
|
|
8795
8762
|
var SEEK_ON_PLAY_EXPIRY = 5000;
|
|
8796
8763
|
|
|
8797
|
-
var Player =
|
|
8798
|
-
/*#__PURE__*/
|
|
8799
|
-
function (_Component) {
|
|
8764
|
+
var Player = /*#__PURE__*/function (_Component) {
|
|
8800
8765
|
_inherits(Player, _Component);
|
|
8801
8766
|
|
|
8802
|
-
|
|
8803
|
-
var _getPrototypeOf2;
|
|
8767
|
+
var _super = _createSuper(Player);
|
|
8804
8768
|
|
|
8769
|
+
function Player() {
|
|
8805
8770
|
var _this;
|
|
8806
8771
|
|
|
8807
8772
|
_classCallCheck(this, Player);
|
|
@@ -8810,7 +8775,7 @@ function (_Component) {
|
|
|
8810
8775
|
_args[_key] = arguments[_key];
|
|
8811
8776
|
}
|
|
8812
8777
|
|
|
8813
|
-
_this =
|
|
8778
|
+
_this = _super.call.apply(_super, [this].concat(_args));
|
|
8814
8779
|
|
|
8815
8780
|
_defineProperty(_assertThisInitialized(_this), "mounted", false);
|
|
8816
8781
|
|
|
@@ -9135,7 +9100,7 @@ function (_Component) {
|
|
|
9135
9100
|
return null;
|
|
9136
9101
|
}
|
|
9137
9102
|
|
|
9138
|
-
return _react["default"].createElement(Player, _extends({}, this.props, {
|
|
9103
|
+
return /*#__PURE__*/_react["default"].createElement(Player, _extends({}, this.props, {
|
|
9139
9104
|
ref: this.ref,
|
|
9140
9105
|
onReady: this.handleReady,
|
|
9141
9106
|
onPlay: this.handlePlay,
|
|
@@ -9196,12 +9161,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
9196
9161
|
|
|
9197
9162
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
9198
9163
|
|
|
9199
|
-
function
|
|
9164
|
+
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
9200
9165
|
|
|
9201
|
-
function
|
|
9166
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
9202
9167
|
|
|
9203
9168
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
9204
9169
|
|
|
9170
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
9171
|
+
|
|
9172
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
9173
|
+
|
|
9205
9174
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
9206
9175
|
|
|
9207
9176
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -9213,14 +9182,12 @@ var SUPPORTED_PROPS = Object.keys(props.propTypes);
|
|
|
9213
9182
|
function createSinglePlayer(activePlayer) {
|
|
9214
9183
|
var _class, _temp;
|
|
9215
9184
|
|
|
9216
|
-
return _temp = _class =
|
|
9217
|
-
/*#__PURE__*/
|
|
9218
|
-
function (_Component) {
|
|
9185
|
+
return _temp = _class = /*#__PURE__*/function (_Component) {
|
|
9219
9186
|
_inherits(SinglePlayer, _Component);
|
|
9220
9187
|
|
|
9221
|
-
|
|
9222
|
-
var _getPrototypeOf2;
|
|
9188
|
+
var _super = _createSuper(SinglePlayer);
|
|
9223
9189
|
|
|
9190
|
+
function SinglePlayer() {
|
|
9224
9191
|
var _this;
|
|
9225
9192
|
|
|
9226
9193
|
_classCallCheck(this, SinglePlayer);
|
|
@@ -9229,7 +9196,7 @@ function createSinglePlayer(activePlayer) {
|
|
|
9229
9196
|
args[_key] = arguments[_key];
|
|
9230
9197
|
}
|
|
9231
9198
|
|
|
9232
|
-
_this =
|
|
9199
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
9233
9200
|
|
|
9234
9201
|
_defineProperty(_assertThisInitialized(_this), "config", (0, utils.getConfig)(_this.props, props.defaultProps, true));
|
|
9235
9202
|
|
|
@@ -9297,12 +9264,12 @@ function createSinglePlayer(activePlayer) {
|
|
|
9297
9264
|
height = _this$props.height,
|
|
9298
9265
|
Wrapper = _this$props.wrapper;
|
|
9299
9266
|
var otherProps = (0, utils.omit)(this.props, SUPPORTED_PROPS, props.DEPRECATED_CONFIG_PROPS);
|
|
9300
|
-
return _react["default"].createElement(Wrapper, _extends({
|
|
9267
|
+
return /*#__PURE__*/_react["default"].createElement(Wrapper, _extends({
|
|
9301
9268
|
style: _objectSpread({}, style, {
|
|
9302
9269
|
width: width,
|
|
9303
9270
|
height: height
|
|
9304
9271
|
})
|
|
9305
|
-
}, otherProps), _react["default"].createElement(_Player["default"], _extends({}, this.props, {
|
|
9272
|
+
}, otherProps), /*#__PURE__*/_react["default"].createElement(_Player["default"], _extends({}, this.props, {
|
|
9306
9273
|
ref: this.ref,
|
|
9307
9274
|
activePlayer: activePlayer,
|
|
9308
9275
|
config: this.config
|
|
@@ -9348,23 +9315,31 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
9348
9315
|
|
|
9349
9316
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
9350
9317
|
|
|
9351
|
-
function
|
|
9318
|
+
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
9352
9319
|
|
|
9353
|
-
function
|
|
9320
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
9354
9321
|
|
|
9355
9322
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
9356
9323
|
|
|
9324
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
9325
|
+
|
|
9326
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
9327
|
+
|
|
9357
9328
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
9358
9329
|
|
|
9359
9330
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
9360
9331
|
|
|
9361
9332
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
9362
9333
|
|
|
9363
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
|
|
9334
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
9335
|
+
|
|
9336
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
9364
9337
|
|
|
9365
|
-
function
|
|
9338
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
9366
9339
|
|
|
9367
|
-
function
|
|
9340
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
9341
|
+
|
|
9342
|
+
function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
9368
9343
|
|
|
9369
9344
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
9370
9345
|
|
|
@@ -9389,14 +9364,12 @@ function parsePlaylist(url) {
|
|
|
9389
9364
|
return {};
|
|
9390
9365
|
}
|
|
9391
9366
|
|
|
9392
|
-
var YouTube =
|
|
9393
|
-
/*#__PURE__*/
|
|
9394
|
-
function (_Component) {
|
|
9367
|
+
var YouTube = /*#__PURE__*/function (_Component) {
|
|
9395
9368
|
_inherits(YouTube, _Component);
|
|
9396
9369
|
|
|
9397
|
-
|
|
9398
|
-
var _getPrototypeOf2;
|
|
9370
|
+
var _super = _createSuper(YouTube);
|
|
9399
9371
|
|
|
9372
|
+
function YouTube() {
|
|
9400
9373
|
var _this;
|
|
9401
9374
|
|
|
9402
9375
|
_classCallCheck(this, YouTube);
|
|
@@ -9405,7 +9378,7 @@ function (_Component) {
|
|
|
9405
9378
|
args[_key] = arguments[_key];
|
|
9406
9379
|
}
|
|
9407
9380
|
|
|
9408
|
-
_this =
|
|
9381
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
9409
9382
|
|
|
9410
9383
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
9411
9384
|
|
|
@@ -9593,9 +9566,9 @@ function (_Component) {
|
|
|
9593
9566
|
height: '100%',
|
|
9594
9567
|
display: display
|
|
9595
9568
|
};
|
|
9596
|
-
return _react["default"].createElement("div", {
|
|
9569
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
9597
9570
|
style: style
|
|
9598
|
-
}, _react["default"].createElement("div", {
|
|
9571
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
9599
9572
|
ref: this.ref
|
|
9600
9573
|
}));
|
|
9601
9574
|
}
|
|
@@ -9651,12 +9624,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
9651
9624
|
|
|
9652
9625
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
9653
9626
|
|
|
9654
|
-
function
|
|
9627
|
+
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
9655
9628
|
|
|
9656
|
-
function
|
|
9629
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
9657
9630
|
|
|
9658
9631
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
9659
9632
|
|
|
9633
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
9634
|
+
|
|
9635
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
9636
|
+
|
|
9660
9637
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
9661
9638
|
|
|
9662
9639
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -9665,16 +9642,14 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
9665
9642
|
|
|
9666
9643
|
var SDK_URL = 'https://w.soundcloud.com/player/api.js';
|
|
9667
9644
|
var SDK_GLOBAL = 'SC';
|
|
9668
|
-
var MATCH_URL = /(soundcloud\.com|snd\.sc)
|
|
9645
|
+
var MATCH_URL = /(?:soundcloud\.com|snd\.sc)\/[^.]+$/;
|
|
9669
9646
|
|
|
9670
|
-
var SoundCloud =
|
|
9671
|
-
/*#__PURE__*/
|
|
9672
|
-
function (_Component) {
|
|
9647
|
+
var SoundCloud = /*#__PURE__*/function (_Component) {
|
|
9673
9648
|
_inherits(SoundCloud, _Component);
|
|
9674
9649
|
|
|
9675
|
-
|
|
9676
|
-
var _getPrototypeOf2;
|
|
9650
|
+
var _super = _createSuper(SoundCloud);
|
|
9677
9651
|
|
|
9652
|
+
function SoundCloud() {
|
|
9678
9653
|
var _this;
|
|
9679
9654
|
|
|
9680
9655
|
_classCallCheck(this, SoundCloud);
|
|
@@ -9683,7 +9658,7 @@ function (_Component) {
|
|
|
9683
9658
|
args[_key] = arguments[_key];
|
|
9684
9659
|
}
|
|
9685
9660
|
|
|
9686
|
-
_this =
|
|
9661
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
9687
9662
|
|
|
9688
9663
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
9689
9664
|
|
|
@@ -9804,7 +9779,7 @@ function (_Component) {
|
|
|
9804
9779
|
height: '100%',
|
|
9805
9780
|
display: display
|
|
9806
9781
|
};
|
|
9807
|
-
return _react["default"].createElement("iframe", {
|
|
9782
|
+
return /*#__PURE__*/_react["default"].createElement("iframe", {
|
|
9808
9783
|
ref: this.ref,
|
|
9809
9784
|
src: "https://w.soundcloud.com/player/?url=".concat(encodeURIComponent(this.props.url)),
|
|
9810
9785
|
style: style,
|
|
@@ -9866,12 +9841,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
9866
9841
|
|
|
9867
9842
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
9868
9843
|
|
|
9869
|
-
function
|
|
9844
|
+
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
9870
9845
|
|
|
9871
|
-
function
|
|
9846
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
9872
9847
|
|
|
9873
9848
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
9874
9849
|
|
|
9850
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
9851
|
+
|
|
9852
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
9853
|
+
|
|
9875
9854
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
9876
9855
|
|
|
9877
9856
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -9883,14 +9862,12 @@ var SDK_GLOBAL = 'Vimeo';
|
|
|
9883
9862
|
var MATCH_URL = /vimeo\.com\/.+/;
|
|
9884
9863
|
var MATCH_FILE_URL = /vimeo\.com\/external\/[0-9]+\..+/;
|
|
9885
9864
|
|
|
9886
|
-
var Vimeo =
|
|
9887
|
-
/*#__PURE__*/
|
|
9888
|
-
function (_Component) {
|
|
9865
|
+
var Vimeo = /*#__PURE__*/function (_Component) {
|
|
9889
9866
|
_inherits(Vimeo, _Component);
|
|
9890
9867
|
|
|
9891
|
-
|
|
9892
|
-
var _getPrototypeOf2;
|
|
9868
|
+
var _super = _createSuper(Vimeo);
|
|
9893
9869
|
|
|
9870
|
+
function Vimeo() {
|
|
9894
9871
|
var _this;
|
|
9895
9872
|
|
|
9896
9873
|
_classCallCheck(this, Vimeo);
|
|
@@ -9899,7 +9876,7 @@ function (_Component) {
|
|
|
9899
9876
|
args[_key] = arguments[_key];
|
|
9900
9877
|
}
|
|
9901
9878
|
|
|
9902
|
-
_this =
|
|
9879
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
9903
9880
|
|
|
9904
9881
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
9905
9882
|
|
|
@@ -10056,7 +10033,7 @@ function (_Component) {
|
|
|
10056
10033
|
overflow: 'hidden',
|
|
10057
10034
|
display: display
|
|
10058
10035
|
};
|
|
10059
|
-
return _react["default"].createElement("div", {
|
|
10036
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
10060
10037
|
key: this.props.url,
|
|
10061
10038
|
ref: this.ref,
|
|
10062
10039
|
style: style
|
|
@@ -10116,12 +10093,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
10116
10093
|
|
|
10117
10094
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
10118
10095
|
|
|
10119
|
-
function
|
|
10096
|
+
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
10120
10097
|
|
|
10121
|
-
function
|
|
10098
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
10122
10099
|
|
|
10123
10100
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
10124
10101
|
|
|
10102
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
10103
|
+
|
|
10104
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
10105
|
+
|
|
10125
10106
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
10126
10107
|
|
|
10127
10108
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -10134,14 +10115,12 @@ var SDK_GLOBAL_READY = 'fbAsyncInit';
|
|
|
10134
10115
|
var MATCH_URL = /^https?:\/\/(www\.)?facebook\.com.*\/(video(s)?|watch|story)(\.php?|\/).+$/;
|
|
10135
10116
|
var PLAYER_ID_PREFIX = 'facebook-player-';
|
|
10136
10117
|
|
|
10137
|
-
var Facebook =
|
|
10138
|
-
/*#__PURE__*/
|
|
10139
|
-
function (_Component) {
|
|
10118
|
+
var Facebook = /*#__PURE__*/function (_Component) {
|
|
10140
10119
|
_inherits(Facebook, _Component);
|
|
10141
10120
|
|
|
10142
|
-
|
|
10143
|
-
var _getPrototypeOf2;
|
|
10121
|
+
var _super = _createSuper(Facebook);
|
|
10144
10122
|
|
|
10123
|
+
function Facebook() {
|
|
10145
10124
|
var _this;
|
|
10146
10125
|
|
|
10147
10126
|
_classCallCheck(this, Facebook);
|
|
@@ -10150,7 +10129,7 @@ function (_Component) {
|
|
|
10150
10129
|
args[_key] = arguments[_key];
|
|
10151
10130
|
}
|
|
10152
10131
|
|
|
10153
|
-
_this =
|
|
10132
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
10154
10133
|
|
|
10155
10134
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
10156
10135
|
|
|
@@ -10266,7 +10245,7 @@ function (_Component) {
|
|
|
10266
10245
|
width: '100%',
|
|
10267
10246
|
height: '100%'
|
|
10268
10247
|
};
|
|
10269
|
-
return _react["default"].createElement("div", {
|
|
10248
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
10270
10249
|
style: style,
|
|
10271
10250
|
id: this.playerID,
|
|
10272
10251
|
className: "fb-video",
|
|
@@ -10326,12 +10305,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
10326
10305
|
|
|
10327
10306
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
10328
10307
|
|
|
10329
|
-
function
|
|
10308
|
+
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
10330
10309
|
|
|
10331
|
-
function
|
|
10310
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
10332
10311
|
|
|
10333
10312
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
10334
10313
|
|
|
10314
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
10315
|
+
|
|
10316
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
10317
|
+
|
|
10335
10318
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
10336
10319
|
|
|
10337
10320
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -10342,14 +10325,12 @@ var SDK_URL = 'https://cdn.embed.ly/player-0.1.0.min.js';
|
|
|
10342
10325
|
var SDK_GLOBAL = 'playerjs';
|
|
10343
10326
|
var MATCH_URL = /streamable\.com\/([a-z0-9]+)$/;
|
|
10344
10327
|
|
|
10345
|
-
var Streamable =
|
|
10346
|
-
/*#__PURE__*/
|
|
10347
|
-
function (_Component) {
|
|
10328
|
+
var Streamable = /*#__PURE__*/function (_Component) {
|
|
10348
10329
|
_inherits(Streamable, _Component);
|
|
10349
10330
|
|
|
10350
|
-
|
|
10351
|
-
var _getPrototypeOf2;
|
|
10331
|
+
var _super = _createSuper(Streamable);
|
|
10352
10332
|
|
|
10333
|
+
function Streamable() {
|
|
10353
10334
|
var _this;
|
|
10354
10335
|
|
|
10355
10336
|
_classCallCheck(this, Streamable);
|
|
@@ -10358,7 +10339,7 @@ function (_Component) {
|
|
|
10358
10339
|
args[_key] = arguments[_key];
|
|
10359
10340
|
}
|
|
10360
10341
|
|
|
10361
|
-
_this =
|
|
10342
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
10362
10343
|
|
|
10363
10344
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
10364
10345
|
|
|
@@ -10478,7 +10459,7 @@ function (_Component) {
|
|
|
10478
10459
|
width: '100%',
|
|
10479
10460
|
height: '100%'
|
|
10480
10461
|
};
|
|
10481
|
-
return _react["default"].createElement("iframe", {
|
|
10462
|
+
return /*#__PURE__*/_react["default"].createElement("iframe", {
|
|
10482
10463
|
ref: this.ref,
|
|
10483
10464
|
src: "https://streamable.com/o/".concat(id),
|
|
10484
10465
|
frameBorder: "0",
|
|
@@ -10539,12 +10520,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
10539
10520
|
|
|
10540
10521
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
10541
10522
|
|
|
10542
|
-
function
|
|
10523
|
+
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
10543
10524
|
|
|
10544
|
-
function
|
|
10525
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
10545
10526
|
|
|
10546
10527
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
10547
10528
|
|
|
10529
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
10530
|
+
|
|
10531
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
10532
|
+
|
|
10548
10533
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
10549
10534
|
|
|
10550
10535
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -10555,26 +10540,48 @@ var SDK_URL = 'https://fast.wistia.com/assets/external/E-v1.js';
|
|
|
10555
10540
|
var SDK_GLOBAL = 'Wistia';
|
|
10556
10541
|
var MATCH_URL = /(?:wistia\.com|wi\.st)\/(?:medias|embed)\/(.*)$/;
|
|
10557
10542
|
|
|
10558
|
-
var Wistia =
|
|
10559
|
-
/*#__PURE__*/
|
|
10560
|
-
function (_Component) {
|
|
10543
|
+
var Wistia = /*#__PURE__*/function (_Component) {
|
|
10561
10544
|
_inherits(Wistia, _Component);
|
|
10562
10545
|
|
|
10563
|
-
|
|
10564
|
-
var _getPrototypeOf2;
|
|
10546
|
+
var _super = _createSuper(Wistia);
|
|
10565
10547
|
|
|
10548
|
+
function Wistia() {
|
|
10566
10549
|
var _this;
|
|
10567
10550
|
|
|
10568
10551
|
_classCallCheck(this, Wistia);
|
|
10569
10552
|
|
|
10570
|
-
for (var _len = arguments.length,
|
|
10571
|
-
|
|
10553
|
+
for (var _len = arguments.length, _args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
10554
|
+
_args[_key] = arguments[_key];
|
|
10572
10555
|
}
|
|
10573
10556
|
|
|
10574
|
-
_this =
|
|
10557
|
+
_this = _super.call.apply(_super, [this].concat(_args));
|
|
10575
10558
|
|
|
10576
10559
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
10577
10560
|
|
|
10561
|
+
_defineProperty(_assertThisInitialized(_this), "onPlay", function () {
|
|
10562
|
+
var _this$props;
|
|
10563
|
+
|
|
10564
|
+
return (_this$props = _this.props).onPlay.apply(_this$props, arguments);
|
|
10565
|
+
});
|
|
10566
|
+
|
|
10567
|
+
_defineProperty(_assertThisInitialized(_this), "onPause", function () {
|
|
10568
|
+
var _this$props2;
|
|
10569
|
+
|
|
10570
|
+
return (_this$props2 = _this.props).onPause.apply(_this$props2, arguments);
|
|
10571
|
+
});
|
|
10572
|
+
|
|
10573
|
+
_defineProperty(_assertThisInitialized(_this), "onSeek", function () {
|
|
10574
|
+
var _this$props3;
|
|
10575
|
+
|
|
10576
|
+
return (_this$props3 = _this.props).onSeek.apply(_this$props3, arguments);
|
|
10577
|
+
});
|
|
10578
|
+
|
|
10579
|
+
_defineProperty(_assertThisInitialized(_this), "onEnded", function () {
|
|
10580
|
+
var _this$props4;
|
|
10581
|
+
|
|
10582
|
+
return (_this$props4 = _this.props).onEnded.apply(_this$props4, arguments);
|
|
10583
|
+
});
|
|
10584
|
+
|
|
10578
10585
|
_defineProperty(_assertThisInitialized(_this), "mute", function () {
|
|
10579
10586
|
_this.callPlayer('mute');
|
|
10580
10587
|
});
|
|
@@ -10596,17 +10603,13 @@ function (_Component) {
|
|
|
10596
10603
|
value: function load(url) {
|
|
10597
10604
|
var _this2 = this;
|
|
10598
10605
|
|
|
10599
|
-
var _this$
|
|
10600
|
-
playing = _this$
|
|
10601
|
-
muted = _this$
|
|
10602
|
-
controls = _this$
|
|
10603
|
-
_onReady = _this$
|
|
10604
|
-
|
|
10605
|
-
|
|
10606
|
-
onSeek = _this$props.onSeek,
|
|
10607
|
-
onEnded = _this$props.onEnded,
|
|
10608
|
-
config = _this$props.config,
|
|
10609
|
-
onError = _this$props.onError;
|
|
10606
|
+
var _this$props5 = this.props,
|
|
10607
|
+
playing = _this$props5.playing,
|
|
10608
|
+
muted = _this$props5.muted,
|
|
10609
|
+
controls = _this$props5.controls,
|
|
10610
|
+
_onReady = _this$props5.onReady,
|
|
10611
|
+
config = _this$props5.config,
|
|
10612
|
+
onError = _this$props5.onError;
|
|
10610
10613
|
(0, utils.getSDK)(SDK_URL, SDK_GLOBAL).then(function () {
|
|
10611
10614
|
window._wq = window._wq || [];
|
|
10612
10615
|
|
|
@@ -10623,19 +10626,28 @@ function (_Component) {
|
|
|
10623
10626
|
|
|
10624
10627
|
_this2.unbind();
|
|
10625
10628
|
|
|
10626
|
-
_this2.player.bind('play', onPlay);
|
|
10629
|
+
_this2.player.bind('play', _this2.onPlay);
|
|
10627
10630
|
|
|
10628
|
-
_this2.player.bind('pause', onPause);
|
|
10631
|
+
_this2.player.bind('pause', _this2.onPause);
|
|
10629
10632
|
|
|
10630
|
-
_this2.player.bind('seek', onSeek);
|
|
10633
|
+
_this2.player.bind('seek', _this2.onSeek);
|
|
10631
10634
|
|
|
10632
|
-
_this2.player.bind('end', onEnded);
|
|
10635
|
+
_this2.player.bind('end', _this2.onEnded);
|
|
10633
10636
|
|
|
10634
10637
|
_onReady();
|
|
10635
10638
|
}
|
|
10636
10639
|
});
|
|
10637
10640
|
}, onError);
|
|
10638
10641
|
}
|
|
10642
|
+
}, {
|
|
10643
|
+
key: "unbind",
|
|
10644
|
+
value: function unbind() {
|
|
10645
|
+
this.player.unbind('play', this.onPlay);
|
|
10646
|
+
this.player.unbind('pause', this.onPause);
|
|
10647
|
+
this.player.unbind('seek', this.onSeek);
|
|
10648
|
+
this.player.unbind('end', this.onEnded);
|
|
10649
|
+
} // Proxy methods to prevent listener leaks
|
|
10650
|
+
|
|
10639
10651
|
}, {
|
|
10640
10652
|
key: "play",
|
|
10641
10653
|
value: function play() {
|
|
@@ -10646,19 +10658,6 @@ function (_Component) {
|
|
|
10646
10658
|
value: function pause() {
|
|
10647
10659
|
this.callPlayer('pause');
|
|
10648
10660
|
}
|
|
10649
|
-
}, {
|
|
10650
|
-
key: "unbind",
|
|
10651
|
-
value: function unbind() {
|
|
10652
|
-
var _this$props2 = this.props,
|
|
10653
|
-
onPlay = _this$props2.onPlay,
|
|
10654
|
-
onPause = _this$props2.onPause,
|
|
10655
|
-
onSeek = _this$props2.onSeek,
|
|
10656
|
-
onEnded = _this$props2.onEnded;
|
|
10657
|
-
this.player.unbind('play', onPlay);
|
|
10658
|
-
this.player.unbind('pause', onPause);
|
|
10659
|
-
this.player.unbind('seek', onSeek);
|
|
10660
|
-
this.player.unbind('end', onEnded);
|
|
10661
|
-
}
|
|
10662
10661
|
}, {
|
|
10663
10662
|
key: "stop",
|
|
10664
10663
|
value: function stop() {
|
|
@@ -10704,7 +10703,7 @@ function (_Component) {
|
|
|
10704
10703
|
width: '100%',
|
|
10705
10704
|
height: '100%'
|
|
10706
10705
|
};
|
|
10707
|
-
return _react["default"].createElement("div", {
|
|
10706
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
10708
10707
|
key: id,
|
|
10709
10708
|
className: className,
|
|
10710
10709
|
style: style
|
|
@@ -10764,12 +10763,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
10764
10763
|
|
|
10765
10764
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
10766
10765
|
|
|
10767
|
-
function
|
|
10766
|
+
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
10768
10767
|
|
|
10769
|
-
function
|
|
10768
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
10770
10769
|
|
|
10771
10770
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
10772
10771
|
|
|
10772
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
10773
|
+
|
|
10774
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
10775
|
+
|
|
10773
10776
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
10774
10777
|
|
|
10775
10778
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -10782,14 +10785,12 @@ var MATCH_VIDEO_URL = /(?:www\.|go\.)?twitch\.tv\/videos\/(\d+)($|\?)/;
|
|
|
10782
10785
|
var MATCH_CHANNEL_URL = /(?:www\.|go\.)?twitch\.tv\/([a-z0-9_]+)($|\?)/;
|
|
10783
10786
|
var PLAYER_ID_PREFIX = 'twitch-player-';
|
|
10784
10787
|
|
|
10785
|
-
var Twitch =
|
|
10786
|
-
/*#__PURE__*/
|
|
10787
|
-
function (_Component) {
|
|
10788
|
+
var Twitch = /*#__PURE__*/function (_Component) {
|
|
10788
10789
|
_inherits(Twitch, _Component);
|
|
10789
10790
|
|
|
10790
|
-
|
|
10791
|
-
var _getPrototypeOf2;
|
|
10791
|
+
var _super = _createSuper(Twitch);
|
|
10792
10792
|
|
|
10793
|
+
function Twitch() {
|
|
10793
10794
|
var _this;
|
|
10794
10795
|
|
|
10795
10796
|
_classCallCheck(this, Twitch);
|
|
@@ -10798,7 +10799,7 @@ function (_Component) {
|
|
|
10798
10799
|
args[_key] = arguments[_key];
|
|
10799
10800
|
}
|
|
10800
10801
|
|
|
10801
|
-
_this =
|
|
10802
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
10802
10803
|
|
|
10803
10804
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
10804
10805
|
|
|
@@ -10919,7 +10920,7 @@ function (_Component) {
|
|
|
10919
10920
|
width: '100%',
|
|
10920
10921
|
height: '100%'
|
|
10921
10922
|
};
|
|
10922
|
-
return _react["default"].createElement("div", {
|
|
10923
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
10923
10924
|
style: style,
|
|
10924
10925
|
id: this.playerID
|
|
10925
10926
|
});
|
|
@@ -10972,11 +10973,15 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
10972
10973
|
|
|
10973
10974
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
10974
10975
|
|
|
10975
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
|
|
10976
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
10976
10977
|
|
|
10977
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
|
|
10978
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
10978
10979
|
|
|
10979
|
-
function
|
|
10980
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
10981
|
+
|
|
10982
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
10983
|
+
|
|
10984
|
+
function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
10980
10985
|
|
|
10981
10986
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
10982
10987
|
|
|
@@ -10986,12 +10991,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
10986
10991
|
|
|
10987
10992
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
10988
10993
|
|
|
10989
|
-
function
|
|
10994
|
+
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
10990
10995
|
|
|
10991
|
-
function
|
|
10996
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
10992
10997
|
|
|
10993
10998
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
10994
10999
|
|
|
11000
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
11001
|
+
|
|
11002
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
11003
|
+
|
|
10995
11004
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
10996
11005
|
|
|
10997
11006
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -11003,14 +11012,12 @@ var SDK_GLOBAL = 'DM';
|
|
|
11003
11012
|
var SDK_GLOBAL_READY = 'dmAsyncInit';
|
|
11004
11013
|
var MATCH_URL = /^(?:(?:https?):)?(?:\/\/)?(?:www\.)?(?:(?:dailymotion\.com(?:\/embed)?\/video)|dai\.ly)\/([a-zA-Z0-9]+)(?:_[\w_-]+)?$/;
|
|
11005
11014
|
|
|
11006
|
-
var DailyMotion =
|
|
11007
|
-
/*#__PURE__*/
|
|
11008
|
-
function (_Component) {
|
|
11015
|
+
var DailyMotion = /*#__PURE__*/function (_Component) {
|
|
11009
11016
|
_inherits(DailyMotion, _Component);
|
|
11010
11017
|
|
|
11011
|
-
|
|
11012
|
-
var _getPrototypeOf2;
|
|
11018
|
+
var _super = _createSuper(DailyMotion);
|
|
11013
11019
|
|
|
11020
|
+
function DailyMotion() {
|
|
11014
11021
|
var _this;
|
|
11015
11022
|
|
|
11016
11023
|
_classCallCheck(this, DailyMotion);
|
|
@@ -11019,7 +11026,7 @@ function (_Component) {
|
|
|
11019
11026
|
args[_key] = arguments[_key];
|
|
11020
11027
|
}
|
|
11021
11028
|
|
|
11022
|
-
_this =
|
|
11029
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
11023
11030
|
|
|
11024
11031
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
11025
11032
|
|
|
@@ -11148,9 +11155,9 @@ function (_Component) {
|
|
|
11148
11155
|
height: '100%',
|
|
11149
11156
|
display: display
|
|
11150
11157
|
};
|
|
11151
|
-
return _react["default"].createElement("div", {
|
|
11158
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
11152
11159
|
style: style
|
|
11153
|
-
}, _react["default"].createElement("div", {
|
|
11160
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
11154
11161
|
ref: this.ref
|
|
11155
11162
|
}));
|
|
11156
11163
|
}
|
|
@@ -11208,12 +11215,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
11208
11215
|
|
|
11209
11216
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
11210
11217
|
|
|
11211
|
-
function
|
|
11218
|
+
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
11212
11219
|
|
|
11213
|
-
function
|
|
11220
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
11214
11221
|
|
|
11215
11222
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
11216
11223
|
|
|
11224
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
11225
|
+
|
|
11226
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
11227
|
+
|
|
11217
11228
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
11218
11229
|
|
|
11219
11230
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -11224,14 +11235,12 @@ var SDK_URL = 'https://widget.mixcloud.com/media/js/widgetApi.js';
|
|
|
11224
11235
|
var SDK_GLOBAL = 'Mixcloud';
|
|
11225
11236
|
var MATCH_URL = /mixcloud\.com\/([^/]+\/[^/]+)/;
|
|
11226
11237
|
|
|
11227
|
-
var Mixcloud =
|
|
11228
|
-
/*#__PURE__*/
|
|
11229
|
-
function (_Component) {
|
|
11238
|
+
var Mixcloud = /*#__PURE__*/function (_Component) {
|
|
11230
11239
|
_inherits(Mixcloud, _Component);
|
|
11231
11240
|
|
|
11232
|
-
|
|
11233
|
-
var _getPrototypeOf2;
|
|
11241
|
+
var _super = _createSuper(Mixcloud);
|
|
11234
11242
|
|
|
11243
|
+
function Mixcloud() {
|
|
11235
11244
|
var _this;
|
|
11236
11245
|
|
|
11237
11246
|
_classCallCheck(this, Mixcloud);
|
|
@@ -11240,7 +11249,7 @@ function (_Component) {
|
|
|
11240
11249
|
args[_key] = arguments[_key];
|
|
11241
11250
|
}
|
|
11242
11251
|
|
|
11243
|
-
_this =
|
|
11252
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
11244
11253
|
|
|
11245
11254
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
11246
11255
|
|
|
@@ -11343,7 +11352,7 @@ function (_Component) {
|
|
|
11343
11352
|
})); // We have to give the iframe a key here to prevent a
|
|
11344
11353
|
// weird dialog appearing when loading a new track
|
|
11345
11354
|
|
|
11346
|
-
return _react["default"].createElement("iframe", {
|
|
11355
|
+
return /*#__PURE__*/_react["default"].createElement("iframe", {
|
|
11347
11356
|
key: id,
|
|
11348
11357
|
ref: this.ref,
|
|
11349
11358
|
style: style,
|
|
@@ -11403,23 +11412,33 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
11403
11412
|
|
|
11404
11413
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
11405
11414
|
|
|
11406
|
-
function
|
|
11415
|
+
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
11407
11416
|
|
|
11408
|
-
function
|
|
11417
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
11409
11418
|
|
|
11410
11419
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
11411
11420
|
|
|
11421
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
11422
|
+
|
|
11423
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
11424
|
+
|
|
11412
11425
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
11413
11426
|
|
|
11414
11427
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
11415
11428
|
|
|
11416
11429
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
11417
11430
|
|
|
11431
|
+
function _createForOfIteratorHelper(o) { if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (o = _unsupportedIterableToArray(o))) { var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var it, normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
11432
|
+
|
|
11433
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
11434
|
+
|
|
11435
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
11436
|
+
|
|
11418
11437
|
var IOS = typeof navigator !== 'undefined' && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
|
|
11419
11438
|
var AUDIO_EXTENSIONS = /\.(m4a|mp4a|mpga|mp2|mp2a|mp3|m2a|m3a|wav|weba|aac|oga|spx)($|\?)/i;
|
|
11420
11439
|
var VIDEO_EXTENSIONS = /\.(mp4|og[gv]|webm|mov|m4v)($|\?)/i;
|
|
11421
11440
|
var HLS_EXTENSIONS = /\.(m3u8)($|\?)/i;
|
|
11422
|
-
var HLS_SDK_URL = 'https://cdn.jsdelivr.net/npm/hls.js@VERSION';
|
|
11441
|
+
var HLS_SDK_URL = 'https://cdn.jsdelivr.net/npm/hls.js@VERSION/dist/hls.min.js';
|
|
11423
11442
|
var HLS_GLOBAL = 'Hls';
|
|
11424
11443
|
var DASH_EXTENSIONS = /\.(mpd)($|\?)/i;
|
|
11425
11444
|
var DASH_SDK_URL = 'https://cdnjs.cloudflare.com/ajax/libs/dashjs/VERSION/dash.all.min.js';
|
|
@@ -11428,12 +11447,11 @@ var MATCH_DROPBOX_URL = /www\.dropbox\.com\/.+/;
|
|
|
11428
11447
|
|
|
11429
11448
|
function canPlay(url) {
|
|
11430
11449
|
if (url instanceof Array) {
|
|
11431
|
-
var
|
|
11432
|
-
|
|
11433
|
-
var _iteratorError = undefined;
|
|
11450
|
+
var _iterator = _createForOfIteratorHelper(url),
|
|
11451
|
+
_step;
|
|
11434
11452
|
|
|
11435
11453
|
try {
|
|
11436
|
-
for (
|
|
11454
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
11437
11455
|
var item = _step.value;
|
|
11438
11456
|
|
|
11439
11457
|
if (typeof item === 'string' && canPlay(item)) {
|
|
@@ -11445,18 +11463,9 @@ function canPlay(url) {
|
|
|
11445
11463
|
}
|
|
11446
11464
|
}
|
|
11447
11465
|
} catch (err) {
|
|
11448
|
-
|
|
11449
|
-
_iteratorError = err;
|
|
11466
|
+
_iterator.e(err);
|
|
11450
11467
|
} finally {
|
|
11451
|
-
|
|
11452
|
-
if (!_iteratorNormalCompletion && _iterator["return"] != null) {
|
|
11453
|
-
_iterator["return"]();
|
|
11454
|
-
}
|
|
11455
|
-
} finally {
|
|
11456
|
-
if (_didIteratorError) {
|
|
11457
|
-
throw _iteratorError;
|
|
11458
|
-
}
|
|
11459
|
-
}
|
|
11468
|
+
_iterator.f();
|
|
11460
11469
|
}
|
|
11461
11470
|
|
|
11462
11471
|
return false;
|
|
@@ -11480,14 +11489,12 @@ function canEnablePIP(url) {
|
|
|
11480
11489
|
return canPlay(url) && (!!document.pictureInPictureEnabled || supportsWebKitPresentationMode()) && !AUDIO_EXTENSIONS.test(url);
|
|
11481
11490
|
}
|
|
11482
11491
|
|
|
11483
|
-
var FilePlayer =
|
|
11484
|
-
/*#__PURE__*/
|
|
11485
|
-
function (_Component) {
|
|
11492
|
+
var FilePlayer = /*#__PURE__*/function (_Component) {
|
|
11486
11493
|
_inherits(FilePlayer, _Component);
|
|
11487
11494
|
|
|
11488
|
-
|
|
11489
|
-
var _getPrototypeOf2;
|
|
11495
|
+
var _super = _createSuper(FilePlayer);
|
|
11490
11496
|
|
|
11497
|
+
function FilePlayer() {
|
|
11491
11498
|
var _this;
|
|
11492
11499
|
|
|
11493
11500
|
_classCallCheck(this, FilePlayer);
|
|
@@ -11496,7 +11503,7 @@ function (_Component) {
|
|
|
11496
11503
|
_args[_key] = arguments[_key];
|
|
11497
11504
|
}
|
|
11498
11505
|
|
|
11499
|
-
_this =
|
|
11506
|
+
_this = _super.call.apply(_super, [this].concat(_args));
|
|
11500
11507
|
|
|
11501
11508
|
_defineProperty(_assertThisInitialized(_this), "onReady", function () {
|
|
11502
11509
|
var _this$props;
|
|
@@ -11583,19 +11590,19 @@ function (_Component) {
|
|
|
11583
11590
|
|
|
11584
11591
|
_defineProperty(_assertThisInitialized(_this), "renderSourceElement", function (source, index) {
|
|
11585
11592
|
if (typeof source === 'string') {
|
|
11586
|
-
return _react["default"].createElement("source", {
|
|
11593
|
+
return /*#__PURE__*/_react["default"].createElement("source", {
|
|
11587
11594
|
key: index,
|
|
11588
11595
|
src: source
|
|
11589
11596
|
});
|
|
11590
11597
|
}
|
|
11591
11598
|
|
|
11592
|
-
return _react["default"].createElement("source", _extends({
|
|
11599
|
+
return /*#__PURE__*/_react["default"].createElement("source", _extends({
|
|
11593
11600
|
key: index
|
|
11594
11601
|
}, source));
|
|
11595
11602
|
});
|
|
11596
11603
|
|
|
11597
11604
|
_defineProperty(_assertThisInitialized(_this), "renderTrack", function (track, index) {
|
|
11598
|
-
return _react["default"].createElement("track", _extends({
|
|
11605
|
+
return /*#__PURE__*/_react["default"].createElement("track", _extends({
|
|
11599
11606
|
key: index
|
|
11600
11607
|
}, track));
|
|
11601
11608
|
});
|
|
@@ -11633,6 +11640,10 @@ function (_Component) {
|
|
|
11633
11640
|
key: "componentWillUnmount",
|
|
11634
11641
|
value: function componentWillUnmount() {
|
|
11635
11642
|
this.removeListeners(this.player);
|
|
11643
|
+
|
|
11644
|
+
if (this.hls) {
|
|
11645
|
+
this.hls.destroy();
|
|
11646
|
+
}
|
|
11636
11647
|
}
|
|
11637
11648
|
}, {
|
|
11638
11649
|
key: "addListeners",
|
|
@@ -11763,10 +11774,6 @@ function (_Component) {
|
|
|
11763
11774
|
value: function stop() {
|
|
11764
11775
|
this.player.removeAttribute('src');
|
|
11765
11776
|
|
|
11766
|
-
if (this.hls) {
|
|
11767
|
-
this.hls.destroy();
|
|
11768
|
-
}
|
|
11769
|
-
|
|
11770
11777
|
if (this.dash) {
|
|
11771
11778
|
this.dash.reset();
|
|
11772
11779
|
}
|
|
@@ -11878,7 +11885,7 @@ function (_Component) {
|
|
|
11878
11885
|
width: width === 'auto' ? width : '100%',
|
|
11879
11886
|
height: height === 'auto' ? height : '100%'
|
|
11880
11887
|
};
|
|
11881
|
-
return _react["default"].createElement(Element, _extends({
|
|
11888
|
+
return /*#__PURE__*/_react["default"].createElement(Element, _extends({
|
|
11882
11889
|
ref: this.ref,
|
|
11883
11890
|
src: this.getSource(url),
|
|
11884
11891
|
style: style,
|
|
@@ -11968,12 +11975,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
11968
11975
|
|
|
11969
11976
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
11970
11977
|
|
|
11971
|
-
function
|
|
11978
|
+
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
11972
11979
|
|
|
11973
|
-
function
|
|
11980
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
11974
11981
|
|
|
11975
11982
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
11976
11983
|
|
|
11984
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
11985
|
+
|
|
11986
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
11987
|
+
|
|
11977
11988
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
11978
11989
|
|
|
11979
11990
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -11982,14 +11993,12 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
11982
11993
|
|
|
11983
11994
|
var ICON_SIZE = '64px';
|
|
11984
11995
|
|
|
11985
|
-
var Preview =
|
|
11986
|
-
/*#__PURE__*/
|
|
11987
|
-
function (_Component) {
|
|
11996
|
+
var Preview = /*#__PURE__*/function (_Component) {
|
|
11988
11997
|
_inherits(Preview, _Component);
|
|
11989
11998
|
|
|
11990
|
-
|
|
11991
|
-
var _getPrototypeOf2;
|
|
11999
|
+
var _super = _createSuper(Preview);
|
|
11992
12000
|
|
|
12001
|
+
function Preview() {
|
|
11993
12002
|
var _this;
|
|
11994
12003
|
|
|
11995
12004
|
_classCallCheck(this, Preview);
|
|
@@ -11998,7 +12007,7 @@ function (_Component) {
|
|
|
11998
12007
|
args[_key] = arguments[_key];
|
|
11999
12008
|
}
|
|
12000
12009
|
|
|
12001
|
-
_this =
|
|
12010
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
12002
12011
|
|
|
12003
12012
|
_defineProperty(_assertThisInitialized(_this), "mounted", false);
|
|
12004
12013
|
|
|
@@ -12096,15 +12105,15 @@ function (_Component) {
|
|
|
12096
12105
|
}
|
|
12097
12106
|
};
|
|
12098
12107
|
|
|
12099
|
-
var defaultPlayIcon = _react["default"].createElement("div", {
|
|
12108
|
+
var defaultPlayIcon = /*#__PURE__*/_react["default"].createElement("div", {
|
|
12100
12109
|
style: styles.shadow,
|
|
12101
12110
|
className: "react-player__shadow"
|
|
12102
|
-
}, _react["default"].createElement("div", {
|
|
12111
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
12103
12112
|
style: styles.playIcon,
|
|
12104
12113
|
className: "react-player__play-icon"
|
|
12105
12114
|
}));
|
|
12106
12115
|
|
|
12107
|
-
return _react["default"].createElement("div", {
|
|
12116
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
12108
12117
|
style: styles.preview,
|
|
12109
12118
|
className: "react-player__preview",
|
|
12110
12119
|
onClick: onClick
|
|
@@ -12141,6 +12150,12 @@ var _Player = _interopRequireDefault(Player_1);
|
|
|
12141
12150
|
|
|
12142
12151
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
12143
12152
|
|
|
12153
|
+
function _createForOfIteratorHelper(o) { if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (o = _unsupportedIterableToArray(o))) { var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var it, normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
12154
|
+
|
|
12155
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
12156
|
+
|
|
12157
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
12158
|
+
|
|
12144
12159
|
var PRELOAD_PLAYERS = [{
|
|
12145
12160
|
Player: YouTube_1.YouTube,
|
|
12146
12161
|
configKey: 'youtube',
|
|
@@ -12161,16 +12176,16 @@ var PRELOAD_PLAYERS = [{
|
|
|
12161
12176
|
|
|
12162
12177
|
function renderPreloadPlayers(url, controls, config) {
|
|
12163
12178
|
var players = [];
|
|
12164
|
-
|
|
12165
|
-
var
|
|
12166
|
-
|
|
12179
|
+
|
|
12180
|
+
var _iterator = _createForOfIteratorHelper(PRELOAD_PLAYERS),
|
|
12181
|
+
_step;
|
|
12167
12182
|
|
|
12168
12183
|
try {
|
|
12169
|
-
for (
|
|
12184
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
12170
12185
|
var player = _step.value;
|
|
12171
12186
|
|
|
12172
12187
|
if (!player.Player.canPlay(url) && config[player.configKey].preload) {
|
|
12173
|
-
players.push(_react["default"].createElement(_Player["default"], {
|
|
12188
|
+
players.push( /*#__PURE__*/_react["default"].createElement(_Player["default"], {
|
|
12174
12189
|
key: player.Player.displayName,
|
|
12175
12190
|
activePlayer: player.Player,
|
|
12176
12191
|
url: player.url,
|
|
@@ -12182,18 +12197,9 @@ function renderPreloadPlayers(url, controls, config) {
|
|
|
12182
12197
|
}
|
|
12183
12198
|
}
|
|
12184
12199
|
} catch (err) {
|
|
12185
|
-
|
|
12186
|
-
_iteratorError = err;
|
|
12200
|
+
_iterator.e(err);
|
|
12187
12201
|
} finally {
|
|
12188
|
-
|
|
12189
|
-
if (!_iteratorNormalCompletion && _iterator["return"] != null) {
|
|
12190
|
-
_iterator["return"]();
|
|
12191
|
-
}
|
|
12192
|
-
} finally {
|
|
12193
|
-
if (_didIteratorError) {
|
|
12194
|
-
throw _iteratorError;
|
|
12195
|
-
}
|
|
12196
|
-
}
|
|
12202
|
+
_iterator.f();
|
|
12197
12203
|
}
|
|
12198
12204
|
|
|
12199
12205
|
return players;
|
|
@@ -12317,13 +12323,17 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
12317
12323
|
|
|
12318
12324
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
12319
12325
|
|
|
12320
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }
|
|
12326
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
12327
|
+
|
|
12328
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
12321
12329
|
|
|
12322
|
-
function
|
|
12330
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
12323
12331
|
|
|
12324
|
-
function _iterableToArray(iter) { if (Symbol.iterator in Object(iter)
|
|
12332
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
|
|
12325
12333
|
|
|
12326
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr))
|
|
12334
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
12335
|
+
|
|
12336
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
12327
12337
|
|
|
12328
12338
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
12329
12339
|
|
|
@@ -12331,12 +12341,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
12331
12341
|
|
|
12332
12342
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
12333
12343
|
|
|
12334
|
-
function
|
|
12344
|
+
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
12335
12345
|
|
|
12336
|
-
function
|
|
12346
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
12337
12347
|
|
|
12338
12348
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
12339
12349
|
|
|
12350
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
12351
|
+
|
|
12352
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
12353
|
+
|
|
12340
12354
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
12341
12355
|
|
|
12342
12356
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -12346,14 +12360,12 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
12346
12360
|
var SUPPORTED_PROPS = Object.keys(props.propTypes);
|
|
12347
12361
|
var customPlayers = [];
|
|
12348
12362
|
|
|
12349
|
-
var ReactPlayer =
|
|
12350
|
-
/*#__PURE__*/
|
|
12351
|
-
function (_Component) {
|
|
12363
|
+
var ReactPlayer = /*#__PURE__*/function (_Component) {
|
|
12352
12364
|
_inherits(ReactPlayer, _Component);
|
|
12353
12365
|
|
|
12354
|
-
|
|
12355
|
-
var _getPrototypeOf2;
|
|
12366
|
+
var _super = _createSuper(ReactPlayer);
|
|
12356
12367
|
|
|
12368
|
+
function ReactPlayer() {
|
|
12357
12369
|
var _this;
|
|
12358
12370
|
|
|
12359
12371
|
_classCallCheck(this, ReactPlayer);
|
|
@@ -12362,7 +12374,7 @@ function (_Component) {
|
|
|
12362
12374
|
args[_key] = arguments[_key];
|
|
12363
12375
|
}
|
|
12364
12376
|
|
|
12365
|
-
_this =
|
|
12377
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
12366
12378
|
|
|
12367
12379
|
_defineProperty(_assertThisInitialized(_this), "config", (0, utils.getConfig)(_this.props, props.defaultProps, true));
|
|
12368
12380
|
|
|
@@ -12473,7 +12485,7 @@ function (_Component) {
|
|
|
12473
12485
|
key: "renderActivePlayer",
|
|
12474
12486
|
value: function renderActivePlayer(url, activePlayer) {
|
|
12475
12487
|
if (!url) return null;
|
|
12476
|
-
return _react["default"].createElement(_Player4["default"], _extends({}, this.props, {
|
|
12488
|
+
return /*#__PURE__*/_react["default"].createElement(_Player4["default"], _extends({}, this.props, {
|
|
12477
12489
|
key: activePlayer.displayName,
|
|
12478
12490
|
ref: this.activePlayerRef,
|
|
12479
12491
|
config: this.config,
|
|
@@ -12510,14 +12522,14 @@ function (_Component) {
|
|
|
12510
12522
|
var preloadPlayers = (0, _preload["default"])(url, controls, this.config);
|
|
12511
12523
|
var players = [renderedActivePlayer].concat(_toConsumableArray(preloadPlayers)).sort(this.sortPlayers);
|
|
12512
12524
|
|
|
12513
|
-
var preview = _react["default"].createElement(_Preview["default"], {
|
|
12525
|
+
var preview = /*#__PURE__*/_react["default"].createElement(_Preview["default"], {
|
|
12514
12526
|
url: url,
|
|
12515
12527
|
light: light,
|
|
12516
12528
|
playIcon: playIcon,
|
|
12517
12529
|
onClick: this.handleClickPreview
|
|
12518
12530
|
});
|
|
12519
12531
|
|
|
12520
|
-
return _react["default"].createElement(Wrapper, _extends({
|
|
12532
|
+
return /*#__PURE__*/_react["default"].createElement(Wrapper, _extends({
|
|
12521
12533
|
ref: this.wrapperRef,
|
|
12522
12534
|
style: _objectSpread({}, style, {
|
|
12523
12535
|
width: width,
|
|
@@ -12614,27 +12626,50 @@ var YouTubeGallery = function YouTubeGallery(_ref) {
|
|
|
12614
12626
|
}
|
|
12615
12627
|
|
|
12616
12628
|
var router = Router.useRouter();
|
|
12617
|
-
//state
|
|
12618
12629
|
|
|
12619
|
-
var _useState = React.useState(
|
|
12630
|
+
var _useState = React.useState(false),
|
|
12620
12631
|
_useState2 = slicedToArray._slicedToArray(_useState, 2),
|
|
12621
|
-
|
|
12622
|
-
|
|
12632
|
+
playReported = _useState2[0],
|
|
12633
|
+
setPlayReported = _useState2[1];
|
|
12623
12634
|
|
|
12624
|
-
var _useState3 = React.useState(
|
|
12635
|
+
var _useState3 = React.useState(false),
|
|
12625
12636
|
_useState4 = slicedToArray._slicedToArray(_useState3, 2),
|
|
12626
|
-
|
|
12627
|
-
|
|
12637
|
+
endReported = _useState4[0],
|
|
12638
|
+
setEndReported = _useState4[1];
|
|
12628
12639
|
|
|
12629
|
-
var _useState5 = React.useState(
|
|
12640
|
+
var _useState5 = React.useState(null),
|
|
12630
12641
|
_useState6 = slicedToArray._slicedToArray(_useState5, 2),
|
|
12631
|
-
|
|
12632
|
-
|
|
12642
|
+
intervalID = _useState6[0],
|
|
12643
|
+
setIntervalID = _useState6[1];
|
|
12633
12644
|
|
|
12634
|
-
var _useState7 = React.useState(
|
|
12645
|
+
var _useState7 = React.useState(null),
|
|
12635
12646
|
_useState8 = slicedToArray._slicedToArray(_useState7, 2),
|
|
12636
|
-
|
|
12637
|
-
|
|
12647
|
+
segmentData = _useState8[0],
|
|
12648
|
+
setSegemntData = _useState8[1];
|
|
12649
|
+
|
|
12650
|
+
var queueProgress = [];
|
|
12651
|
+
|
|
12652
|
+
//state
|
|
12653
|
+
|
|
12654
|
+
var _useState9 = React.useState(''),
|
|
12655
|
+
_useState10 = slicedToArray._slicedToArray(_useState9, 2),
|
|
12656
|
+
vidUrl = _useState10[0],
|
|
12657
|
+
setVidUrl = _useState10[1];
|
|
12658
|
+
|
|
12659
|
+
var _useState11 = React.useState('youtube'),
|
|
12660
|
+
_useState12 = slicedToArray._slicedToArray(_useState11, 2),
|
|
12661
|
+
vidType = _useState12[0],
|
|
12662
|
+
setVidType = _useState12[1];
|
|
12663
|
+
|
|
12664
|
+
var _useState13 = React.useState(''),
|
|
12665
|
+
_useState14 = slicedToArray._slicedToArray(_useState13, 2),
|
|
12666
|
+
series = _useState14[0],
|
|
12667
|
+
setSeries = _useState14[1];
|
|
12668
|
+
|
|
12669
|
+
var _useState15 = React.useState([]),
|
|
12670
|
+
_useState16 = slicedToArray._slicedToArray(_useState15, 2),
|
|
12671
|
+
seriesData = _useState16[0],
|
|
12672
|
+
setData = _useState16[1];
|
|
12638
12673
|
//variables
|
|
12639
12674
|
|
|
12640
12675
|
|
|
@@ -12650,7 +12685,11 @@ var YouTubeGallery = function YouTubeGallery(_ref) {
|
|
|
12650
12685
|
if (vid.type == 'mp4') {
|
|
12651
12686
|
data.push({ title: vid.title, thumbnail: urlFor(vid.thumbnail.asset), url: vid.url });
|
|
12652
12687
|
} else {
|
|
12653
|
-
|
|
12688
|
+
if (vid.thumbnail && vid.thumbnail.asset) {
|
|
12689
|
+
data.push({ title: vid.title, thumbnail: urlFor(vid.thumbnail.asset), url: vid.url });
|
|
12690
|
+
} else {
|
|
12691
|
+
data.push({ title: vid.title, thumbnail: 'https://img.youtube.com/vi/' + YoutubeGroup.getYoutubeId(vid.url) + '/hqdefault.jpg', url: vid.url });
|
|
12692
|
+
}
|
|
12654
12693
|
}
|
|
12655
12694
|
});
|
|
12656
12695
|
// if series number doesn't exist, route back to first vid of series
|
|
@@ -12675,6 +12714,13 @@ var YouTubeGallery = function YouTubeGallery(_ref) {
|
|
|
12675
12714
|
setData(data);
|
|
12676
12715
|
}, []);
|
|
12677
12716
|
|
|
12717
|
+
React.useEffect(function () {
|
|
12718
|
+
if (segmentData) {
|
|
12719
|
+
console.log('Video Segment', segmentData);
|
|
12720
|
+
AdSlot.Beam.report_beam_video('Segment', main.main_16, segmentData.duration, segmentData.current, segmentData.segment);
|
|
12721
|
+
}
|
|
12722
|
+
}, [segmentData]);
|
|
12723
|
+
|
|
12678
12724
|
function toggleSeries() {
|
|
12679
12725
|
var series = document.querySelector('.vid-series');
|
|
12680
12726
|
if (series.classList.contains('active')) {
|
|
@@ -12684,6 +12730,7 @@ var YouTubeGallery = function YouTubeGallery(_ref) {
|
|
|
12684
12730
|
}
|
|
12685
12731
|
series.classList.toggle('active');
|
|
12686
12732
|
}
|
|
12733
|
+
|
|
12687
12734
|
// This function is passed to the GroupDeck to change the youtube iframe src
|
|
12688
12735
|
function setState(url, vidIndex) {
|
|
12689
12736
|
setVidUrl(url);
|
|
@@ -12697,6 +12744,19 @@ var YouTubeGallery = function YouTubeGallery(_ref) {
|
|
|
12697
12744
|
|
|
12698
12745
|
// Handle video end
|
|
12699
12746
|
function handleOnEnd(e) {
|
|
12747
|
+
if (!endReported) {
|
|
12748
|
+
console.log('Video End', e);
|
|
12749
|
+
var player = e.target;
|
|
12750
|
+
var current = player.getCurrentTime();
|
|
12751
|
+
var duration = player.getDuration();
|
|
12752
|
+
var queue = Math.floor(duration / 10);
|
|
12753
|
+
var segment = Math.floor(current / queue);
|
|
12754
|
+
|
|
12755
|
+
AdSlot.Beam.report_beam_video('End', main.main_16, duration, current, segment);
|
|
12756
|
+
setEndReported(true);
|
|
12757
|
+
clearInterval(intervalID);
|
|
12758
|
+
}
|
|
12759
|
+
|
|
12700
12760
|
var currentVid = void 0;
|
|
12701
12761
|
var nextVid = void 0;
|
|
12702
12762
|
//Find index of video currently playing
|
|
@@ -12726,6 +12786,55 @@ var YouTubeGallery = function YouTubeGallery(_ref) {
|
|
|
12726
12786
|
toggleSeries();
|
|
12727
12787
|
}, 1000);
|
|
12728
12788
|
}
|
|
12789
|
+
|
|
12790
|
+
var handlePlayPercent = function handlePlayPercent(player) {
|
|
12791
|
+
var current = player.getCurrentTime();
|
|
12792
|
+
var duration = player.getDuration();
|
|
12793
|
+
var queue = Math.floor(duration / 10);
|
|
12794
|
+
var segment = Math.floor(current / queue);
|
|
12795
|
+
|
|
12796
|
+
if (!queueProgress.includes(segment)) {
|
|
12797
|
+
setSegemntData({
|
|
12798
|
+
current: current,
|
|
12799
|
+
duration: duration,
|
|
12800
|
+
queue: queue,
|
|
12801
|
+
segment: segment
|
|
12802
|
+
});
|
|
12803
|
+
queueProgress.push(segment);
|
|
12804
|
+
}
|
|
12805
|
+
};
|
|
12806
|
+
|
|
12807
|
+
var handleOnPlay = function handleOnPlay(event) {
|
|
12808
|
+
// report play
|
|
12809
|
+
if (!playReported) {
|
|
12810
|
+
console.log('Video Play', event);
|
|
12811
|
+
|
|
12812
|
+
var player = event.target;
|
|
12813
|
+
var current = player.getCurrentTime();
|
|
12814
|
+
var duration = player.getDuration();
|
|
12815
|
+
var queue = Math.floor(duration / 10);
|
|
12816
|
+
var segment = Math.floor(current / queue);
|
|
12817
|
+
|
|
12818
|
+
AdSlot.Beam.report_beam_video('Play', main.main_16, duration, current, segment);
|
|
12819
|
+
setPlayReported(true);
|
|
12820
|
+
var _intervalID = setInterval(function () {
|
|
12821
|
+
handlePlayPercent(event.target);
|
|
12822
|
+
}, 1000);
|
|
12823
|
+
setIntervalID(_intervalID);
|
|
12824
|
+
}
|
|
12825
|
+
};
|
|
12826
|
+
|
|
12827
|
+
var handleOnPause = function handleOnPause(event) {
|
|
12828
|
+
console.log('Video Pause');
|
|
12829
|
+
var player = event.target;
|
|
12830
|
+
var current = player.getCurrentTime();
|
|
12831
|
+
var duration = player.getDuration();
|
|
12832
|
+
var queue = Math.floor(duration / 10);
|
|
12833
|
+
var segment = Math.floor(current / queue);
|
|
12834
|
+
|
|
12835
|
+
AdSlot.Beam.report_beam_video('Pause', main.main_16, duration, current, segment);
|
|
12836
|
+
};
|
|
12837
|
+
|
|
12729
12838
|
// Youtube Options
|
|
12730
12839
|
var opts = {
|
|
12731
12840
|
width: '100%',
|
|
@@ -12740,7 +12849,7 @@ var YouTubeGallery = function YouTubeGallery(_ref) {
|
|
|
12740
12849
|
React__default.createElement(
|
|
12741
12850
|
'div',
|
|
12742
12851
|
{ className: 'video-block', style: { position: 'relative', overflow: 'hidden' } },
|
|
12743
|
-
vidUrl && vidType == 'youtube' ? React__default.createElement(YouTube, { videoId: YoutubeGroup.getYoutubeId(vidUrl), opts: opts, onEnd: function onEnd(e) {
|
|
12852
|
+
vidUrl && vidType == 'youtube' ? React__default.createElement(YouTube, { videoId: YoutubeGroup.getYoutubeId(vidUrl), opts: opts, onPlay: handleOnPlay, onPause: handleOnPause, onEnd: function onEnd(e) {
|
|
12744
12853
|
return handleOnEnd(e);
|
|
12745
12854
|
} }) : React__default.createElement(
|
|
12746
12855
|
'video',
|
|
@@ -13738,16 +13847,16 @@ var RelatedTopicsDropdown = function RelatedTopicsDropdown(_ref) {
|
|
|
13738
13847
|
_ref$className = _ref.className,
|
|
13739
13848
|
className = _ref$className === undefined ? '' : _ref$className;
|
|
13740
13849
|
|
|
13741
|
-
/*
|
|
13742
|
-
Props accepted - parentTaxonomy(required, object), subTaxonomy(required, array), page(optional), exclude(optional), variant(optional), className(optional)
|
|
13743
|
-
example:
|
|
13744
|
-
<RelatedTopicDropdown
|
|
13745
|
-
page='/clinical'
|
|
13746
|
-
exclude="clinical"
|
|
13747
|
-
className='mb-3'
|
|
13748
|
-
parentTaxonomy={props.parentTaxonomy}
|
|
13749
|
-
subTaxonomies={props.subTaxonomies}
|
|
13750
|
-
/>
|
|
13850
|
+
/*
|
|
13851
|
+
Props accepted - parentTaxonomy(required, object), subTaxonomy(required, array), page(optional), exclude(optional), variant(optional), className(optional)
|
|
13852
|
+
example:
|
|
13853
|
+
<RelatedTopicDropdown
|
|
13854
|
+
page='/clinical'
|
|
13855
|
+
exclude="clinical"
|
|
13856
|
+
className='mb-3'
|
|
13857
|
+
parentTaxonomy={props.parentTaxonomy}
|
|
13858
|
+
subTaxonomies={props.subTaxonomies}
|
|
13859
|
+
/>
|
|
13751
13860
|
*/
|
|
13752
13861
|
if (subTaxonomies.length === 0 && parentTaxonomy) {
|
|
13753
13862
|
if (parentTaxonomy.identifier == exclude) {
|
|
@@ -13785,19 +13894,19 @@ var RelatedTopicsDropdown = function RelatedTopicsDropdown(_ref) {
|
|
|
13785
13894
|
}
|
|
13786
13895
|
};
|
|
13787
13896
|
|
|
13788
|
-
/*
|
|
13789
|
-
This dropdown is used inside Article body to display related content placement pages
|
|
13790
|
-
sample usage: <ArticleDetailDropdown contentPlacement={content_placement} exclude={['News',]} />
|
|
13791
|
-
|
|
13792
|
-
in article query, need to add '...' to content_placement to retreive additional info needed
|
|
13793
|
-
|
|
13794
|
-
'content_placement': taxonomyMapping[]-> {
|
|
13795
|
-
...,
|
|
13796
|
-
'ancestor': parent->parent->identifier,
|
|
13797
|
-
'parent': parent->identifier,
|
|
13798
|
-
'path': identifier
|
|
13799
|
-
}
|
|
13800
|
-
|
|
13897
|
+
/*
|
|
13898
|
+
This dropdown is used inside Article body to display related content placement pages
|
|
13899
|
+
sample usage: <ArticleDetailDropdown contentPlacement={content_placement} exclude={['News',]} />
|
|
13900
|
+
|
|
13901
|
+
in article query, need to add '...' to content_placement to retreive additional info needed
|
|
13902
|
+
|
|
13903
|
+
'content_placement': taxonomyMapping[]-> {
|
|
13904
|
+
...,
|
|
13905
|
+
'ancestor': parent->parent->identifier,
|
|
13906
|
+
'parent': parent->identifier,
|
|
13907
|
+
'path': identifier
|
|
13908
|
+
}
|
|
13909
|
+
|
|
13801
13910
|
*/
|
|
13802
13911
|
|
|
13803
13912
|
var ArticleDetailDropdown = function ArticleDetailDropdown(props) {
|
|
@@ -14630,34 +14739,34 @@ var GridHero = function GridHero(props) {
|
|
|
14630
14739
|
);
|
|
14631
14740
|
};
|
|
14632
14741
|
|
|
14633
|
-
/*
|
|
14634
|
-
Sample query
|
|
14635
|
-
let references = ''
|
|
14636
|
-
if(article.taxonomyMapping.length > 0){
|
|
14637
|
-
article.taxonomyMapping.forEach((ref, index) => {
|
|
14638
|
-
references = references + `references('${ref._ref}') `
|
|
14639
|
-
if(index+1 !== article.taxonomyMapping.length){
|
|
14640
|
-
references = references + ` && `
|
|
14641
|
-
}
|
|
14642
|
-
})
|
|
14643
|
-
}
|
|
14644
|
-
|
|
14645
|
-
const relatedArticlesQuery = `*[!(_id in path("drafts.**")) && _type == "article" && title !='${article.title}' && defined(title) && is_visible == true && ( references('article.documentGroup._id') || ${references} ) && published <= '${today}'] | order(published desc) [0...4] {
|
|
14646
|
-
...,
|
|
14647
|
-
title,
|
|
14648
|
-
summary,
|
|
14649
|
-
thumbnail,
|
|
14650
|
-
url,
|
|
14651
|
-
published,
|
|
14652
|
-
authorMapping[]->,
|
|
14653
|
-
contentCategory->
|
|
14654
|
-
}`
|
|
14655
|
-
const relatedArticles = await client.fetch(relatedArticlesQuery)
|
|
14656
|
-
|
|
14657
|
-
Sample usage
|
|
14658
|
-
<RelatedContent dataRecord={props.relatedArticles} client={client} showAuthor showPublished reverse/>
|
|
14659
|
-
|
|
14660
|
-
|
|
14742
|
+
/*
|
|
14743
|
+
Sample query
|
|
14744
|
+
let references = ''
|
|
14745
|
+
if(article.taxonomyMapping.length > 0){
|
|
14746
|
+
article.taxonomyMapping.forEach((ref, index) => {
|
|
14747
|
+
references = references + `references('${ref._ref}') `
|
|
14748
|
+
if(index+1 !== article.taxonomyMapping.length){
|
|
14749
|
+
references = references + ` && `
|
|
14750
|
+
}
|
|
14751
|
+
})
|
|
14752
|
+
}
|
|
14753
|
+
|
|
14754
|
+
const relatedArticlesQuery = `*[!(_id in path("drafts.**")) && _type == "article" && title !='${article.title}' && defined(title) && is_visible == true && ( references('article.documentGroup._id') || ${references} ) && published <= '${today}'] | order(published desc) [0...4] {
|
|
14755
|
+
...,
|
|
14756
|
+
title,
|
|
14757
|
+
summary,
|
|
14758
|
+
thumbnail,
|
|
14759
|
+
url,
|
|
14760
|
+
published,
|
|
14761
|
+
authorMapping[]->,
|
|
14762
|
+
contentCategory->
|
|
14763
|
+
}`
|
|
14764
|
+
const relatedArticles = await client.fetch(relatedArticlesQuery)
|
|
14765
|
+
|
|
14766
|
+
Sample usage
|
|
14767
|
+
<RelatedContent dataRecord={props.relatedArticles} client={client} showAuthor showPublished reverse/>
|
|
14768
|
+
|
|
14769
|
+
|
|
14661
14770
|
*/
|
|
14662
14771
|
var RelatedContent = function RelatedContent(props) {
|
|
14663
14772
|
var client = props.client,
|
|
@@ -14724,21 +14833,21 @@ var RelatedContent = function RelatedContent(props) {
|
|
|
14724
14833
|
);
|
|
14725
14834
|
};
|
|
14726
14835
|
|
|
14727
|
-
/*
|
|
14728
|
-
Example usage - targetedonc.com/latest-conference
|
|
14729
|
-
const query = `*[!(_id in path("drafts.**")) && _type == "article" && defined(title) && is_visible == true && published <= '${today}' && references('b49d36b8-aa56-4183-a2bc-1568c229fb72') ] | order(published desc) [$from...$to] {
|
|
14730
|
-
...,
|
|
14731
|
-
title,
|
|
14732
|
-
summary,
|
|
14733
|
-
thumbnail,
|
|
14734
|
-
url,
|
|
14735
|
-
published,
|
|
14736
|
-
documentGroup->,
|
|
14737
|
-
contentCategory->,
|
|
14738
|
-
'pageNumber': ${currentPage}
|
|
14739
|
-
}`
|
|
14740
|
-
|
|
14741
|
-
const posts = await client.fetch(query, params)
|
|
14836
|
+
/*
|
|
14837
|
+
Example usage - targetedonc.com/latest-conference
|
|
14838
|
+
const query = `*[!(_id in path("drafts.**")) && _type == "article" && defined(title) && is_visible == true && published <= '${today}' && references('b49d36b8-aa56-4183-a2bc-1568c229fb72') ] | order(published desc) [$from...$to] {
|
|
14839
|
+
...,
|
|
14840
|
+
title,
|
|
14841
|
+
summary,
|
|
14842
|
+
thumbnail,
|
|
14843
|
+
url,
|
|
14844
|
+
published,
|
|
14845
|
+
documentGroup->,
|
|
14846
|
+
contentCategory->,
|
|
14847
|
+
'pageNumber': ${currentPage}
|
|
14848
|
+
}`
|
|
14849
|
+
|
|
14850
|
+
const posts = await client.fetch(query, params)
|
|
14742
14851
|
*/
|
|
14743
14852
|
|
|
14744
14853
|
var ConferenceArticleCard = function ConferenceArticleCard(props) {
|