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