@mjhls/mjh-framework 1.0.247 → 1.0.249
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 -171
- package/dist/cjs/{AdSlot-c472fff6.js → AdSlot-a79ba074.js} +0 -15
- package/dist/cjs/DeckContent.js +10 -10
- package/dist/cjs/DeckQueue.js +1 -1
- package/dist/cjs/{GridContent-463c504f.js → GridContent-e6c8fb75.js} +3 -3
- package/dist/cjs/GridContent.js +3 -3
- 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-18cef899.js → Normal-2ee1925d.js} +30 -30
- 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 +2 -2
- 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 +550 -536
- package/dist/esm/{AdSlot-bdd7a629.js → AdSlot-fb853576.js} +0 -15
- package/dist/esm/DeckContent.js +10 -10
- package/dist/esm/DeckQueue.js +1 -1
- package/dist/esm/{GridContent-2a48fb19.js → GridContent-3711b837.js} +2 -2
- package/dist/esm/GridContent.js +3 -3
- 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-4c82c9c2.js → Normal-b0b212a3.js} +30 -30
- 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 +2 -2
- 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 +554 -540
- package/package.json +102 -103
package/dist/cjs/index.js
CHANGED
|
@@ -26,21 +26,21 @@ 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');
|
|
33
|
-
var AdSlot = require('./AdSlot-
|
|
33
|
+
var AdSlot = require('./AdSlot-a79ba074.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-e6c8fb75.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-2ee1925d.js');
|
|
56
56
|
require('react-bootstrap/ListGroup');
|
|
57
57
|
var Head = _interopDefault(require('next/head'));
|
|
58
58
|
var Accordion = _interopDefault(require('react-bootstrap/Accordion'));
|
|
@@ -2222,7 +2222,7 @@ var CMEDeck = function CMEDeck(_ref) {
|
|
|
2222
2222
|
form.append('doc', 'per');
|
|
2223
2223
|
form.append('from', params.from);
|
|
2224
2224
|
form.append('limit', params.limit);
|
|
2225
|
-
form.append('keyword',
|
|
2225
|
+
form.append('keyword', keywords);
|
|
2226
2226
|
_context.prev = 5;
|
|
2227
2227
|
_context.next = 8;
|
|
2228
2228
|
return fetch(corsProxy$1 + 'http://vaccine.mjhassoc.com/doc_loader.php', {
|
|
@@ -2295,7 +2295,9 @@ var CMEDeck = function CMEDeck(_ref) {
|
|
|
2295
2295
|
rightItems = _ref.rightItems,
|
|
2296
2296
|
_ref$seoPaginate = _ref.seoPaginate,
|
|
2297
2297
|
seoPaginate = _ref$seoPaginate === undefined ? true : _ref$seoPaginate,
|
|
2298
|
-
pageview = _ref.pageview
|
|
2298
|
+
pageview = _ref.pageview,
|
|
2299
|
+
_ref$keywords = _ref.keywords,
|
|
2300
|
+
keywords = _ref$keywords === undefined ? '' : _ref$keywords;
|
|
2299
2301
|
|
|
2300
2302
|
var router = Router.useRouter();
|
|
2301
2303
|
|
|
@@ -2425,7 +2427,7 @@ var CMEDeck = function CMEDeck(_ref) {
|
|
|
2425
2427
|
{ xs: 3, sm: 4, md: 4, lg: 4, xl: 4, style: { padding: '0' } },
|
|
2426
2428
|
React__default.createElement(
|
|
2427
2429
|
'a',
|
|
2428
|
-
{ href: row.href },
|
|
2430
|
+
{ href: row.href, target: '_blank' },
|
|
2429
2431
|
React__default.createElement('img', { style: { width: '100%', borderRadius: '0 0 0 10%', marginBottom: '20px', borderTop: '1px solid #EEE' }, src: row.thumbnail })
|
|
2430
2432
|
)
|
|
2431
2433
|
),
|
|
@@ -2434,7 +2436,7 @@ var CMEDeck = function CMEDeck(_ref) {
|
|
|
2434
2436
|
{ xs: 9, sm: 8, md: 8, lg: 8, xl: 8, style: { paddingTop: '10px', marginBottom: '20px', borderTop: '1px solid #EEE' } },
|
|
2435
2437
|
React__default.createElement(
|
|
2436
2438
|
'a',
|
|
2437
|
-
{ href: row.href },
|
|
2439
|
+
{ href: row.href, target: '_blank' },
|
|
2438
2440
|
React__default.createElement('h4', { className: 'mb-1', style: { fontWeight: '500', fontSize: '22px' }, dangerouslySetInnerHTML: { __html: row.title } }),
|
|
2439
2441
|
React__default.createElement(
|
|
2440
2442
|
'p',
|
|
@@ -2453,7 +2455,7 @@ var CMEDeck = function CMEDeck(_ref) {
|
|
|
2453
2455
|
{ xs: 9, sm: 8, lg: 8, xl: 8 },
|
|
2454
2456
|
React__default.createElement(
|
|
2455
2457
|
'a',
|
|
2456
|
-
{ href: row.href },
|
|
2458
|
+
{ href: row.href, target: '_blank' },
|
|
2457
2459
|
React__default.createElement('h4', { className: 'mb-1', style: { fontWeight: '500', fontSize: '22px' }, dangerouslySetInnerHTML: { __html: row.title } }),
|
|
2458
2460
|
React__default.createElement(
|
|
2459
2461
|
'p',
|
|
@@ -2468,7 +2470,7 @@ var CMEDeck = function CMEDeck(_ref) {
|
|
|
2468
2470
|
{ xs: 3, sm: 4, lg: 4, xl: 4 },
|
|
2469
2471
|
React__default.createElement(
|
|
2470
2472
|
'a',
|
|
2471
|
-
{ href: row.href },
|
|
2473
|
+
{ href: row.href, target: '_blank' },
|
|
2472
2474
|
React__default.createElement('img', { style: { width: '100%', borderRadius: '0 0 10% 0' }, src: row.thumbnail && urlFor(row.thumbnail.asset).url() })
|
|
2473
2475
|
)
|
|
2474
2476
|
)
|
|
@@ -3046,21 +3048,18 @@ var Slideshow = function Slideshow(_ref) {
|
|
|
3046
3048
|
);
|
|
3047
3049
|
};
|
|
3048
3050
|
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3051
|
+
// do not edit .js files directly - edit src/index.jst
|
|
3052
|
+
|
|
3053
|
+
|
|
3052
3054
|
|
|
3053
3055
|
var fastDeepEqual = function equal(a, b) {
|
|
3054
3056
|
if (a === b) return true;
|
|
3055
3057
|
|
|
3056
3058
|
if (a && b && typeof a == 'object' && typeof b == 'object') {
|
|
3057
|
-
|
|
3058
|
-
, arrB = isArray(b)
|
|
3059
|
-
, i
|
|
3060
|
-
, length
|
|
3061
|
-
, key;
|
|
3059
|
+
if (a.constructor !== b.constructor) return false;
|
|
3062
3060
|
|
|
3063
|
-
|
|
3061
|
+
var length, i, keys;
|
|
3062
|
+
if (Array.isArray(a)) {
|
|
3064
3063
|
length = a.length;
|
|
3065
3064
|
if (length != b.length) return false;
|
|
3066
3065
|
for (i = length; i-- !== 0;)
|
|
@@ -3068,35 +3067,29 @@ var fastDeepEqual = function equal(a, b) {
|
|
|
3068
3067
|
return true;
|
|
3069
3068
|
}
|
|
3070
3069
|
|
|
3071
|
-
if (arrA != arrB) return false;
|
|
3072
3070
|
|
|
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
3071
|
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
if (
|
|
3081
|
-
if (regexpA && regexpB) return a.toString() == b.toString();
|
|
3072
|
+
if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
|
|
3073
|
+
if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
|
|
3074
|
+
if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
|
|
3082
3075
|
|
|
3083
|
-
|
|
3076
|
+
keys = Object.keys(a);
|
|
3084
3077
|
length = keys.length;
|
|
3085
|
-
|
|
3086
|
-
if (length !== keyList(b).length)
|
|
3087
|
-
return false;
|
|
3078
|
+
if (length !== Object.keys(b).length) return false;
|
|
3088
3079
|
|
|
3089
3080
|
for (i = length; i-- !== 0;)
|
|
3090
|
-
if (!
|
|
3081
|
+
if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
|
|
3091
3082
|
|
|
3092
3083
|
for (i = length; i-- !== 0;) {
|
|
3093
|
-
key = keys[i];
|
|
3084
|
+
var key = keys[i];
|
|
3085
|
+
|
|
3094
3086
|
if (!equal(a[key], b[key])) return false;
|
|
3095
3087
|
}
|
|
3096
3088
|
|
|
3097
3089
|
return true;
|
|
3098
3090
|
}
|
|
3099
3091
|
|
|
3092
|
+
// true if both NaN, false otherwise
|
|
3100
3093
|
return a!==a && b!==b;
|
|
3101
3094
|
};
|
|
3102
3095
|
|
|
@@ -4119,7 +4112,7 @@ function formatValue(ctx, value, recurseTimes) {
|
|
|
4119
4112
|
var base = '', array = false, braces = ['{', '}'];
|
|
4120
4113
|
|
|
4121
4114
|
// Make Array say that they are Array
|
|
4122
|
-
if (isArray
|
|
4115
|
+
if (isArray(value)) {
|
|
4123
4116
|
array = true;
|
|
4124
4117
|
braces = ['[', ']'];
|
|
4125
4118
|
}
|
|
@@ -4298,7 +4291,7 @@ function reduceToSingleString(output, base, braces) {
|
|
|
4298
4291
|
|
|
4299
4292
|
// NOTE: These type checking functions intentionally don't use `instanceof`
|
|
4300
4293
|
// because it is fragile and can be easily faked with `Object.create()`.
|
|
4301
|
-
function isArray
|
|
4294
|
+
function isArray(ar) {
|
|
4302
4295
|
return Array.isArray(ar);
|
|
4303
4296
|
}
|
|
4304
4297
|
|
|
@@ -4425,7 +4418,7 @@ var util = {
|
|
|
4425
4418
|
isNullOrUndefined: isNullOrUndefined,
|
|
4426
4419
|
isNull: isNull,
|
|
4427
4420
|
isBoolean: isBoolean,
|
|
4428
|
-
isArray: isArray
|
|
4421
|
+
isArray: isArray,
|
|
4429
4422
|
inspect: inspect,
|
|
4430
4423
|
deprecate: deprecate,
|
|
4431
4424
|
format: format,
|
|
@@ -5092,199 +5085,235 @@ module.exports = exports['default'];
|
|
|
5092
5085
|
|
|
5093
5086
|
var youTubePlayer = _commonjsHelpers.unwrapExports(dist);
|
|
5094
5087
|
|
|
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; };
|
|
5088
|
+
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
5089
|
|
|
5099
5090
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
5100
5091
|
|
|
5101
|
-
function
|
|
5092
|
+
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); } }
|
|
5093
|
+
|
|
5094
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
5095
|
+
|
|
5096
|
+
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); }; }
|
|
5097
|
+
|
|
5098
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
5099
|
+
|
|
5100
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
5101
|
+
|
|
5102
|
+
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; } }
|
|
5103
|
+
|
|
5104
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
5105
|
+
|
|
5106
|
+
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); }
|
|
5107
|
+
|
|
5108
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
5109
|
+
|
|
5110
|
+
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; }
|
|
5102
5111
|
|
|
5103
|
-
function
|
|
5112
|
+
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; }
|
|
5104
5113
|
|
|
5105
|
-
|
|
5106
|
-
|
|
5107
|
-
*
|
|
5108
|
-
*
|
|
5109
|
-
* @param {Object}
|
|
5114
|
+
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; }
|
|
5115
|
+
/**
|
|
5116
|
+
* Check whether a `props` change should result in the video being updated.
|
|
5117
|
+
*
|
|
5118
|
+
* @param {Object} prevProps
|
|
5119
|
+
* @param {Object} props
|
|
5110
5120
|
*/
|
|
5121
|
+
|
|
5111
5122
|
function shouldUpdateVideo(prevProps, props) {
|
|
5112
5123
|
// A changing video should always trigger an update
|
|
5113
5124
|
if (prevProps.videoId !== props.videoId) {
|
|
5114
5125
|
return true;
|
|
5115
|
-
}
|
|
5116
|
-
|
|
5117
|
-
// Otherwise, a change in the start/end time playerVars also requires a player
|
|
5126
|
+
} // Otherwise, a change in the start/end time playerVars also requires a player
|
|
5118
5127
|
// update.
|
|
5128
|
+
|
|
5129
|
+
|
|
5119
5130
|
var prevVars = prevProps.opts.playerVars || {};
|
|
5120
5131
|
var vars = props.opts.playerVars || {};
|
|
5121
|
-
|
|
5122
5132
|
return prevVars.start !== vars.start || prevVars.end !== vars.end;
|
|
5123
5133
|
}
|
|
5124
|
-
|
|
5125
|
-
|
|
5126
|
-
*
|
|
5127
|
-
*
|
|
5128
|
-
*
|
|
5129
|
-
*
|
|
5130
|
-
* @param {Object} opts
|
|
5134
|
+
/**
|
|
5135
|
+
* Neutralize API options that only require a video update, leaving only options
|
|
5136
|
+
* that require a player reset. The results can then be compared to see if a
|
|
5137
|
+
* player reset is necessary.
|
|
5138
|
+
*
|
|
5139
|
+
* @param {Object} opts
|
|
5131
5140
|
*/
|
|
5141
|
+
|
|
5142
|
+
|
|
5132
5143
|
function filterResetOptions(opts) {
|
|
5133
|
-
return
|
|
5134
|
-
playerVars:
|
|
5144
|
+
return _objectSpread({}, opts, {
|
|
5145
|
+
playerVars: _objectSpread({}, opts.playerVars, {
|
|
5135
5146
|
autoplay: 0,
|
|
5136
5147
|
start: 0,
|
|
5137
5148
|
end: 0
|
|
5138
5149
|
})
|
|
5139
5150
|
});
|
|
5140
5151
|
}
|
|
5141
|
-
|
|
5142
|
-
|
|
5143
|
-
*
|
|
5144
|
-
*
|
|
5145
|
-
*
|
|
5146
|
-
*
|
|
5147
|
-
*
|
|
5148
|
-
* @param {Object}
|
|
5149
|
-
* @param {Object} props
|
|
5152
|
+
/**
|
|
5153
|
+
* Check whether a `props` change should result in the player being reset.
|
|
5154
|
+
* The player is reset when the `props.opts` change, except if the only change
|
|
5155
|
+
* is in the `start` and `end` playerVars, because a video update can deal with
|
|
5156
|
+
* those.
|
|
5157
|
+
*
|
|
5158
|
+
* @param {Object} prevProps
|
|
5159
|
+
* @param {Object} props
|
|
5150
5160
|
*/
|
|
5161
|
+
|
|
5162
|
+
|
|
5151
5163
|
function shouldResetPlayer(prevProps, props) {
|
|
5152
5164
|
return !fastDeepEqual(filterResetOptions(prevProps.opts), filterResetOptions(props.opts));
|
|
5153
5165
|
}
|
|
5154
|
-
|
|
5155
|
-
|
|
5156
|
-
*
|
|
5157
|
-
*
|
|
5158
|
-
* @param {Object}
|
|
5159
|
-
* @param {Object} props
|
|
5166
|
+
/**
|
|
5167
|
+
* Check whether a props change should result in an id or className update.
|
|
5168
|
+
*
|
|
5169
|
+
* @param {Object} prevProps
|
|
5170
|
+
* @param {Object} props
|
|
5160
5171
|
*/
|
|
5172
|
+
|
|
5173
|
+
|
|
5161
5174
|
function shouldUpdatePlayer(prevProps, props) {
|
|
5162
5175
|
return prevProps.id !== props.id || prevProps.className !== props.className;
|
|
5163
5176
|
}
|
|
5164
5177
|
|
|
5165
|
-
var YouTube = function (_React$Component) {
|
|
5178
|
+
var YouTube = /*#__PURE__*/function (_React$Component) {
|
|
5166
5179
|
_inherits(YouTube, _React$Component);
|
|
5167
5180
|
|
|
5181
|
+
var _super = _createSuper(YouTube);
|
|
5182
|
+
|
|
5183
|
+
/**
|
|
5184
|
+
* Expose PlayerState constants for convenience. These constants can also be
|
|
5185
|
+
* accessed through the global YT object after the YouTube IFrame API is instantiated.
|
|
5186
|
+
* https://developers.google.com/youtube/iframe_api_reference#onStateChange
|
|
5187
|
+
*/
|
|
5168
5188
|
function YouTube(props) {
|
|
5189
|
+
var _this;
|
|
5190
|
+
|
|
5169
5191
|
_classCallCheck(this, YouTube);
|
|
5170
5192
|
|
|
5171
|
-
|
|
5193
|
+
_this = _super.call(this, props);
|
|
5172
5194
|
|
|
5173
|
-
_this
|
|
5195
|
+
_defineProperty(_assertThisInitialized(_this), "onPlayerReady", function (event) {
|
|
5174
5196
|
return _this.props.onReady(event);
|
|
5175
|
-
};
|
|
5197
|
+
});
|
|
5176
5198
|
|
|
5177
|
-
_this
|
|
5199
|
+
_defineProperty(_assertThisInitialized(_this), "onPlayerError", function (event) {
|
|
5178
5200
|
return _this.props.onError(event);
|
|
5179
|
-
};
|
|
5201
|
+
});
|
|
5180
5202
|
|
|
5181
|
-
_this
|
|
5203
|
+
_defineProperty(_assertThisInitialized(_this), "onPlayerStateChange", function (event) {
|
|
5182
5204
|
_this.props.onStateChange(event);
|
|
5183
|
-
switch (event.data) {
|
|
5184
5205
|
|
|
5206
|
+
switch (event.data) {
|
|
5185
5207
|
case YouTube.PlayerState.ENDED:
|
|
5186
5208
|
_this.props.onEnd(event);
|
|
5209
|
+
|
|
5187
5210
|
break;
|
|
5188
5211
|
|
|
5189
5212
|
case YouTube.PlayerState.PLAYING:
|
|
5190
5213
|
_this.props.onPlay(event);
|
|
5214
|
+
|
|
5191
5215
|
break;
|
|
5192
5216
|
|
|
5193
5217
|
case YouTube.PlayerState.PAUSED:
|
|
5194
5218
|
_this.props.onPause(event);
|
|
5219
|
+
|
|
5195
5220
|
break;
|
|
5196
5221
|
}
|
|
5197
|
-
};
|
|
5222
|
+
});
|
|
5198
5223
|
|
|
5199
|
-
_this
|
|
5224
|
+
_defineProperty(_assertThisInitialized(_this), "onPlayerPlaybackRateChange", function (event) {
|
|
5200
5225
|
return _this.props.onPlaybackRateChange(event);
|
|
5201
|
-
};
|
|
5226
|
+
});
|
|
5202
5227
|
|
|
5203
|
-
_this
|
|
5228
|
+
_defineProperty(_assertThisInitialized(_this), "onPlayerPlaybackQualityChange", function (event) {
|
|
5204
5229
|
return _this.props.onPlaybackQualityChange(event);
|
|
5205
|
-
};
|
|
5230
|
+
});
|
|
5206
5231
|
|
|
5207
|
-
_this
|
|
5232
|
+
_defineProperty(_assertThisInitialized(_this), "createPlayer", function () {
|
|
5208
5233
|
// do not attempt to create a player server-side, it won't work
|
|
5209
|
-
if (typeof document === 'undefined') return;
|
|
5210
|
-
|
|
5211
|
-
var playerOpts =
|
|
5234
|
+
if (typeof document === 'undefined') return; // create player
|
|
5235
|
+
|
|
5236
|
+
var playerOpts = _objectSpread({}, _this.props.opts, {
|
|
5212
5237
|
// preload the `videoId` video if one is already given
|
|
5213
5238
|
videoId: _this.props.videoId
|
|
5214
5239
|
});
|
|
5215
|
-
|
|
5216
|
-
// attach event handlers
|
|
5240
|
+
|
|
5241
|
+
_this.internalPlayer = youTubePlayer(_this.container, playerOpts); // attach event handlers
|
|
5242
|
+
|
|
5217
5243
|
_this.internalPlayer.on('ready', _this.onPlayerReady);
|
|
5244
|
+
|
|
5218
5245
|
_this.internalPlayer.on('error', _this.onPlayerError);
|
|
5246
|
+
|
|
5219
5247
|
_this.internalPlayer.on('stateChange', _this.onPlayerStateChange);
|
|
5248
|
+
|
|
5220
5249
|
_this.internalPlayer.on('playbackRateChange', _this.onPlayerPlaybackRateChange);
|
|
5250
|
+
|
|
5221
5251
|
_this.internalPlayer.on('playbackQualityChange', _this.onPlayerPlaybackQualityChange);
|
|
5222
|
-
};
|
|
5252
|
+
});
|
|
5223
5253
|
|
|
5224
|
-
_this
|
|
5254
|
+
_defineProperty(_assertThisInitialized(_this), "resetPlayer", function () {
|
|
5225
5255
|
return _this.internalPlayer.destroy().then(_this.createPlayer);
|
|
5226
|
-
};
|
|
5256
|
+
});
|
|
5227
5257
|
|
|
5228
|
-
_this
|
|
5258
|
+
_defineProperty(_assertThisInitialized(_this), "updatePlayer", function () {
|
|
5229
5259
|
_this.internalPlayer.getIframe().then(function (iframe) {
|
|
5230
5260
|
if (_this.props.id) iframe.setAttribute('id', _this.props.id);else iframe.removeAttribute('id');
|
|
5231
5261
|
if (_this.props.className) iframe.setAttribute('class', _this.props.className);else iframe.removeAttribute('class');
|
|
5232
5262
|
});
|
|
5233
|
-
};
|
|
5263
|
+
});
|
|
5234
5264
|
|
|
5235
|
-
_this
|
|
5265
|
+
_defineProperty(_assertThisInitialized(_this), "updateVideo", function () {
|
|
5236
5266
|
if (typeof _this.props.videoId === 'undefined' || _this.props.videoId === null) {
|
|
5237
5267
|
_this.internalPlayer.stopVideo();
|
|
5268
|
+
|
|
5238
5269
|
return;
|
|
5239
|
-
}
|
|
5270
|
+
} // set queueing options
|
|
5271
|
+
|
|
5240
5272
|
|
|
5241
|
-
// set queueing options
|
|
5242
5273
|
var autoplay = false;
|
|
5243
5274
|
var opts = {
|
|
5244
5275
|
videoId: _this.props.videoId
|
|
5245
5276
|
};
|
|
5277
|
+
|
|
5246
5278
|
if ('playerVars' in _this.props.opts) {
|
|
5247
5279
|
autoplay = _this.props.opts.playerVars.autoplay === 1;
|
|
5280
|
+
|
|
5248
5281
|
if ('start' in _this.props.opts.playerVars) {
|
|
5249
5282
|
opts.startSeconds = _this.props.opts.playerVars.start;
|
|
5250
5283
|
}
|
|
5284
|
+
|
|
5251
5285
|
if ('end' in _this.props.opts.playerVars) {
|
|
5252
5286
|
opts.endSeconds = _this.props.opts.playerVars.end;
|
|
5253
5287
|
}
|
|
5254
|
-
}
|
|
5288
|
+
} // if autoplay is enabled loadVideoById
|
|
5289
|
+
|
|
5255
5290
|
|
|
5256
|
-
// if autoplay is enabled loadVideoById
|
|
5257
5291
|
if (autoplay) {
|
|
5258
5292
|
_this.internalPlayer.loadVideoById(opts);
|
|
5293
|
+
|
|
5259
5294
|
return;
|
|
5260
|
-
}
|
|
5261
|
-
|
|
5295
|
+
} // default behaviour just cues the video
|
|
5296
|
+
|
|
5297
|
+
|
|
5262
5298
|
_this.internalPlayer.cueVideoById(opts);
|
|
5263
|
-
};
|
|
5299
|
+
});
|
|
5264
5300
|
|
|
5265
|
-
_this
|
|
5301
|
+
_defineProperty(_assertThisInitialized(_this), "refContainer", function (container) {
|
|
5266
5302
|
_this.container = container;
|
|
5267
|
-
};
|
|
5303
|
+
});
|
|
5268
5304
|
|
|
5269
5305
|
_this.container = null;
|
|
5270
5306
|
_this.internalPlayer = null;
|
|
5271
5307
|
return _this;
|
|
5272
5308
|
}
|
|
5273
5309
|
|
|
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
5310
|
_createClass(YouTube, [{
|
|
5282
|
-
key:
|
|
5311
|
+
key: "componentDidMount",
|
|
5283
5312
|
value: function componentDidMount() {
|
|
5284
5313
|
this.createPlayer();
|
|
5285
5314
|
}
|
|
5286
5315
|
}, {
|
|
5287
|
-
key:
|
|
5316
|
+
key: "componentDidUpdate",
|
|
5288
5317
|
value: function componentDidUpdate(prevProps) {
|
|
5289
5318
|
if (shouldUpdatePlayer(prevProps, this.props)) {
|
|
5290
5319
|
this.updatePlayer();
|
|
@@ -5299,112 +5328,58 @@ var YouTube = function (_React$Component) {
|
|
|
5299
5328
|
}
|
|
5300
5329
|
}
|
|
5301
5330
|
}, {
|
|
5302
|
-
key:
|
|
5331
|
+
key: "componentWillUnmount",
|
|
5303
5332
|
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.
|
|
5333
|
+
/**
|
|
5334
|
+
* Note: The `youtube-player` package that is used promisifies all YouTube
|
|
5335
|
+
* Player API calls, which introduces a delay of a tick before it actually
|
|
5336
|
+
* gets destroyed. Since React attempts to remove the element instantly
|
|
5337
|
+
* this method isn't quick enough to reset the container element.
|
|
5309
5338
|
*/
|
|
5310
5339
|
this.internalPlayer.destroy();
|
|
5311
5340
|
}
|
|
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.
|
|
5341
|
+
/**
|
|
5342
|
+
* https://developers.google.com/youtube/iframe_api_reference#onReady
|
|
5343
|
+
*
|
|
5344
|
+
* @param {Object} event
|
|
5345
|
+
* @param {Object} target - player object
|
|
5378
5346
|
*/
|
|
5379
5347
|
|
|
5380
5348
|
}, {
|
|
5381
|
-
key:
|
|
5349
|
+
key: "render",
|
|
5382
5350
|
value: function render() {
|
|
5383
|
-
return React__default.createElement(
|
|
5384
|
-
|
|
5385
|
-
|
|
5386
|
-
|
|
5387
|
-
|
|
5351
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
5352
|
+
className: this.props.containerClassName
|
|
5353
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
5354
|
+
id: this.props.id,
|
|
5355
|
+
className: this.props.className,
|
|
5356
|
+
ref: this.refContainer
|
|
5357
|
+
}));
|
|
5388
5358
|
}
|
|
5389
5359
|
}]);
|
|
5390
5360
|
|
|
5391
5361
|
return YouTube;
|
|
5392
5362
|
}(React__default.Component);
|
|
5393
5363
|
|
|
5364
|
+
_defineProperty(YouTube, "PlayerState", {
|
|
5365
|
+
UNSTARTED: -1,
|
|
5366
|
+
ENDED: 0,
|
|
5367
|
+
PLAYING: 1,
|
|
5368
|
+
PAUSED: 2,
|
|
5369
|
+
BUFFERING: 3,
|
|
5370
|
+
CUED: 5
|
|
5371
|
+
});
|
|
5372
|
+
|
|
5394
5373
|
YouTube.propTypes = {
|
|
5395
5374
|
videoId: PropTypes.string,
|
|
5396
|
-
|
|
5397
5375
|
// custom ID for player element
|
|
5398
5376
|
id: PropTypes.string,
|
|
5399
|
-
|
|
5400
5377
|
// custom class name for player element
|
|
5401
5378
|
className: PropTypes.string,
|
|
5402
5379
|
// custom class name for player container element
|
|
5403
5380
|
containerClassName: PropTypes.string,
|
|
5404
|
-
|
|
5405
5381
|
// https://developers.google.com/youtube/iframe_api_reference#Loading_a_Video_Player
|
|
5406
5382
|
opts: PropTypes.objectOf(PropTypes.any),
|
|
5407
|
-
|
|
5408
5383
|
// event subscriptions
|
|
5409
5384
|
onReady: PropTypes.func,
|
|
5410
5385
|
onError: PropTypes.func,
|
|
@@ -5416,6 +5391,7 @@ YouTube.propTypes = {
|
|
|
5416
5391
|
onPlaybackQualityChange: PropTypes.func
|
|
5417
5392
|
};
|
|
5418
5393
|
YouTube.defaultProps = {
|
|
5394
|
+
videoId: null,
|
|
5419
5395
|
id: null,
|
|
5420
5396
|
className: null,
|
|
5421
5397
|
opts: {},
|
|
@@ -5429,14 +5405,6 @@ YouTube.defaultProps = {
|
|
|
5429
5405
|
onPlaybackRateChange: function onPlaybackRateChange() {},
|
|
5430
5406
|
onPlaybackQualityChange: function onPlaybackQualityChange() {}
|
|
5431
5407
|
};
|
|
5432
|
-
YouTube.PlayerState = {
|
|
5433
|
-
UNSTARTED: -1,
|
|
5434
|
-
ENDED: 0,
|
|
5435
|
-
PLAYING: 1,
|
|
5436
|
-
PAUSED: 2,
|
|
5437
|
-
BUFFERING: 3,
|
|
5438
|
-
CUED: 5
|
|
5439
|
-
};
|
|
5440
5408
|
|
|
5441
5409
|
var YouTubePlayer = function YouTubePlayer(_ref) {
|
|
5442
5410
|
var url = _ref.url;
|
|
@@ -6471,8 +6439,8 @@ var window_1 = win;
|
|
|
6471
6439
|
|
|
6472
6440
|
/*! @name @brightcove/react-player-loader @version 1.4.0 @license Apache-2.0 */
|
|
6473
6441
|
|
|
6474
|
-
function _extends
|
|
6475
|
-
_extends
|
|
6442
|
+
function _extends() {
|
|
6443
|
+
_extends = Object.assign || function (target) {
|
|
6476
6444
|
for (var i = 1; i < arguments.length; i++) {
|
|
6477
6445
|
var source = arguments[i];
|
|
6478
6446
|
|
|
@@ -6486,7 +6454,7 @@ function _extends$1() {
|
|
|
6486
6454
|
return target;
|
|
6487
6455
|
};
|
|
6488
6456
|
|
|
6489
|
-
return _extends
|
|
6457
|
+
return _extends.apply(this, arguments);
|
|
6490
6458
|
}
|
|
6491
6459
|
|
|
6492
6460
|
function _inheritsLoose(subClass, superClass) {
|
|
@@ -6495,7 +6463,7 @@ function _inheritsLoose(subClass, superClass) {
|
|
|
6495
6463
|
subClass.__proto__ = superClass;
|
|
6496
6464
|
}
|
|
6497
6465
|
|
|
6498
|
-
function _assertThisInitialized(self) {
|
|
6466
|
+
function _assertThisInitialized$1(self) {
|
|
6499
6467
|
if (self === void 0) {
|
|
6500
6468
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
6501
6469
|
}
|
|
@@ -6505,8 +6473,8 @@ function _assertThisInitialized(self) {
|
|
|
6505
6473
|
|
|
6506
6474
|
/*! @name @brightcove/player-loader @version 1.7.1 @license Apache-2.0 */
|
|
6507
6475
|
|
|
6508
|
-
function _extends$1
|
|
6509
|
-
_extends$1
|
|
6476
|
+
function _extends$1() {
|
|
6477
|
+
_extends$1 = Object.assign || function (target) {
|
|
6510
6478
|
for (var i = 1; i < arguments.length; i++) {
|
|
6511
6479
|
var source = arguments[i];
|
|
6512
6480
|
|
|
@@ -6520,7 +6488,7 @@ function _extends$1$1() {
|
|
|
6520
6488
|
return target;
|
|
6521
6489
|
};
|
|
6522
6490
|
|
|
6523
|
-
return _extends$1
|
|
6491
|
+
return _extends$1.apply(this, arguments);
|
|
6524
6492
|
}
|
|
6525
6493
|
|
|
6526
6494
|
var version$1 = "1.7.1";
|
|
@@ -6528,7 +6496,7 @@ var version$1 = "1.7.1";
|
|
|
6528
6496
|
/*! @name @brightcove/player-url @version 1.2.0 @license Apache-2.0 */
|
|
6529
6497
|
var version$1$1 = "1.2.0";
|
|
6530
6498
|
|
|
6531
|
-
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
|
|
6499
|
+
var _typeof$1 = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
|
|
6532
6500
|
return typeof obj;
|
|
6533
6501
|
} : function (obj) {
|
|
6534
6502
|
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
@@ -6663,7 +6631,7 @@ var brightcovePlayerUrl = function brightcovePlayerUrl(_ref) {
|
|
|
6663
6631
|
|
|
6664
6632
|
var qs = '';
|
|
6665
6633
|
|
|
6666
|
-
if (iframe && queryParams && (typeof queryParams === 'undefined' ? 'undefined' : _typeof(queryParams)) === 'object') {
|
|
6634
|
+
if (iframe && queryParams && (typeof queryParams === 'undefined' ? 'undefined' : _typeof$1(queryParams)) === 'object') {
|
|
6667
6635
|
qs = getQueryString(queryParams);
|
|
6668
6636
|
}
|
|
6669
6637
|
|
|
@@ -6897,7 +6865,7 @@ var wrapResponsive = function wrapResponsive(embedType, embedOptions, el) {
|
|
|
6897
6865
|
el.style.width = '100%';
|
|
6898
6866
|
el.style.height = '100%';
|
|
6899
6867
|
|
|
6900
|
-
var responsive = _extends$1
|
|
6868
|
+
var responsive = _extends$1({
|
|
6901
6869
|
aspectRatio: DEFAULT_ASPECT_RATIO,
|
|
6902
6870
|
iframeHorizontalPlaylist: DEFAULT_IFRAME_HORIZONTAL_PLAYLIST,
|
|
6903
6871
|
maxWidth: DEFAULT_MAX_WIDTH
|
|
@@ -7582,7 +7550,7 @@ var loadPlayer = function loadPlayer(params, resolve, reject) {
|
|
|
7582
7550
|
|
|
7583
7551
|
|
|
7584
7552
|
var brightcovePlayerLoader = function brightcovePlayerLoader(parameters) {
|
|
7585
|
-
var params = _extends$1
|
|
7553
|
+
var params = _extends$1({}, DEFAULTS, parameters);
|
|
7586
7554
|
|
|
7587
7555
|
var Promise = params.Promise,
|
|
7588
7556
|
onSuccess = params.onSuccess,
|
|
@@ -7724,7 +7692,7 @@ function (_React$Component) {
|
|
|
7724
7692
|
_this.refNode = ref;
|
|
7725
7693
|
};
|
|
7726
7694
|
|
|
7727
|
-
_this.loadPlayer = _this.loadPlayer.bind(_assertThisInitialized(_this));
|
|
7695
|
+
_this.loadPlayer = _this.loadPlayer.bind(_assertThisInitialized$1(_this));
|
|
7728
7696
|
return _this;
|
|
7729
7697
|
}
|
|
7730
7698
|
/**
|
|
@@ -7745,7 +7713,7 @@ function (_React$Component) {
|
|
|
7745
7713
|
var userSuccess = this.props.onSuccess;
|
|
7746
7714
|
var userFailure = this.props.onFailure;
|
|
7747
7715
|
|
|
7748
|
-
var options = _extends
|
|
7716
|
+
var options = _extends({}, this.props, {
|
|
7749
7717
|
refNode: this.refNode,
|
|
7750
7718
|
refNodeInsert: 'append',
|
|
7751
7719
|
onSuccess: function onSuccess(_ref) {
|
|
@@ -8054,7 +8022,7 @@ function (_React$Component) {
|
|
|
8054
8022
|
;
|
|
8055
8023
|
|
|
8056
8024
|
_proto.render = function render() {
|
|
8057
|
-
var props = _extends
|
|
8025
|
+
var props = _extends({
|
|
8058
8026
|
className: 'brightcove-react-player-loader'
|
|
8059
8027
|
}, this.props.attrs, {
|
|
8060
8028
|
ref: this.setRefNode
|
|
@@ -8468,11 +8436,17 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
|
8468
8436
|
|
|
8469
8437
|
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
8438
|
|
|
8471
|
-
function
|
|
8439
|
+
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; } } }; }
|
|
8440
|
+
|
|
8441
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
8472
8442
|
|
|
8473
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
|
|
8443
|
+
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."); }
|
|
8474
8444
|
|
|
8475
|
-
function
|
|
8445
|
+
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); }
|
|
8446
|
+
|
|
8447
|
+
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; }
|
|
8448
|
+
|
|
8449
|
+
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
8450
|
|
|
8477
8451
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
8478
8452
|
|
|
@@ -8602,12 +8576,12 @@ function getSDK(url, sdkGlobal) {
|
|
|
8602
8576
|
|
|
8603
8577
|
function getConfig(props$1, defaultProps, showWarning) {
|
|
8604
8578
|
var config = (0, _deepmerge["default"])(defaultProps.config, props$1.config);
|
|
8605
|
-
|
|
8606
|
-
var
|
|
8607
|
-
|
|
8579
|
+
|
|
8580
|
+
var _iterator = _createForOfIteratorHelper(props.DEPRECATED_CONFIG_PROPS),
|
|
8581
|
+
_step;
|
|
8608
8582
|
|
|
8609
8583
|
try {
|
|
8610
|
-
for (
|
|
8584
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
8611
8585
|
var p = _step.value;
|
|
8612
8586
|
|
|
8613
8587
|
if (props$1[p]) {
|
|
@@ -8622,18 +8596,9 @@ function getConfig(props$1, defaultProps, showWarning) {
|
|
|
8622
8596
|
}
|
|
8623
8597
|
}
|
|
8624
8598
|
} catch (err) {
|
|
8625
|
-
|
|
8626
|
-
_iteratorError = err;
|
|
8599
|
+
_iterator.e(err);
|
|
8627
8600
|
} finally {
|
|
8628
|
-
|
|
8629
|
-
if (!_iteratorNormalCompletion && _iterator["return"] != null) {
|
|
8630
|
-
_iterator["return"]();
|
|
8631
|
-
}
|
|
8632
|
-
} finally {
|
|
8633
|
-
if (_didIteratorError) {
|
|
8634
|
-
throw _iteratorError;
|
|
8635
|
-
}
|
|
8636
|
-
}
|
|
8601
|
+
_iterator.f();
|
|
8637
8602
|
}
|
|
8638
8603
|
|
|
8639
8604
|
return config;
|
|
@@ -8780,12 +8745,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
8780
8745
|
|
|
8781
8746
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
8782
8747
|
|
|
8783
|
-
function
|
|
8748
|
+
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
8749
|
|
|
8785
|
-
function
|
|
8750
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
8786
8751
|
|
|
8787
8752
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
8788
8753
|
|
|
8754
|
+
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; } }
|
|
8755
|
+
|
|
8756
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
8757
|
+
|
|
8789
8758
|
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
8759
|
|
|
8791
8760
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -8794,14 +8763,12 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
8794
8763
|
|
|
8795
8764
|
var SEEK_ON_PLAY_EXPIRY = 5000;
|
|
8796
8765
|
|
|
8797
|
-
var Player =
|
|
8798
|
-
/*#__PURE__*/
|
|
8799
|
-
function (_Component) {
|
|
8766
|
+
var Player = /*#__PURE__*/function (_Component) {
|
|
8800
8767
|
_inherits(Player, _Component);
|
|
8801
8768
|
|
|
8802
|
-
|
|
8803
|
-
var _getPrototypeOf2;
|
|
8769
|
+
var _super = _createSuper(Player);
|
|
8804
8770
|
|
|
8771
|
+
function Player() {
|
|
8805
8772
|
var _this;
|
|
8806
8773
|
|
|
8807
8774
|
_classCallCheck(this, Player);
|
|
@@ -8810,7 +8777,7 @@ function (_Component) {
|
|
|
8810
8777
|
_args[_key] = arguments[_key];
|
|
8811
8778
|
}
|
|
8812
8779
|
|
|
8813
|
-
_this =
|
|
8780
|
+
_this = _super.call.apply(_super, [this].concat(_args));
|
|
8814
8781
|
|
|
8815
8782
|
_defineProperty(_assertThisInitialized(_this), "mounted", false);
|
|
8816
8783
|
|
|
@@ -9135,7 +9102,7 @@ function (_Component) {
|
|
|
9135
9102
|
return null;
|
|
9136
9103
|
}
|
|
9137
9104
|
|
|
9138
|
-
return _react["default"].createElement(Player, _extends({}, this.props, {
|
|
9105
|
+
return /*#__PURE__*/_react["default"].createElement(Player, _extends({}, this.props, {
|
|
9139
9106
|
ref: this.ref,
|
|
9140
9107
|
onReady: this.handleReady,
|
|
9141
9108
|
onPlay: this.handlePlay,
|
|
@@ -9196,12 +9163,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
9196
9163
|
|
|
9197
9164
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
9198
9165
|
|
|
9199
|
-
function
|
|
9166
|
+
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
9167
|
|
|
9201
|
-
function
|
|
9168
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
9202
9169
|
|
|
9203
9170
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
9204
9171
|
|
|
9172
|
+
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; } }
|
|
9173
|
+
|
|
9174
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
9175
|
+
|
|
9205
9176
|
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
9177
|
|
|
9207
9178
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -9213,14 +9184,12 @@ var SUPPORTED_PROPS = Object.keys(props.propTypes);
|
|
|
9213
9184
|
function createSinglePlayer(activePlayer) {
|
|
9214
9185
|
var _class, _temp;
|
|
9215
9186
|
|
|
9216
|
-
return _temp = _class =
|
|
9217
|
-
/*#__PURE__*/
|
|
9218
|
-
function (_Component) {
|
|
9187
|
+
return _temp = _class = /*#__PURE__*/function (_Component) {
|
|
9219
9188
|
_inherits(SinglePlayer, _Component);
|
|
9220
9189
|
|
|
9221
|
-
|
|
9222
|
-
var _getPrototypeOf2;
|
|
9190
|
+
var _super = _createSuper(SinglePlayer);
|
|
9223
9191
|
|
|
9192
|
+
function SinglePlayer() {
|
|
9224
9193
|
var _this;
|
|
9225
9194
|
|
|
9226
9195
|
_classCallCheck(this, SinglePlayer);
|
|
@@ -9229,7 +9198,7 @@ function createSinglePlayer(activePlayer) {
|
|
|
9229
9198
|
args[_key] = arguments[_key];
|
|
9230
9199
|
}
|
|
9231
9200
|
|
|
9232
|
-
_this =
|
|
9201
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
9233
9202
|
|
|
9234
9203
|
_defineProperty(_assertThisInitialized(_this), "config", (0, utils.getConfig)(_this.props, props.defaultProps, true));
|
|
9235
9204
|
|
|
@@ -9297,12 +9266,12 @@ function createSinglePlayer(activePlayer) {
|
|
|
9297
9266
|
height = _this$props.height,
|
|
9298
9267
|
Wrapper = _this$props.wrapper;
|
|
9299
9268
|
var otherProps = (0, utils.omit)(this.props, SUPPORTED_PROPS, props.DEPRECATED_CONFIG_PROPS);
|
|
9300
|
-
return _react["default"].createElement(Wrapper, _extends({
|
|
9269
|
+
return /*#__PURE__*/_react["default"].createElement(Wrapper, _extends({
|
|
9301
9270
|
style: _objectSpread({}, style, {
|
|
9302
9271
|
width: width,
|
|
9303
9272
|
height: height
|
|
9304
9273
|
})
|
|
9305
|
-
}, otherProps), _react["default"].createElement(_Player["default"], _extends({}, this.props, {
|
|
9274
|
+
}, otherProps), /*#__PURE__*/_react["default"].createElement(_Player["default"], _extends({}, this.props, {
|
|
9306
9275
|
ref: this.ref,
|
|
9307
9276
|
activePlayer: activePlayer,
|
|
9308
9277
|
config: this.config
|
|
@@ -9348,23 +9317,31 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
9348
9317
|
|
|
9349
9318
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
9350
9319
|
|
|
9351
|
-
function
|
|
9320
|
+
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
9321
|
|
|
9353
|
-
function
|
|
9322
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
9354
9323
|
|
|
9355
9324
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
9356
9325
|
|
|
9326
|
+
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; } }
|
|
9327
|
+
|
|
9328
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
9329
|
+
|
|
9357
9330
|
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
9331
|
|
|
9359
9332
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
9360
9333
|
|
|
9361
9334
|
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
9335
|
|
|
9363
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
|
|
9336
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
9337
|
+
|
|
9338
|
+
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."); }
|
|
9339
|
+
|
|
9340
|
+
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); }
|
|
9364
9341
|
|
|
9365
|
-
function
|
|
9342
|
+
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; }
|
|
9366
9343
|
|
|
9367
|
-
function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr)
|
|
9344
|
+
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
9345
|
|
|
9369
9346
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
9370
9347
|
|
|
@@ -9389,14 +9366,12 @@ function parsePlaylist(url) {
|
|
|
9389
9366
|
return {};
|
|
9390
9367
|
}
|
|
9391
9368
|
|
|
9392
|
-
var YouTube =
|
|
9393
|
-
/*#__PURE__*/
|
|
9394
|
-
function (_Component) {
|
|
9369
|
+
var YouTube = /*#__PURE__*/function (_Component) {
|
|
9395
9370
|
_inherits(YouTube, _Component);
|
|
9396
9371
|
|
|
9397
|
-
|
|
9398
|
-
var _getPrototypeOf2;
|
|
9372
|
+
var _super = _createSuper(YouTube);
|
|
9399
9373
|
|
|
9374
|
+
function YouTube() {
|
|
9400
9375
|
var _this;
|
|
9401
9376
|
|
|
9402
9377
|
_classCallCheck(this, YouTube);
|
|
@@ -9405,7 +9380,7 @@ function (_Component) {
|
|
|
9405
9380
|
args[_key] = arguments[_key];
|
|
9406
9381
|
}
|
|
9407
9382
|
|
|
9408
|
-
_this =
|
|
9383
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
9409
9384
|
|
|
9410
9385
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
9411
9386
|
|
|
@@ -9593,9 +9568,9 @@ function (_Component) {
|
|
|
9593
9568
|
height: '100%',
|
|
9594
9569
|
display: display
|
|
9595
9570
|
};
|
|
9596
|
-
return _react["default"].createElement("div", {
|
|
9571
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
9597
9572
|
style: style
|
|
9598
|
-
}, _react["default"].createElement("div", {
|
|
9573
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
9599
9574
|
ref: this.ref
|
|
9600
9575
|
}));
|
|
9601
9576
|
}
|
|
@@ -9651,12 +9626,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
9651
9626
|
|
|
9652
9627
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
9653
9628
|
|
|
9654
|
-
function
|
|
9629
|
+
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
9630
|
|
|
9656
|
-
function
|
|
9631
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
9657
9632
|
|
|
9658
9633
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
9659
9634
|
|
|
9635
|
+
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; } }
|
|
9636
|
+
|
|
9637
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
9638
|
+
|
|
9660
9639
|
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
9640
|
|
|
9662
9641
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -9665,16 +9644,14 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
9665
9644
|
|
|
9666
9645
|
var SDK_URL = 'https://w.soundcloud.com/player/api.js';
|
|
9667
9646
|
var SDK_GLOBAL = 'SC';
|
|
9668
|
-
var MATCH_URL = /(soundcloud\.com|snd\.sc)
|
|
9647
|
+
var MATCH_URL = /(?:soundcloud\.com|snd\.sc)\/[^.]+$/;
|
|
9669
9648
|
|
|
9670
|
-
var SoundCloud =
|
|
9671
|
-
/*#__PURE__*/
|
|
9672
|
-
function (_Component) {
|
|
9649
|
+
var SoundCloud = /*#__PURE__*/function (_Component) {
|
|
9673
9650
|
_inherits(SoundCloud, _Component);
|
|
9674
9651
|
|
|
9675
|
-
|
|
9676
|
-
var _getPrototypeOf2;
|
|
9652
|
+
var _super = _createSuper(SoundCloud);
|
|
9677
9653
|
|
|
9654
|
+
function SoundCloud() {
|
|
9678
9655
|
var _this;
|
|
9679
9656
|
|
|
9680
9657
|
_classCallCheck(this, SoundCloud);
|
|
@@ -9683,7 +9660,7 @@ function (_Component) {
|
|
|
9683
9660
|
args[_key] = arguments[_key];
|
|
9684
9661
|
}
|
|
9685
9662
|
|
|
9686
|
-
_this =
|
|
9663
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
9687
9664
|
|
|
9688
9665
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
9689
9666
|
|
|
@@ -9804,7 +9781,7 @@ function (_Component) {
|
|
|
9804
9781
|
height: '100%',
|
|
9805
9782
|
display: display
|
|
9806
9783
|
};
|
|
9807
|
-
return _react["default"].createElement("iframe", {
|
|
9784
|
+
return /*#__PURE__*/_react["default"].createElement("iframe", {
|
|
9808
9785
|
ref: this.ref,
|
|
9809
9786
|
src: "https://w.soundcloud.com/player/?url=".concat(encodeURIComponent(this.props.url)),
|
|
9810
9787
|
style: style,
|
|
@@ -9866,12 +9843,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
9866
9843
|
|
|
9867
9844
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
9868
9845
|
|
|
9869
|
-
function
|
|
9846
|
+
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
9847
|
|
|
9871
|
-
function
|
|
9848
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
9872
9849
|
|
|
9873
9850
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
9874
9851
|
|
|
9852
|
+
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; } }
|
|
9853
|
+
|
|
9854
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
9855
|
+
|
|
9875
9856
|
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
9857
|
|
|
9877
9858
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -9883,14 +9864,12 @@ var SDK_GLOBAL = 'Vimeo';
|
|
|
9883
9864
|
var MATCH_URL = /vimeo\.com\/.+/;
|
|
9884
9865
|
var MATCH_FILE_URL = /vimeo\.com\/external\/[0-9]+\..+/;
|
|
9885
9866
|
|
|
9886
|
-
var Vimeo =
|
|
9887
|
-
/*#__PURE__*/
|
|
9888
|
-
function (_Component) {
|
|
9867
|
+
var Vimeo = /*#__PURE__*/function (_Component) {
|
|
9889
9868
|
_inherits(Vimeo, _Component);
|
|
9890
9869
|
|
|
9891
|
-
|
|
9892
|
-
var _getPrototypeOf2;
|
|
9870
|
+
var _super = _createSuper(Vimeo);
|
|
9893
9871
|
|
|
9872
|
+
function Vimeo() {
|
|
9894
9873
|
var _this;
|
|
9895
9874
|
|
|
9896
9875
|
_classCallCheck(this, Vimeo);
|
|
@@ -9899,7 +9878,7 @@ function (_Component) {
|
|
|
9899
9878
|
args[_key] = arguments[_key];
|
|
9900
9879
|
}
|
|
9901
9880
|
|
|
9902
|
-
_this =
|
|
9881
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
9903
9882
|
|
|
9904
9883
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
9905
9884
|
|
|
@@ -10056,7 +10035,7 @@ function (_Component) {
|
|
|
10056
10035
|
overflow: 'hidden',
|
|
10057
10036
|
display: display
|
|
10058
10037
|
};
|
|
10059
|
-
return _react["default"].createElement("div", {
|
|
10038
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
10060
10039
|
key: this.props.url,
|
|
10061
10040
|
ref: this.ref,
|
|
10062
10041
|
style: style
|
|
@@ -10116,12 +10095,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
10116
10095
|
|
|
10117
10096
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
10118
10097
|
|
|
10119
|
-
function
|
|
10098
|
+
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
10099
|
|
|
10121
|
-
function
|
|
10100
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
10122
10101
|
|
|
10123
10102
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
10124
10103
|
|
|
10104
|
+
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; } }
|
|
10105
|
+
|
|
10106
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
10107
|
+
|
|
10125
10108
|
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
10109
|
|
|
10127
10110
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -10134,14 +10117,12 @@ var SDK_GLOBAL_READY = 'fbAsyncInit';
|
|
|
10134
10117
|
var MATCH_URL = /^https?:\/\/(www\.)?facebook\.com.*\/(video(s)?|watch|story)(\.php?|\/).+$/;
|
|
10135
10118
|
var PLAYER_ID_PREFIX = 'facebook-player-';
|
|
10136
10119
|
|
|
10137
|
-
var Facebook =
|
|
10138
|
-
/*#__PURE__*/
|
|
10139
|
-
function (_Component) {
|
|
10120
|
+
var Facebook = /*#__PURE__*/function (_Component) {
|
|
10140
10121
|
_inherits(Facebook, _Component);
|
|
10141
10122
|
|
|
10142
|
-
|
|
10143
|
-
var _getPrototypeOf2;
|
|
10123
|
+
var _super = _createSuper(Facebook);
|
|
10144
10124
|
|
|
10125
|
+
function Facebook() {
|
|
10145
10126
|
var _this;
|
|
10146
10127
|
|
|
10147
10128
|
_classCallCheck(this, Facebook);
|
|
@@ -10150,7 +10131,7 @@ function (_Component) {
|
|
|
10150
10131
|
args[_key] = arguments[_key];
|
|
10151
10132
|
}
|
|
10152
10133
|
|
|
10153
|
-
_this =
|
|
10134
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
10154
10135
|
|
|
10155
10136
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
10156
10137
|
|
|
@@ -10266,7 +10247,7 @@ function (_Component) {
|
|
|
10266
10247
|
width: '100%',
|
|
10267
10248
|
height: '100%'
|
|
10268
10249
|
};
|
|
10269
|
-
return _react["default"].createElement("div", {
|
|
10250
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
10270
10251
|
style: style,
|
|
10271
10252
|
id: this.playerID,
|
|
10272
10253
|
className: "fb-video",
|
|
@@ -10326,12 +10307,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
10326
10307
|
|
|
10327
10308
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
10328
10309
|
|
|
10329
|
-
function
|
|
10310
|
+
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
10311
|
|
|
10331
|
-
function
|
|
10312
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
10332
10313
|
|
|
10333
10314
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
10334
10315
|
|
|
10316
|
+
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; } }
|
|
10317
|
+
|
|
10318
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
10319
|
+
|
|
10335
10320
|
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
10321
|
|
|
10337
10322
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -10342,14 +10327,12 @@ var SDK_URL = 'https://cdn.embed.ly/player-0.1.0.min.js';
|
|
|
10342
10327
|
var SDK_GLOBAL = 'playerjs';
|
|
10343
10328
|
var MATCH_URL = /streamable\.com\/([a-z0-9]+)$/;
|
|
10344
10329
|
|
|
10345
|
-
var Streamable =
|
|
10346
|
-
/*#__PURE__*/
|
|
10347
|
-
function (_Component) {
|
|
10330
|
+
var Streamable = /*#__PURE__*/function (_Component) {
|
|
10348
10331
|
_inherits(Streamable, _Component);
|
|
10349
10332
|
|
|
10350
|
-
|
|
10351
|
-
var _getPrototypeOf2;
|
|
10333
|
+
var _super = _createSuper(Streamable);
|
|
10352
10334
|
|
|
10335
|
+
function Streamable() {
|
|
10353
10336
|
var _this;
|
|
10354
10337
|
|
|
10355
10338
|
_classCallCheck(this, Streamable);
|
|
@@ -10358,7 +10341,7 @@ function (_Component) {
|
|
|
10358
10341
|
args[_key] = arguments[_key];
|
|
10359
10342
|
}
|
|
10360
10343
|
|
|
10361
|
-
_this =
|
|
10344
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
10362
10345
|
|
|
10363
10346
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
10364
10347
|
|
|
@@ -10478,7 +10461,7 @@ function (_Component) {
|
|
|
10478
10461
|
width: '100%',
|
|
10479
10462
|
height: '100%'
|
|
10480
10463
|
};
|
|
10481
|
-
return _react["default"].createElement("iframe", {
|
|
10464
|
+
return /*#__PURE__*/_react["default"].createElement("iframe", {
|
|
10482
10465
|
ref: this.ref,
|
|
10483
10466
|
src: "https://streamable.com/o/".concat(id),
|
|
10484
10467
|
frameBorder: "0",
|
|
@@ -10539,12 +10522,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
10539
10522
|
|
|
10540
10523
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
10541
10524
|
|
|
10542
|
-
function
|
|
10525
|
+
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
10526
|
|
|
10544
|
-
function
|
|
10527
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
10545
10528
|
|
|
10546
10529
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
10547
10530
|
|
|
10531
|
+
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; } }
|
|
10532
|
+
|
|
10533
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
10534
|
+
|
|
10548
10535
|
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
10536
|
|
|
10550
10537
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -10555,26 +10542,48 @@ var SDK_URL = 'https://fast.wistia.com/assets/external/E-v1.js';
|
|
|
10555
10542
|
var SDK_GLOBAL = 'Wistia';
|
|
10556
10543
|
var MATCH_URL = /(?:wistia\.com|wi\.st)\/(?:medias|embed)\/(.*)$/;
|
|
10557
10544
|
|
|
10558
|
-
var Wistia =
|
|
10559
|
-
/*#__PURE__*/
|
|
10560
|
-
function (_Component) {
|
|
10545
|
+
var Wistia = /*#__PURE__*/function (_Component) {
|
|
10561
10546
|
_inherits(Wistia, _Component);
|
|
10562
10547
|
|
|
10563
|
-
|
|
10564
|
-
var _getPrototypeOf2;
|
|
10548
|
+
var _super = _createSuper(Wistia);
|
|
10565
10549
|
|
|
10550
|
+
function Wistia() {
|
|
10566
10551
|
var _this;
|
|
10567
10552
|
|
|
10568
10553
|
_classCallCheck(this, Wistia);
|
|
10569
10554
|
|
|
10570
|
-
for (var _len = arguments.length,
|
|
10571
|
-
|
|
10555
|
+
for (var _len = arguments.length, _args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
10556
|
+
_args[_key] = arguments[_key];
|
|
10572
10557
|
}
|
|
10573
10558
|
|
|
10574
|
-
_this =
|
|
10559
|
+
_this = _super.call.apply(_super, [this].concat(_args));
|
|
10575
10560
|
|
|
10576
10561
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
10577
10562
|
|
|
10563
|
+
_defineProperty(_assertThisInitialized(_this), "onPlay", function () {
|
|
10564
|
+
var _this$props;
|
|
10565
|
+
|
|
10566
|
+
return (_this$props = _this.props).onPlay.apply(_this$props, arguments);
|
|
10567
|
+
});
|
|
10568
|
+
|
|
10569
|
+
_defineProperty(_assertThisInitialized(_this), "onPause", function () {
|
|
10570
|
+
var _this$props2;
|
|
10571
|
+
|
|
10572
|
+
return (_this$props2 = _this.props).onPause.apply(_this$props2, arguments);
|
|
10573
|
+
});
|
|
10574
|
+
|
|
10575
|
+
_defineProperty(_assertThisInitialized(_this), "onSeek", function () {
|
|
10576
|
+
var _this$props3;
|
|
10577
|
+
|
|
10578
|
+
return (_this$props3 = _this.props).onSeek.apply(_this$props3, arguments);
|
|
10579
|
+
});
|
|
10580
|
+
|
|
10581
|
+
_defineProperty(_assertThisInitialized(_this), "onEnded", function () {
|
|
10582
|
+
var _this$props4;
|
|
10583
|
+
|
|
10584
|
+
return (_this$props4 = _this.props).onEnded.apply(_this$props4, arguments);
|
|
10585
|
+
});
|
|
10586
|
+
|
|
10578
10587
|
_defineProperty(_assertThisInitialized(_this), "mute", function () {
|
|
10579
10588
|
_this.callPlayer('mute');
|
|
10580
10589
|
});
|
|
@@ -10596,17 +10605,13 @@ function (_Component) {
|
|
|
10596
10605
|
value: function load(url) {
|
|
10597
10606
|
var _this2 = this;
|
|
10598
10607
|
|
|
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;
|
|
10608
|
+
var _this$props5 = this.props,
|
|
10609
|
+
playing = _this$props5.playing,
|
|
10610
|
+
muted = _this$props5.muted,
|
|
10611
|
+
controls = _this$props5.controls,
|
|
10612
|
+
_onReady = _this$props5.onReady,
|
|
10613
|
+
config = _this$props5.config,
|
|
10614
|
+
onError = _this$props5.onError;
|
|
10610
10615
|
(0, utils.getSDK)(SDK_URL, SDK_GLOBAL).then(function () {
|
|
10611
10616
|
window._wq = window._wq || [];
|
|
10612
10617
|
|
|
@@ -10623,19 +10628,28 @@ function (_Component) {
|
|
|
10623
10628
|
|
|
10624
10629
|
_this2.unbind();
|
|
10625
10630
|
|
|
10626
|
-
_this2.player.bind('play', onPlay);
|
|
10631
|
+
_this2.player.bind('play', _this2.onPlay);
|
|
10627
10632
|
|
|
10628
|
-
_this2.player.bind('pause', onPause);
|
|
10633
|
+
_this2.player.bind('pause', _this2.onPause);
|
|
10629
10634
|
|
|
10630
|
-
_this2.player.bind('seek', onSeek);
|
|
10635
|
+
_this2.player.bind('seek', _this2.onSeek);
|
|
10631
10636
|
|
|
10632
|
-
_this2.player.bind('end', onEnded);
|
|
10637
|
+
_this2.player.bind('end', _this2.onEnded);
|
|
10633
10638
|
|
|
10634
10639
|
_onReady();
|
|
10635
10640
|
}
|
|
10636
10641
|
});
|
|
10637
10642
|
}, onError);
|
|
10638
10643
|
}
|
|
10644
|
+
}, {
|
|
10645
|
+
key: "unbind",
|
|
10646
|
+
value: function unbind() {
|
|
10647
|
+
this.player.unbind('play', this.onPlay);
|
|
10648
|
+
this.player.unbind('pause', this.onPause);
|
|
10649
|
+
this.player.unbind('seek', this.onSeek);
|
|
10650
|
+
this.player.unbind('end', this.onEnded);
|
|
10651
|
+
} // Proxy methods to prevent listener leaks
|
|
10652
|
+
|
|
10639
10653
|
}, {
|
|
10640
10654
|
key: "play",
|
|
10641
10655
|
value: function play() {
|
|
@@ -10646,19 +10660,6 @@ function (_Component) {
|
|
|
10646
10660
|
value: function pause() {
|
|
10647
10661
|
this.callPlayer('pause');
|
|
10648
10662
|
}
|
|
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
10663
|
}, {
|
|
10663
10664
|
key: "stop",
|
|
10664
10665
|
value: function stop() {
|
|
@@ -10704,7 +10705,7 @@ function (_Component) {
|
|
|
10704
10705
|
width: '100%',
|
|
10705
10706
|
height: '100%'
|
|
10706
10707
|
};
|
|
10707
|
-
return _react["default"].createElement("div", {
|
|
10708
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
10708
10709
|
key: id,
|
|
10709
10710
|
className: className,
|
|
10710
10711
|
style: style
|
|
@@ -10764,12 +10765,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
10764
10765
|
|
|
10765
10766
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
10766
10767
|
|
|
10767
|
-
function
|
|
10768
|
+
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
10769
|
|
|
10769
|
-
function
|
|
10770
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
10770
10771
|
|
|
10771
10772
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
10772
10773
|
|
|
10774
|
+
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; } }
|
|
10775
|
+
|
|
10776
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
10777
|
+
|
|
10773
10778
|
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
10779
|
|
|
10775
10780
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -10782,14 +10787,12 @@ var MATCH_VIDEO_URL = /(?:www\.|go\.)?twitch\.tv\/videos\/(\d+)($|\?)/;
|
|
|
10782
10787
|
var MATCH_CHANNEL_URL = /(?:www\.|go\.)?twitch\.tv\/([a-z0-9_]+)($|\?)/;
|
|
10783
10788
|
var PLAYER_ID_PREFIX = 'twitch-player-';
|
|
10784
10789
|
|
|
10785
|
-
var Twitch =
|
|
10786
|
-
/*#__PURE__*/
|
|
10787
|
-
function (_Component) {
|
|
10790
|
+
var Twitch = /*#__PURE__*/function (_Component) {
|
|
10788
10791
|
_inherits(Twitch, _Component);
|
|
10789
10792
|
|
|
10790
|
-
|
|
10791
|
-
var _getPrototypeOf2;
|
|
10793
|
+
var _super = _createSuper(Twitch);
|
|
10792
10794
|
|
|
10795
|
+
function Twitch() {
|
|
10793
10796
|
var _this;
|
|
10794
10797
|
|
|
10795
10798
|
_classCallCheck(this, Twitch);
|
|
@@ -10798,7 +10801,7 @@ function (_Component) {
|
|
|
10798
10801
|
args[_key] = arguments[_key];
|
|
10799
10802
|
}
|
|
10800
10803
|
|
|
10801
|
-
_this =
|
|
10804
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
10802
10805
|
|
|
10803
10806
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
10804
10807
|
|
|
@@ -10919,7 +10922,7 @@ function (_Component) {
|
|
|
10919
10922
|
width: '100%',
|
|
10920
10923
|
height: '100%'
|
|
10921
10924
|
};
|
|
10922
|
-
return _react["default"].createElement("div", {
|
|
10925
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
10923
10926
|
style: style,
|
|
10924
10927
|
id: this.playerID
|
|
10925
10928
|
});
|
|
@@ -10972,11 +10975,15 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
10972
10975
|
|
|
10973
10976
|
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
10977
|
|
|
10975
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
|
|
10978
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
10979
|
+
|
|
10980
|
+
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."); }
|
|
10976
10981
|
|
|
10977
|
-
function
|
|
10982
|
+
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); }
|
|
10978
10983
|
|
|
10979
|
-
function
|
|
10984
|
+
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; }
|
|
10985
|
+
|
|
10986
|
+
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
10987
|
|
|
10981
10988
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
10982
10989
|
|
|
@@ -10986,12 +10993,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
10986
10993
|
|
|
10987
10994
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
10988
10995
|
|
|
10989
|
-
function
|
|
10996
|
+
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
10997
|
|
|
10991
|
-
function
|
|
10998
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
10992
10999
|
|
|
10993
11000
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
10994
11001
|
|
|
11002
|
+
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; } }
|
|
11003
|
+
|
|
11004
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
11005
|
+
|
|
10995
11006
|
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
11007
|
|
|
10997
11008
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -11003,14 +11014,12 @@ var SDK_GLOBAL = 'DM';
|
|
|
11003
11014
|
var SDK_GLOBAL_READY = 'dmAsyncInit';
|
|
11004
11015
|
var MATCH_URL = /^(?:(?:https?):)?(?:\/\/)?(?:www\.)?(?:(?:dailymotion\.com(?:\/embed)?\/video)|dai\.ly)\/([a-zA-Z0-9]+)(?:_[\w_-]+)?$/;
|
|
11005
11016
|
|
|
11006
|
-
var DailyMotion =
|
|
11007
|
-
/*#__PURE__*/
|
|
11008
|
-
function (_Component) {
|
|
11017
|
+
var DailyMotion = /*#__PURE__*/function (_Component) {
|
|
11009
11018
|
_inherits(DailyMotion, _Component);
|
|
11010
11019
|
|
|
11011
|
-
|
|
11012
|
-
var _getPrototypeOf2;
|
|
11020
|
+
var _super = _createSuper(DailyMotion);
|
|
11013
11021
|
|
|
11022
|
+
function DailyMotion() {
|
|
11014
11023
|
var _this;
|
|
11015
11024
|
|
|
11016
11025
|
_classCallCheck(this, DailyMotion);
|
|
@@ -11019,7 +11028,7 @@ function (_Component) {
|
|
|
11019
11028
|
args[_key] = arguments[_key];
|
|
11020
11029
|
}
|
|
11021
11030
|
|
|
11022
|
-
_this =
|
|
11031
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
11023
11032
|
|
|
11024
11033
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
11025
11034
|
|
|
@@ -11148,9 +11157,9 @@ function (_Component) {
|
|
|
11148
11157
|
height: '100%',
|
|
11149
11158
|
display: display
|
|
11150
11159
|
};
|
|
11151
|
-
return _react["default"].createElement("div", {
|
|
11160
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
11152
11161
|
style: style
|
|
11153
|
-
}, _react["default"].createElement("div", {
|
|
11162
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
11154
11163
|
ref: this.ref
|
|
11155
11164
|
}));
|
|
11156
11165
|
}
|
|
@@ -11208,12 +11217,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
11208
11217
|
|
|
11209
11218
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
11210
11219
|
|
|
11211
|
-
function
|
|
11220
|
+
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
11221
|
|
|
11213
|
-
function
|
|
11222
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
11214
11223
|
|
|
11215
11224
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
11216
11225
|
|
|
11226
|
+
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; } }
|
|
11227
|
+
|
|
11228
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
11229
|
+
|
|
11217
11230
|
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
11231
|
|
|
11219
11232
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -11224,14 +11237,12 @@ var SDK_URL = 'https://widget.mixcloud.com/media/js/widgetApi.js';
|
|
|
11224
11237
|
var SDK_GLOBAL = 'Mixcloud';
|
|
11225
11238
|
var MATCH_URL = /mixcloud\.com\/([^/]+\/[^/]+)/;
|
|
11226
11239
|
|
|
11227
|
-
var Mixcloud =
|
|
11228
|
-
/*#__PURE__*/
|
|
11229
|
-
function (_Component) {
|
|
11240
|
+
var Mixcloud = /*#__PURE__*/function (_Component) {
|
|
11230
11241
|
_inherits(Mixcloud, _Component);
|
|
11231
11242
|
|
|
11232
|
-
|
|
11233
|
-
var _getPrototypeOf2;
|
|
11243
|
+
var _super = _createSuper(Mixcloud);
|
|
11234
11244
|
|
|
11245
|
+
function Mixcloud() {
|
|
11235
11246
|
var _this;
|
|
11236
11247
|
|
|
11237
11248
|
_classCallCheck(this, Mixcloud);
|
|
@@ -11240,7 +11251,7 @@ function (_Component) {
|
|
|
11240
11251
|
args[_key] = arguments[_key];
|
|
11241
11252
|
}
|
|
11242
11253
|
|
|
11243
|
-
_this =
|
|
11254
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
11244
11255
|
|
|
11245
11256
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
11246
11257
|
|
|
@@ -11343,7 +11354,7 @@ function (_Component) {
|
|
|
11343
11354
|
})); // We have to give the iframe a key here to prevent a
|
|
11344
11355
|
// weird dialog appearing when loading a new track
|
|
11345
11356
|
|
|
11346
|
-
return _react["default"].createElement("iframe", {
|
|
11357
|
+
return /*#__PURE__*/_react["default"].createElement("iframe", {
|
|
11347
11358
|
key: id,
|
|
11348
11359
|
ref: this.ref,
|
|
11349
11360
|
style: style,
|
|
@@ -11403,23 +11414,33 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
11403
11414
|
|
|
11404
11415
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
11405
11416
|
|
|
11406
|
-
function
|
|
11417
|
+
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
11418
|
|
|
11408
|
-
function
|
|
11419
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
11409
11420
|
|
|
11410
11421
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
11411
11422
|
|
|
11423
|
+
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; } }
|
|
11424
|
+
|
|
11425
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
11426
|
+
|
|
11412
11427
|
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
11428
|
|
|
11414
11429
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
11415
11430
|
|
|
11416
11431
|
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
11432
|
|
|
11433
|
+
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; } } }; }
|
|
11434
|
+
|
|
11435
|
+
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); }
|
|
11436
|
+
|
|
11437
|
+
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; }
|
|
11438
|
+
|
|
11418
11439
|
var IOS = typeof navigator !== 'undefined' && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
|
|
11419
11440
|
var AUDIO_EXTENSIONS = /\.(m4a|mp4a|mpga|mp2|mp2a|mp3|m2a|m3a|wav|weba|aac|oga|spx)($|\?)/i;
|
|
11420
11441
|
var VIDEO_EXTENSIONS = /\.(mp4|og[gv]|webm|mov|m4v)($|\?)/i;
|
|
11421
11442
|
var HLS_EXTENSIONS = /\.(m3u8)($|\?)/i;
|
|
11422
|
-
var HLS_SDK_URL = 'https://cdn.jsdelivr.net/npm/hls.js@VERSION';
|
|
11443
|
+
var HLS_SDK_URL = 'https://cdn.jsdelivr.net/npm/hls.js@VERSION/dist/hls.min.js';
|
|
11423
11444
|
var HLS_GLOBAL = 'Hls';
|
|
11424
11445
|
var DASH_EXTENSIONS = /\.(mpd)($|\?)/i;
|
|
11425
11446
|
var DASH_SDK_URL = 'https://cdnjs.cloudflare.com/ajax/libs/dashjs/VERSION/dash.all.min.js';
|
|
@@ -11428,12 +11449,11 @@ var MATCH_DROPBOX_URL = /www\.dropbox\.com\/.+/;
|
|
|
11428
11449
|
|
|
11429
11450
|
function canPlay(url) {
|
|
11430
11451
|
if (url instanceof Array) {
|
|
11431
|
-
var
|
|
11432
|
-
|
|
11433
|
-
var _iteratorError = undefined;
|
|
11452
|
+
var _iterator = _createForOfIteratorHelper(url),
|
|
11453
|
+
_step;
|
|
11434
11454
|
|
|
11435
11455
|
try {
|
|
11436
|
-
for (
|
|
11456
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
11437
11457
|
var item = _step.value;
|
|
11438
11458
|
|
|
11439
11459
|
if (typeof item === 'string' && canPlay(item)) {
|
|
@@ -11445,18 +11465,9 @@ function canPlay(url) {
|
|
|
11445
11465
|
}
|
|
11446
11466
|
}
|
|
11447
11467
|
} catch (err) {
|
|
11448
|
-
|
|
11449
|
-
_iteratorError = err;
|
|
11468
|
+
_iterator.e(err);
|
|
11450
11469
|
} finally {
|
|
11451
|
-
|
|
11452
|
-
if (!_iteratorNormalCompletion && _iterator["return"] != null) {
|
|
11453
|
-
_iterator["return"]();
|
|
11454
|
-
}
|
|
11455
|
-
} finally {
|
|
11456
|
-
if (_didIteratorError) {
|
|
11457
|
-
throw _iteratorError;
|
|
11458
|
-
}
|
|
11459
|
-
}
|
|
11470
|
+
_iterator.f();
|
|
11460
11471
|
}
|
|
11461
11472
|
|
|
11462
11473
|
return false;
|
|
@@ -11480,14 +11491,12 @@ function canEnablePIP(url) {
|
|
|
11480
11491
|
return canPlay(url) && (!!document.pictureInPictureEnabled || supportsWebKitPresentationMode()) && !AUDIO_EXTENSIONS.test(url);
|
|
11481
11492
|
}
|
|
11482
11493
|
|
|
11483
|
-
var FilePlayer =
|
|
11484
|
-
/*#__PURE__*/
|
|
11485
|
-
function (_Component) {
|
|
11494
|
+
var FilePlayer = /*#__PURE__*/function (_Component) {
|
|
11486
11495
|
_inherits(FilePlayer, _Component);
|
|
11487
11496
|
|
|
11488
|
-
|
|
11489
|
-
var _getPrototypeOf2;
|
|
11497
|
+
var _super = _createSuper(FilePlayer);
|
|
11490
11498
|
|
|
11499
|
+
function FilePlayer() {
|
|
11491
11500
|
var _this;
|
|
11492
11501
|
|
|
11493
11502
|
_classCallCheck(this, FilePlayer);
|
|
@@ -11496,7 +11505,7 @@ function (_Component) {
|
|
|
11496
11505
|
_args[_key] = arguments[_key];
|
|
11497
11506
|
}
|
|
11498
11507
|
|
|
11499
|
-
_this =
|
|
11508
|
+
_this = _super.call.apply(_super, [this].concat(_args));
|
|
11500
11509
|
|
|
11501
11510
|
_defineProperty(_assertThisInitialized(_this), "onReady", function () {
|
|
11502
11511
|
var _this$props;
|
|
@@ -11583,19 +11592,19 @@ function (_Component) {
|
|
|
11583
11592
|
|
|
11584
11593
|
_defineProperty(_assertThisInitialized(_this), "renderSourceElement", function (source, index) {
|
|
11585
11594
|
if (typeof source === 'string') {
|
|
11586
|
-
return _react["default"].createElement("source", {
|
|
11595
|
+
return /*#__PURE__*/_react["default"].createElement("source", {
|
|
11587
11596
|
key: index,
|
|
11588
11597
|
src: source
|
|
11589
11598
|
});
|
|
11590
11599
|
}
|
|
11591
11600
|
|
|
11592
|
-
return _react["default"].createElement("source", _extends({
|
|
11601
|
+
return /*#__PURE__*/_react["default"].createElement("source", _extends({
|
|
11593
11602
|
key: index
|
|
11594
11603
|
}, source));
|
|
11595
11604
|
});
|
|
11596
11605
|
|
|
11597
11606
|
_defineProperty(_assertThisInitialized(_this), "renderTrack", function (track, index) {
|
|
11598
|
-
return _react["default"].createElement("track", _extends({
|
|
11607
|
+
return /*#__PURE__*/_react["default"].createElement("track", _extends({
|
|
11599
11608
|
key: index
|
|
11600
11609
|
}, track));
|
|
11601
11610
|
});
|
|
@@ -11633,6 +11642,10 @@ function (_Component) {
|
|
|
11633
11642
|
key: "componentWillUnmount",
|
|
11634
11643
|
value: function componentWillUnmount() {
|
|
11635
11644
|
this.removeListeners(this.player);
|
|
11645
|
+
|
|
11646
|
+
if (this.hls) {
|
|
11647
|
+
this.hls.destroy();
|
|
11648
|
+
}
|
|
11636
11649
|
}
|
|
11637
11650
|
}, {
|
|
11638
11651
|
key: "addListeners",
|
|
@@ -11763,10 +11776,6 @@ function (_Component) {
|
|
|
11763
11776
|
value: function stop() {
|
|
11764
11777
|
this.player.removeAttribute('src');
|
|
11765
11778
|
|
|
11766
|
-
if (this.hls) {
|
|
11767
|
-
this.hls.destroy();
|
|
11768
|
-
}
|
|
11769
|
-
|
|
11770
11779
|
if (this.dash) {
|
|
11771
11780
|
this.dash.reset();
|
|
11772
11781
|
}
|
|
@@ -11878,7 +11887,7 @@ function (_Component) {
|
|
|
11878
11887
|
width: width === 'auto' ? width : '100%',
|
|
11879
11888
|
height: height === 'auto' ? height : '100%'
|
|
11880
11889
|
};
|
|
11881
|
-
return _react["default"].createElement(Element, _extends({
|
|
11890
|
+
return /*#__PURE__*/_react["default"].createElement(Element, _extends({
|
|
11882
11891
|
ref: this.ref,
|
|
11883
11892
|
src: this.getSource(url),
|
|
11884
11893
|
style: style,
|
|
@@ -11968,12 +11977,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
11968
11977
|
|
|
11969
11978
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
11970
11979
|
|
|
11971
|
-
function
|
|
11980
|
+
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
11981
|
|
|
11973
|
-
function
|
|
11982
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
11974
11983
|
|
|
11975
11984
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
11976
11985
|
|
|
11986
|
+
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; } }
|
|
11987
|
+
|
|
11988
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
11989
|
+
|
|
11977
11990
|
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
11991
|
|
|
11979
11992
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -11982,14 +11995,12 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
11982
11995
|
|
|
11983
11996
|
var ICON_SIZE = '64px';
|
|
11984
11997
|
|
|
11985
|
-
var Preview =
|
|
11986
|
-
/*#__PURE__*/
|
|
11987
|
-
function (_Component) {
|
|
11998
|
+
var Preview = /*#__PURE__*/function (_Component) {
|
|
11988
11999
|
_inherits(Preview, _Component);
|
|
11989
12000
|
|
|
11990
|
-
|
|
11991
|
-
var _getPrototypeOf2;
|
|
12001
|
+
var _super = _createSuper(Preview);
|
|
11992
12002
|
|
|
12003
|
+
function Preview() {
|
|
11993
12004
|
var _this;
|
|
11994
12005
|
|
|
11995
12006
|
_classCallCheck(this, Preview);
|
|
@@ -11998,7 +12009,7 @@ function (_Component) {
|
|
|
11998
12009
|
args[_key] = arguments[_key];
|
|
11999
12010
|
}
|
|
12000
12011
|
|
|
12001
|
-
_this =
|
|
12012
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
12002
12013
|
|
|
12003
12014
|
_defineProperty(_assertThisInitialized(_this), "mounted", false);
|
|
12004
12015
|
|
|
@@ -12096,15 +12107,15 @@ function (_Component) {
|
|
|
12096
12107
|
}
|
|
12097
12108
|
};
|
|
12098
12109
|
|
|
12099
|
-
var defaultPlayIcon = _react["default"].createElement("div", {
|
|
12110
|
+
var defaultPlayIcon = /*#__PURE__*/_react["default"].createElement("div", {
|
|
12100
12111
|
style: styles.shadow,
|
|
12101
12112
|
className: "react-player__shadow"
|
|
12102
|
-
}, _react["default"].createElement("div", {
|
|
12113
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
12103
12114
|
style: styles.playIcon,
|
|
12104
12115
|
className: "react-player__play-icon"
|
|
12105
12116
|
}));
|
|
12106
12117
|
|
|
12107
|
-
return _react["default"].createElement("div", {
|
|
12118
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
12108
12119
|
style: styles.preview,
|
|
12109
12120
|
className: "react-player__preview",
|
|
12110
12121
|
onClick: onClick
|
|
@@ -12141,6 +12152,12 @@ var _Player = _interopRequireDefault(Player_1);
|
|
|
12141
12152
|
|
|
12142
12153
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
12143
12154
|
|
|
12155
|
+
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; } } }; }
|
|
12156
|
+
|
|
12157
|
+
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); }
|
|
12158
|
+
|
|
12159
|
+
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; }
|
|
12160
|
+
|
|
12144
12161
|
var PRELOAD_PLAYERS = [{
|
|
12145
12162
|
Player: YouTube_1.YouTube,
|
|
12146
12163
|
configKey: 'youtube',
|
|
@@ -12161,16 +12178,16 @@ var PRELOAD_PLAYERS = [{
|
|
|
12161
12178
|
|
|
12162
12179
|
function renderPreloadPlayers(url, controls, config) {
|
|
12163
12180
|
var players = [];
|
|
12164
|
-
|
|
12165
|
-
var
|
|
12166
|
-
|
|
12181
|
+
|
|
12182
|
+
var _iterator = _createForOfIteratorHelper(PRELOAD_PLAYERS),
|
|
12183
|
+
_step;
|
|
12167
12184
|
|
|
12168
12185
|
try {
|
|
12169
|
-
for (
|
|
12186
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
12170
12187
|
var player = _step.value;
|
|
12171
12188
|
|
|
12172
12189
|
if (!player.Player.canPlay(url) && config[player.configKey].preload) {
|
|
12173
|
-
players.push(_react["default"].createElement(_Player["default"], {
|
|
12190
|
+
players.push( /*#__PURE__*/_react["default"].createElement(_Player["default"], {
|
|
12174
12191
|
key: player.Player.displayName,
|
|
12175
12192
|
activePlayer: player.Player,
|
|
12176
12193
|
url: player.url,
|
|
@@ -12182,18 +12199,9 @@ function renderPreloadPlayers(url, controls, config) {
|
|
|
12182
12199
|
}
|
|
12183
12200
|
}
|
|
12184
12201
|
} catch (err) {
|
|
12185
|
-
|
|
12186
|
-
_iteratorError = err;
|
|
12202
|
+
_iterator.e(err);
|
|
12187
12203
|
} finally {
|
|
12188
|
-
|
|
12189
|
-
if (!_iteratorNormalCompletion && _iterator["return"] != null) {
|
|
12190
|
-
_iterator["return"]();
|
|
12191
|
-
}
|
|
12192
|
-
} finally {
|
|
12193
|
-
if (_didIteratorError) {
|
|
12194
|
-
throw _iteratorError;
|
|
12195
|
-
}
|
|
12196
|
-
}
|
|
12204
|
+
_iterator.f();
|
|
12197
12205
|
}
|
|
12198
12206
|
|
|
12199
12207
|
return players;
|
|
@@ -12317,13 +12325,17 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
12317
12325
|
|
|
12318
12326
|
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
12327
|
|
|
12320
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }
|
|
12328
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
12329
|
+
|
|
12330
|
+
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."); }
|
|
12331
|
+
|
|
12332
|
+
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); }
|
|
12321
12333
|
|
|
12322
|
-
function
|
|
12334
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
|
|
12323
12335
|
|
|
12324
|
-
function
|
|
12336
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
12325
12337
|
|
|
12326
|
-
function
|
|
12338
|
+
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
12339
|
|
|
12328
12340
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
12329
12341
|
|
|
@@ -12331,12 +12343,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
12331
12343
|
|
|
12332
12344
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
12333
12345
|
|
|
12334
|
-
function
|
|
12346
|
+
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
12347
|
|
|
12336
|
-
function
|
|
12348
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
12337
12349
|
|
|
12338
12350
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
12339
12351
|
|
|
12352
|
+
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; } }
|
|
12353
|
+
|
|
12354
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
12355
|
+
|
|
12340
12356
|
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
12357
|
|
|
12342
12358
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -12346,14 +12362,12 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
12346
12362
|
var SUPPORTED_PROPS = Object.keys(props.propTypes);
|
|
12347
12363
|
var customPlayers = [];
|
|
12348
12364
|
|
|
12349
|
-
var ReactPlayer =
|
|
12350
|
-
/*#__PURE__*/
|
|
12351
|
-
function (_Component) {
|
|
12365
|
+
var ReactPlayer = /*#__PURE__*/function (_Component) {
|
|
12352
12366
|
_inherits(ReactPlayer, _Component);
|
|
12353
12367
|
|
|
12354
|
-
|
|
12355
|
-
var _getPrototypeOf2;
|
|
12368
|
+
var _super = _createSuper(ReactPlayer);
|
|
12356
12369
|
|
|
12370
|
+
function ReactPlayer() {
|
|
12357
12371
|
var _this;
|
|
12358
12372
|
|
|
12359
12373
|
_classCallCheck(this, ReactPlayer);
|
|
@@ -12362,7 +12376,7 @@ function (_Component) {
|
|
|
12362
12376
|
args[_key] = arguments[_key];
|
|
12363
12377
|
}
|
|
12364
12378
|
|
|
12365
|
-
_this =
|
|
12379
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
12366
12380
|
|
|
12367
12381
|
_defineProperty(_assertThisInitialized(_this), "config", (0, utils.getConfig)(_this.props, props.defaultProps, true));
|
|
12368
12382
|
|
|
@@ -12473,7 +12487,7 @@ function (_Component) {
|
|
|
12473
12487
|
key: "renderActivePlayer",
|
|
12474
12488
|
value: function renderActivePlayer(url, activePlayer) {
|
|
12475
12489
|
if (!url) return null;
|
|
12476
|
-
return _react["default"].createElement(_Player4["default"], _extends({}, this.props, {
|
|
12490
|
+
return /*#__PURE__*/_react["default"].createElement(_Player4["default"], _extends({}, this.props, {
|
|
12477
12491
|
key: activePlayer.displayName,
|
|
12478
12492
|
ref: this.activePlayerRef,
|
|
12479
12493
|
config: this.config,
|
|
@@ -12510,14 +12524,14 @@ function (_Component) {
|
|
|
12510
12524
|
var preloadPlayers = (0, _preload["default"])(url, controls, this.config);
|
|
12511
12525
|
var players = [renderedActivePlayer].concat(_toConsumableArray(preloadPlayers)).sort(this.sortPlayers);
|
|
12512
12526
|
|
|
12513
|
-
var preview = _react["default"].createElement(_Preview["default"], {
|
|
12527
|
+
var preview = /*#__PURE__*/_react["default"].createElement(_Preview["default"], {
|
|
12514
12528
|
url: url,
|
|
12515
12529
|
light: light,
|
|
12516
12530
|
playIcon: playIcon,
|
|
12517
12531
|
onClick: this.handleClickPreview
|
|
12518
12532
|
});
|
|
12519
12533
|
|
|
12520
|
-
return _react["default"].createElement(Wrapper, _extends({
|
|
12534
|
+
return /*#__PURE__*/_react["default"].createElement(Wrapper, _extends({
|
|
12521
12535
|
ref: this.wrapperRef,
|
|
12522
12536
|
style: _objectSpread({}, style, {
|
|
12523
12537
|
width: width,
|
|
@@ -13835,16 +13849,16 @@ var RelatedTopicsDropdown = function RelatedTopicsDropdown(_ref) {
|
|
|
13835
13849
|
_ref$className = _ref.className,
|
|
13836
13850
|
className = _ref$className === undefined ? '' : _ref$className;
|
|
13837
13851
|
|
|
13838
|
-
/*
|
|
13839
|
-
Props accepted - parentTaxonomy(required, object), subTaxonomy(required, array), page(optional), exclude(optional), variant(optional), className(optional)
|
|
13840
|
-
example:
|
|
13841
|
-
<RelatedTopicDropdown
|
|
13842
|
-
page='/clinical'
|
|
13843
|
-
exclude="clinical"
|
|
13844
|
-
className='mb-3'
|
|
13845
|
-
parentTaxonomy={props.parentTaxonomy}
|
|
13846
|
-
subTaxonomies={props.subTaxonomies}
|
|
13847
|
-
/>
|
|
13852
|
+
/*
|
|
13853
|
+
Props accepted - parentTaxonomy(required, object), subTaxonomy(required, array), page(optional), exclude(optional), variant(optional), className(optional)
|
|
13854
|
+
example:
|
|
13855
|
+
<RelatedTopicDropdown
|
|
13856
|
+
page='/clinical'
|
|
13857
|
+
exclude="clinical"
|
|
13858
|
+
className='mb-3'
|
|
13859
|
+
parentTaxonomy={props.parentTaxonomy}
|
|
13860
|
+
subTaxonomies={props.subTaxonomies}
|
|
13861
|
+
/>
|
|
13848
13862
|
*/
|
|
13849
13863
|
if (subTaxonomies.length === 0 && parentTaxonomy) {
|
|
13850
13864
|
if (parentTaxonomy.identifier == exclude) {
|
|
@@ -13882,19 +13896,19 @@ var RelatedTopicsDropdown = function RelatedTopicsDropdown(_ref) {
|
|
|
13882
13896
|
}
|
|
13883
13897
|
};
|
|
13884
13898
|
|
|
13885
|
-
/*
|
|
13886
|
-
This dropdown is used inside Article body to display related content placement pages
|
|
13887
|
-
sample usage: <ArticleDetailDropdown contentPlacement={content_placement} exclude={['News',]} />
|
|
13888
|
-
|
|
13889
|
-
in article query, need to add '...' to content_placement to retreive additional info needed
|
|
13890
|
-
|
|
13891
|
-
'content_placement': taxonomyMapping[]-> {
|
|
13892
|
-
...,
|
|
13893
|
-
'ancestor': parent->parent->identifier,
|
|
13894
|
-
'parent': parent->identifier,
|
|
13895
|
-
'path': identifier
|
|
13896
|
-
}
|
|
13897
|
-
|
|
13899
|
+
/*
|
|
13900
|
+
This dropdown is used inside Article body to display related content placement pages
|
|
13901
|
+
sample usage: <ArticleDetailDropdown contentPlacement={content_placement} exclude={['News',]} />
|
|
13902
|
+
|
|
13903
|
+
in article query, need to add '...' to content_placement to retreive additional info needed
|
|
13904
|
+
|
|
13905
|
+
'content_placement': taxonomyMapping[]-> {
|
|
13906
|
+
...,
|
|
13907
|
+
'ancestor': parent->parent->identifier,
|
|
13908
|
+
'parent': parent->identifier,
|
|
13909
|
+
'path': identifier
|
|
13910
|
+
}
|
|
13911
|
+
|
|
13898
13912
|
*/
|
|
13899
13913
|
|
|
13900
13914
|
var ArticleDetailDropdown = function ArticleDetailDropdown(props) {
|
|
@@ -14727,34 +14741,34 @@ var GridHero = function GridHero(props) {
|
|
|
14727
14741
|
);
|
|
14728
14742
|
};
|
|
14729
14743
|
|
|
14730
|
-
/*
|
|
14731
|
-
Sample query
|
|
14732
|
-
let references = ''
|
|
14733
|
-
if(article.taxonomyMapping.length > 0){
|
|
14734
|
-
article.taxonomyMapping.forEach((ref, index) => {
|
|
14735
|
-
references = references + `references('${ref._ref}') `
|
|
14736
|
-
if(index+1 !== article.taxonomyMapping.length){
|
|
14737
|
-
references = references + ` && `
|
|
14738
|
-
}
|
|
14739
|
-
})
|
|
14740
|
-
}
|
|
14741
|
-
|
|
14742
|
-
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] {
|
|
14743
|
-
...,
|
|
14744
|
-
title,
|
|
14745
|
-
summary,
|
|
14746
|
-
thumbnail,
|
|
14747
|
-
url,
|
|
14748
|
-
published,
|
|
14749
|
-
authorMapping[]->,
|
|
14750
|
-
contentCategory->
|
|
14751
|
-
}`
|
|
14752
|
-
const relatedArticles = await client.fetch(relatedArticlesQuery)
|
|
14753
|
-
|
|
14754
|
-
Sample usage
|
|
14755
|
-
<RelatedContent dataRecord={props.relatedArticles} client={client} showAuthor showPublished reverse/>
|
|
14756
|
-
|
|
14757
|
-
|
|
14744
|
+
/*
|
|
14745
|
+
Sample query
|
|
14746
|
+
let references = ''
|
|
14747
|
+
if(article.taxonomyMapping.length > 0){
|
|
14748
|
+
article.taxonomyMapping.forEach((ref, index) => {
|
|
14749
|
+
references = references + `references('${ref._ref}') `
|
|
14750
|
+
if(index+1 !== article.taxonomyMapping.length){
|
|
14751
|
+
references = references + ` && `
|
|
14752
|
+
}
|
|
14753
|
+
})
|
|
14754
|
+
}
|
|
14755
|
+
|
|
14756
|
+
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] {
|
|
14757
|
+
...,
|
|
14758
|
+
title,
|
|
14759
|
+
summary,
|
|
14760
|
+
thumbnail,
|
|
14761
|
+
url,
|
|
14762
|
+
published,
|
|
14763
|
+
authorMapping[]->,
|
|
14764
|
+
contentCategory->
|
|
14765
|
+
}`
|
|
14766
|
+
const relatedArticles = await client.fetch(relatedArticlesQuery)
|
|
14767
|
+
|
|
14768
|
+
Sample usage
|
|
14769
|
+
<RelatedContent dataRecord={props.relatedArticles} client={client} showAuthor showPublished reverse/>
|
|
14770
|
+
|
|
14771
|
+
|
|
14758
14772
|
*/
|
|
14759
14773
|
var RelatedContent = function RelatedContent(props) {
|
|
14760
14774
|
var client = props.client,
|
|
@@ -14821,21 +14835,21 @@ var RelatedContent = function RelatedContent(props) {
|
|
|
14821
14835
|
);
|
|
14822
14836
|
};
|
|
14823
14837
|
|
|
14824
|
-
/*
|
|
14825
|
-
Example usage - targetedonc.com/latest-conference
|
|
14826
|
-
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] {
|
|
14827
|
-
...,
|
|
14828
|
-
title,
|
|
14829
|
-
summary,
|
|
14830
|
-
thumbnail,
|
|
14831
|
-
url,
|
|
14832
|
-
published,
|
|
14833
|
-
documentGroup->,
|
|
14834
|
-
contentCategory->,
|
|
14835
|
-
'pageNumber': ${currentPage}
|
|
14836
|
-
}`
|
|
14837
|
-
|
|
14838
|
-
const posts = await client.fetch(query, params)
|
|
14838
|
+
/*
|
|
14839
|
+
Example usage - targetedonc.com/latest-conference
|
|
14840
|
+
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] {
|
|
14841
|
+
...,
|
|
14842
|
+
title,
|
|
14843
|
+
summary,
|
|
14844
|
+
thumbnail,
|
|
14845
|
+
url,
|
|
14846
|
+
published,
|
|
14847
|
+
documentGroup->,
|
|
14848
|
+
contentCategory->,
|
|
14849
|
+
'pageNumber': ${currentPage}
|
|
14850
|
+
}`
|
|
14851
|
+
|
|
14852
|
+
const posts = await client.fetch(query, params)
|
|
14839
14853
|
*/
|
|
14840
14854
|
|
|
14841
14855
|
var ConferenceArticleCard = function ConferenceArticleCard(props) {
|
|
@@ -15462,27 +15476,27 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
15462
15476
|
};
|
|
15463
15477
|
|
|
15464
15478
|
var KMTracker = function KMTracker(props) {
|
|
15465
|
-
|
|
15479
|
+
var id = props.id;
|
|
15466
15480
|
|
|
15467
|
-
|
|
15481
|
+
if (document) {
|
|
15468
15482
|
(function () {
|
|
15469
|
-
|
|
15483
|
+
var ecnJquery = document.createElement('script');
|
|
15470
15484
|
|
|
15471
|
-
|
|
15472
|
-
|
|
15473
|
-
|
|
15485
|
+
ecnJquery.type = 'text/javascript';
|
|
15486
|
+
ecnJquery.async = true;
|
|
15487
|
+
ecnJquery.src = 'https://apidt.ecn5.com/ECN_jQuery.min.js';
|
|
15474
15488
|
|
|
15475
|
-
|
|
15489
|
+
var ecnScript = document.createElement('script');
|
|
15476
15490
|
|
|
15477
|
-
|
|
15478
|
-
|
|
15479
|
-
|
|
15480
|
-
|
|
15491
|
+
ecnScript.type = 'text/javascript';
|
|
15492
|
+
ecnScript.async = true;
|
|
15493
|
+
ecnScript.id = 'km-tracker';
|
|
15494
|
+
ecnScript.src = 'https://apidt.ecn5.com/ECN_tracker_Secure.js?TrackerKey=' + id;
|
|
15481
15495
|
|
|
15482
|
-
|
|
15483
|
-
|
|
15484
|
-
|
|
15485
|
-
|
|
15496
|
+
document.head.appendChild(ecnJquery);
|
|
15497
|
+
document.head.appendChild(ecnScript);
|
|
15498
|
+
})();
|
|
15499
|
+
}
|
|
15486
15500
|
};
|
|
15487
15501
|
|
|
15488
15502
|
exports.AdSlot = AdSlot.DFPAdSlot;
|