@mjhls/mjh-framework 1.0.249 → 1.0.251
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +171 -171
- package/dist/cjs/{AdSlot-a79ba074.js → AdSlot-9f3af35d.js} +30 -21
- package/dist/cjs/DeckContent.js +10 -10
- package/dist/cjs/DeckQueue.js +1 -1
- package/dist/cjs/{GridContent-e6c8fb75.js → GridContent-007573a0.js} +3 -3
- package/dist/cjs/GridContent.js +3 -3
- package/dist/cjs/IssueContentDeck.js +1 -1
- package/dist/cjs/IssueDeck.js +1 -1
- package/dist/cjs/MasterDeck.js +9 -9
- package/dist/cjs/{Normal-2ee1925d.js → Normal-503df349.js} +30 -30
- package/dist/cjs/PublicationDeck.js +1 -1
- package/dist/cjs/QueueDeckExpanded.js +1 -1
- package/dist/cjs/{TaxonomyCard-b5074d6e.js → TaxonomyCard-e3566492.js} +1 -1
- package/dist/cjs/TaxonomyCard.js +2 -2
- package/dist/cjs/TemplateNormal.js +2 -2
- package/dist/cjs/ThumbnailCard.js +1 -1
- package/dist/cjs/VideoSeriesListing.js +1 -1
- package/dist/cjs/{YoutubeGroup-fd44f8a0.js → YoutubeGroup-5f480446.js} +4 -4
- package/dist/cjs/YoutubeGroup.js +1 -1
- package/dist/cjs/{index-39beccb3.js → index-be0c82be.js} +1 -2
- package/dist/cjs/index.js +787 -613
- package/dist/esm/{AdSlot-fb853576.js → AdSlot-0f82b407.js} +30 -21
- package/dist/esm/DeckContent.js +10 -10
- package/dist/esm/DeckQueue.js +1 -1
- package/dist/esm/{GridContent-3711b837.js → GridContent-9e96754b.js} +2 -2
- package/dist/esm/GridContent.js +3 -3
- package/dist/esm/IssueContentDeck.js +1 -1
- package/dist/esm/IssueDeck.js +1 -1
- package/dist/esm/MasterDeck.js +9 -9
- package/dist/esm/{Normal-b0b212a3.js → Normal-dfda02dc.js} +30 -30
- package/dist/esm/PublicationDeck.js +1 -1
- package/dist/esm/QueueDeckExpanded.js +1 -1
- package/dist/esm/{TaxonomyCard-ee1a22ae.js → TaxonomyCard-2d0ab635.js} +1 -1
- package/dist/esm/TaxonomyCard.js +2 -2
- package/dist/esm/TemplateNormal.js +2 -2
- package/dist/esm/ThumbnailCard.js +1 -1
- package/dist/esm/VideoSeriesListing.js +1 -1
- package/dist/esm/{YoutubeGroup-1b3eca73.js → YoutubeGroup-78d93d44.js} +4 -4
- package/dist/esm/YoutubeGroup.js +1 -1
- package/dist/esm/{index-3849e3fe.js → index-73819142.js} +1 -2
- package/dist/esm/index.js +789 -618
- package/package.json +102 -102
package/dist/esm/index.js
CHANGED
|
@@ -18,25 +18,25 @@ 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-73819142.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';
|
|
25
|
-
import { _ as _JSON$stringify, a as _asyncToGenerator, r as regenerator, D as DFPAdSlot, B as Beam } from './AdSlot-
|
|
26
|
-
export { D as AdSlot, B as Beam } from './AdSlot-
|
|
25
|
+
import { _ as _JSON$stringify, a as _asyncToGenerator, r as regenerator, D as DFPAdSlot, B as Beam } from './AdSlot-0f82b407.js';
|
|
26
|
+
export { D as AdSlot, B as Beam } from './AdSlot-0f82b407.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-9e96754b.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-2d0ab635.js';
|
|
35
|
+
export { T as TaxonomyCard } from './TaxonomyCard-2d0ab635.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-78d93d44.js';
|
|
39
|
+
export { Y as YoutubeGroup } from './YoutubeGroup-78d93d44.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-dfda02dc.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-dfda02dc.js';
|
|
53
53
|
import 'react-bootstrap/ListGroup';
|
|
54
54
|
import Head from 'next/head';
|
|
55
55
|
import Accordion from 'react-bootstrap/Accordion';
|
|
@@ -60,6 +60,7 @@ import 'react-bootstrap/Navbar';
|
|
|
60
60
|
import 'react-bootstrap/NavDropdown';
|
|
61
61
|
import 'react-bootstrap/Form';
|
|
62
62
|
import 'react-bootstrap/FormControl';
|
|
63
|
+
import Modal from 'react-bootstrap/Modal';
|
|
63
64
|
import Pagination from 'react-bootstrap/Pagination';
|
|
64
65
|
import Carousel$1 from 'react-bootstrap/Carousel';
|
|
65
66
|
import Breadcrumb from 'react-bootstrap/Breadcrumb';
|
|
@@ -2837,6 +2838,210 @@ var AdSlotsProvider = function AdSlotsProvider(_ref) {
|
|
|
2837
2838
|
);
|
|
2838
2839
|
};
|
|
2839
2840
|
|
|
2841
|
+
var ADFloatingFooter = function ADFloatingFooter(_ref) {
|
|
2842
|
+
var title = _ref.title,
|
|
2843
|
+
floatingAd = _ref.floatingAd,
|
|
2844
|
+
minScreenWidth = _ref.minScreenWidth;
|
|
2845
|
+
var className = floatingAd.className,
|
|
2846
|
+
slotId = floatingAd.slotId,
|
|
2847
|
+
adUnit = floatingAd.adUnit,
|
|
2848
|
+
_floatingAd$targeting = floatingAd.targeting,
|
|
2849
|
+
targeting = _floatingAd$targeting === undefined ? {} : _floatingAd$targeting,
|
|
2850
|
+
position = floatingAd.position,
|
|
2851
|
+
networkID = floatingAd.networkID,
|
|
2852
|
+
sizes = floatingAd.sizes;
|
|
2853
|
+
|
|
2854
|
+
var _useState = useState(false),
|
|
2855
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
2856
|
+
showAd = _useState2[0],
|
|
2857
|
+
setShowAd = _useState2[1];
|
|
2858
|
+
|
|
2859
|
+
var adTargeting = void 0;
|
|
2860
|
+
if (position && position.length > 0) {
|
|
2861
|
+
adTargeting = {
|
|
2862
|
+
content_placement: targeting.content_placement,
|
|
2863
|
+
document_url: targeting.document_url,
|
|
2864
|
+
pos: [position]
|
|
2865
|
+
};
|
|
2866
|
+
}
|
|
2867
|
+
|
|
2868
|
+
useEffect(function () {
|
|
2869
|
+
if (window && window.innerWidth >= minScreenWidth) {
|
|
2870
|
+
setShowAd(true);
|
|
2871
|
+
}
|
|
2872
|
+
}, [minScreenWidth]);
|
|
2873
|
+
|
|
2874
|
+
return React__default.createElement(
|
|
2875
|
+
React__default.Fragment,
|
|
2876
|
+
null,
|
|
2877
|
+
showAd && React__default.createElement(
|
|
2878
|
+
'div',
|
|
2879
|
+
{ className: 'floating-ad-wrapper ' + title },
|
|
2880
|
+
React__default.createElement(DFPAdSlot, { className: className, slotId: slotId, networkID: networkID, sizes: sizes, adUnit: adUnit, targeting: adTargeting, refreshFlag: false }),
|
|
2881
|
+
React__default.createElement(
|
|
2882
|
+
'div',
|
|
2883
|
+
{ className: 'closeButton', onClick: function onClick() {
|
|
2884
|
+
return setShowAd(false);
|
|
2885
|
+
} },
|
|
2886
|
+
'x'
|
|
2887
|
+
)
|
|
2888
|
+
),
|
|
2889
|
+
React__default.createElement(
|
|
2890
|
+
'style',
|
|
2891
|
+
{ jsx: 'true' },
|
|
2892
|
+
'\n .floating-ad-wrapper {\n width: auto;\n margin: 0;\n background-color: #f5f5f5;\n position: fixed;\n bottom: 0;\n left: 50%;\n transform: translateX(-50%);\n z-index: 9000;\n }\n .closeButton {\n position: absolute;\n top: -10px;\n right: -10px;\n background: grey;\n color: white;\n font-weight: 500;\n border: 2px solid white;\n border-radius: 50%;\n width: 30px;\n height: 30px;\n text-align: center;\n font-size: 17px;\n cursor: pointer;\n }\n '
|
|
2893
|
+
)
|
|
2894
|
+
);
|
|
2895
|
+
};
|
|
2896
|
+
|
|
2897
|
+
var ADGutter = function ADGutter(_ref) {
|
|
2898
|
+
var title = _ref.title,
|
|
2899
|
+
gutterAd = _ref.gutterAd,
|
|
2900
|
+
minScreenWidth = _ref.minScreenWidth;
|
|
2901
|
+
var className = gutterAd.className,
|
|
2902
|
+
slotId = gutterAd.slotId,
|
|
2903
|
+
adUnit = gutterAd.adUnit,
|
|
2904
|
+
_gutterAd$targeting = gutterAd.targeting,
|
|
2905
|
+
targeting = _gutterAd$targeting === undefined ? {} : _gutterAd$targeting,
|
|
2906
|
+
position = gutterAd.position,
|
|
2907
|
+
networkID = gutterAd.networkID,
|
|
2908
|
+
sizes = gutterAd.sizes;
|
|
2909
|
+
|
|
2910
|
+
var _useState = useState(false),
|
|
2911
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
2912
|
+
showAd = _useState2[0],
|
|
2913
|
+
setShowAd = _useState2[1];
|
|
2914
|
+
|
|
2915
|
+
var adTargeting = void 0;
|
|
2916
|
+
if (position && position.length > 0) {
|
|
2917
|
+
adTargeting = {
|
|
2918
|
+
content_placement: targeting.content_placement,
|
|
2919
|
+
document_url: targeting.document_url,
|
|
2920
|
+
pos: [position]
|
|
2921
|
+
};
|
|
2922
|
+
}
|
|
2923
|
+
|
|
2924
|
+
useEffect(function () {
|
|
2925
|
+
if (window && window.innerWidth >= minScreenWidth) {
|
|
2926
|
+
setShowAd(true);
|
|
2927
|
+
}
|
|
2928
|
+
}, [minScreenWidth]);
|
|
2929
|
+
|
|
2930
|
+
if (showAd) {
|
|
2931
|
+
return React__default.createElement(
|
|
2932
|
+
React__default.Fragment,
|
|
2933
|
+
null,
|
|
2934
|
+
showAd && React__default.createElement(
|
|
2935
|
+
'div',
|
|
2936
|
+
{ className: 'gutter-ad-wrapper ' + title },
|
|
2937
|
+
React__default.createElement(
|
|
2938
|
+
'div',
|
|
2939
|
+
{ className: 'gutter-ad' },
|
|
2940
|
+
React__default.createElement(DFPAdSlot, { className: className, slotId: slotId, networkID: networkID, sizes: sizes, adUnit: adUnit, targeting: adTargeting, refreshFlag: false })
|
|
2941
|
+
)
|
|
2942
|
+
),
|
|
2943
|
+
React__default.createElement(
|
|
2944
|
+
'style',
|
|
2945
|
+
{ jsx: 'true' },
|
|
2946
|
+
'\n .gutter-ad-wrapper {\n position: fixed;\n width: 100%;\n height: 100%;\n z-index: 999;\n }\n .gutter-ad {\n width: 150px;\n position: relative;\n top: 50;\n }\n '
|
|
2947
|
+
)
|
|
2948
|
+
);
|
|
2949
|
+
} else return null;
|
|
2950
|
+
};
|
|
2951
|
+
|
|
2952
|
+
var ADWelcome = function ADWelcome(_ref) {
|
|
2953
|
+
var title = _ref.title,
|
|
2954
|
+
welcomeAd = _ref.welcomeAd,
|
|
2955
|
+
setFlag = _ref.setFlag,
|
|
2956
|
+
Website = _ref.Website,
|
|
2957
|
+
counter = _ref.counter;
|
|
2958
|
+
var className = welcomeAd.className,
|
|
2959
|
+
slotId = welcomeAd.slotId,
|
|
2960
|
+
adUnit = welcomeAd.adUnit,
|
|
2961
|
+
_welcomeAd$targeting = welcomeAd.targeting,
|
|
2962
|
+
targeting = _welcomeAd$targeting === undefined ? {} : _welcomeAd$targeting,
|
|
2963
|
+
position = welcomeAd.position,
|
|
2964
|
+
networkID = welcomeAd.networkID,
|
|
2965
|
+
sizes = welcomeAd.sizes;
|
|
2966
|
+
|
|
2967
|
+
|
|
2968
|
+
var adTargeting = void 0;
|
|
2969
|
+
if (position && position.length > 0) {
|
|
2970
|
+
adTargeting = {
|
|
2971
|
+
content_placement: targeting.content_placement,
|
|
2972
|
+
document_url: targeting.document_url,
|
|
2973
|
+
pos: [position]
|
|
2974
|
+
};
|
|
2975
|
+
}
|
|
2976
|
+
|
|
2977
|
+
var calculateTimeLeft = function calculateTimeLeft(timeLeft) {
|
|
2978
|
+
return --timeLeft;
|
|
2979
|
+
};
|
|
2980
|
+
|
|
2981
|
+
var _useState = useState(calculateTimeLeft(counter)),
|
|
2982
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
2983
|
+
timeLeft = _useState2[0],
|
|
2984
|
+
setTimeLeft = _useState2[1];
|
|
2985
|
+
|
|
2986
|
+
useEffect(function () {
|
|
2987
|
+
if (timeLeft > 0) {
|
|
2988
|
+
setTimeout(function () {
|
|
2989
|
+
setTimeLeft(calculateTimeLeft(timeLeft));
|
|
2990
|
+
}, 1000);
|
|
2991
|
+
} else {
|
|
2992
|
+
setFlag(true);
|
|
2993
|
+
}
|
|
2994
|
+
});
|
|
2995
|
+
|
|
2996
|
+
return React__default.createElement(
|
|
2997
|
+
Modal,
|
|
2998
|
+
{ show: true, 'aria-labelledby': 'contained-modal-title-vcenter', backdrop: 'static', style: { outline: 'none' }, dialogClassName: 'welcome-modal' },
|
|
2999
|
+
React__default.createElement(
|
|
3000
|
+
'div',
|
|
3001
|
+
{ className: 'right-top', style: { position: 'absolute', top: 0, right: 0, textAlign: 'center', margin: '2rem' } },
|
|
3002
|
+
React__default.createElement(
|
|
3003
|
+
'span',
|
|
3004
|
+
{
|
|
3005
|
+
className: 'continue-site',
|
|
3006
|
+
style: {
|
|
3007
|
+
fontSize: '1.2rem',
|
|
3008
|
+
fontWeight: 'bold',
|
|
3009
|
+
fontFamily: "'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'"
|
|
3010
|
+
},
|
|
3011
|
+
onClick: function onClick() {
|
|
3012
|
+
setFlag(true);
|
|
3013
|
+
} },
|
|
3014
|
+
'CONTINUE TO SITE >'
|
|
3015
|
+
),
|
|
3016
|
+
React__default.createElement(
|
|
3017
|
+
'p',
|
|
3018
|
+
{
|
|
3019
|
+
style: {
|
|
3020
|
+
fontSize: '0.8rem',
|
|
3021
|
+
fontFamily: "'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'"
|
|
3022
|
+
},
|
|
3023
|
+
className: 'timer-block' },
|
|
3024
|
+
'OR WAIT ' + timeLeft + ' SECS'
|
|
3025
|
+
)
|
|
3026
|
+
),
|
|
3027
|
+
React__default.createElement(
|
|
3028
|
+
'div',
|
|
3029
|
+
{ className: 'left-top', style: { position: 'absolute', top: 0, left: 0, maxWidth: '200px', margin: '2rem' } },
|
|
3030
|
+
React__default.createElement('img', { style: { width: '100%' }, src: Website.logo, alt: Website.title })
|
|
3031
|
+
),
|
|
3032
|
+
React__default.createElement(
|
|
3033
|
+
Modal.Body,
|
|
3034
|
+
{ className: title, style: { position: 'relative', width: '300px', height: '250px', margin: 'auto', top: '10rem' } },
|
|
3035
|
+
React__default.createElement(DFPAdSlot, { className: className, slotId: slotId, networkID: networkID, sizes: sizes, adUnit: adUnit, targeting: adTargeting, refreshFlag: false })
|
|
3036
|
+
),
|
|
3037
|
+
React__default.createElement(
|
|
3038
|
+
'style',
|
|
3039
|
+
{ jsx: 'true' },
|
|
3040
|
+
'\n .continue-site:hover {\n cursor: pointer;\n }\n\n @media (min-width: 1200px) {\n .modal-backdrop {\n display: block;\n }\n .modal-content {\n display: block;\n }\n }\n '
|
|
3041
|
+
)
|
|
3042
|
+
);
|
|
3043
|
+
};
|
|
3044
|
+
|
|
2840
3045
|
var urlFor$1 = function urlFor(source, client) {
|
|
2841
3046
|
var builder = imageUrlBuilder(client);
|
|
2842
3047
|
return builder.image(source).auto('format');
|
|
@@ -3046,18 +3251,21 @@ var Slideshow = function Slideshow(_ref) {
|
|
|
3046
3251
|
);
|
|
3047
3252
|
};
|
|
3048
3253
|
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3254
|
+
var isArray = Array.isArray;
|
|
3255
|
+
var keyList = Object.keys;
|
|
3256
|
+
var hasProp = Object.prototype.hasOwnProperty;
|
|
3052
3257
|
|
|
3053
3258
|
var fastDeepEqual = function equal(a, b) {
|
|
3054
3259
|
if (a === b) return true;
|
|
3055
3260
|
|
|
3056
3261
|
if (a && b && typeof a == 'object' && typeof b == 'object') {
|
|
3057
|
-
|
|
3262
|
+
var arrA = isArray(a)
|
|
3263
|
+
, arrB = isArray(b)
|
|
3264
|
+
, i
|
|
3265
|
+
, length
|
|
3266
|
+
, key;
|
|
3058
3267
|
|
|
3059
|
-
|
|
3060
|
-
if (Array.isArray(a)) {
|
|
3268
|
+
if (arrA && arrB) {
|
|
3061
3269
|
length = a.length;
|
|
3062
3270
|
if (length != b.length) return false;
|
|
3063
3271
|
for (i = length; i-- !== 0;)
|
|
@@ -3065,29 +3273,35 @@ var fastDeepEqual = function equal(a, b) {
|
|
|
3065
3273
|
return true;
|
|
3066
3274
|
}
|
|
3067
3275
|
|
|
3276
|
+
if (arrA != arrB) return false;
|
|
3068
3277
|
|
|
3278
|
+
var dateA = a instanceof Date
|
|
3279
|
+
, dateB = b instanceof Date;
|
|
3280
|
+
if (dateA != dateB) return false;
|
|
3281
|
+
if (dateA && dateB) return a.getTime() == b.getTime();
|
|
3069
3282
|
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
if (
|
|
3283
|
+
var regexpA = a instanceof RegExp
|
|
3284
|
+
, regexpB = b instanceof RegExp;
|
|
3285
|
+
if (regexpA != regexpB) return false;
|
|
3286
|
+
if (regexpA && regexpB) return a.toString() == b.toString();
|
|
3073
3287
|
|
|
3074
|
-
keys =
|
|
3288
|
+
var keys = keyList(a);
|
|
3075
3289
|
length = keys.length;
|
|
3076
|
-
|
|
3290
|
+
|
|
3291
|
+
if (length !== keyList(b).length)
|
|
3292
|
+
return false;
|
|
3077
3293
|
|
|
3078
3294
|
for (i = length; i-- !== 0;)
|
|
3079
|
-
if (!
|
|
3295
|
+
if (!hasProp.call(b, keys[i])) return false;
|
|
3080
3296
|
|
|
3081
3297
|
for (i = length; i-- !== 0;) {
|
|
3082
|
-
|
|
3083
|
-
|
|
3298
|
+
key = keys[i];
|
|
3084
3299
|
if (!equal(a[key], b[key])) return false;
|
|
3085
3300
|
}
|
|
3086
3301
|
|
|
3087
3302
|
return true;
|
|
3088
3303
|
}
|
|
3089
3304
|
|
|
3090
|
-
// true if both NaN, false otherwise
|
|
3091
3305
|
return a!==a && b!==b;
|
|
3092
3306
|
};
|
|
3093
3307
|
|
|
@@ -4110,7 +4324,7 @@ function formatValue(ctx, value, recurseTimes) {
|
|
|
4110
4324
|
var base = '', array = false, braces = ['{', '}'];
|
|
4111
4325
|
|
|
4112
4326
|
// Make Array say that they are Array
|
|
4113
|
-
if (isArray(value)) {
|
|
4327
|
+
if (isArray$1(value)) {
|
|
4114
4328
|
array = true;
|
|
4115
4329
|
braces = ['[', ']'];
|
|
4116
4330
|
}
|
|
@@ -4289,7 +4503,7 @@ function reduceToSingleString(output, base, braces) {
|
|
|
4289
4503
|
|
|
4290
4504
|
// NOTE: These type checking functions intentionally don't use `instanceof`
|
|
4291
4505
|
// because it is fragile and can be easily faked with `Object.create()`.
|
|
4292
|
-
function isArray(ar) {
|
|
4506
|
+
function isArray$1(ar) {
|
|
4293
4507
|
return Array.isArray(ar);
|
|
4294
4508
|
}
|
|
4295
4509
|
|
|
@@ -4416,7 +4630,7 @@ var util = {
|
|
|
4416
4630
|
isNullOrUndefined: isNullOrUndefined,
|
|
4417
4631
|
isNull: isNull,
|
|
4418
4632
|
isBoolean: isBoolean,
|
|
4419
|
-
isArray: isArray,
|
|
4633
|
+
isArray: isArray$1,
|
|
4420
4634
|
inspect: inspect,
|
|
4421
4635
|
deprecate: deprecate,
|
|
4422
4636
|
format: format,
|
|
@@ -5083,235 +5297,199 @@ module.exports = exports['default'];
|
|
|
5083
5297
|
|
|
5084
5298
|
var youTubePlayer = unwrapExports(dist);
|
|
5085
5299
|
|
|
5086
|
-
function
|
|
5087
|
-
|
|
5088
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
5089
|
-
|
|
5090
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
5091
|
-
|
|
5092
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
5093
|
-
|
|
5094
|
-
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
5095
|
-
|
|
5096
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
5097
|
-
|
|
5098
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
5099
|
-
|
|
5100
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
5101
|
-
|
|
5102
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
5300
|
+
var _createClass = function () { 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
5103
5301
|
|
|
5104
|
-
function
|
|
5302
|
+
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; };
|
|
5105
5303
|
|
|
5106
|
-
function
|
|
5304
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
5107
5305
|
|
|
5108
|
-
function
|
|
5306
|
+
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
5109
5307
|
|
|
5110
|
-
function
|
|
5308
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
5111
5309
|
|
|
5112
|
-
|
|
5113
|
-
|
|
5114
|
-
*
|
|
5115
|
-
*
|
|
5116
|
-
* @param {Object}
|
|
5117
|
-
* @param {Object} props
|
|
5310
|
+
/**
|
|
5311
|
+
* Check whether a `props` change should result in the video being updated.
|
|
5312
|
+
*
|
|
5313
|
+
* @param {Object} prevProps
|
|
5314
|
+
* @param {Object} props
|
|
5118
5315
|
*/
|
|
5119
|
-
|
|
5120
5316
|
function shouldUpdateVideo(prevProps, props) {
|
|
5121
5317
|
// A changing video should always trigger an update
|
|
5122
5318
|
if (prevProps.videoId !== props.videoId) {
|
|
5123
5319
|
return true;
|
|
5124
|
-
}
|
|
5125
|
-
// update.
|
|
5126
|
-
|
|
5320
|
+
}
|
|
5127
5321
|
|
|
5322
|
+
// Otherwise, a change in the start/end time playerVars also requires a player
|
|
5323
|
+
// update.
|
|
5128
5324
|
var prevVars = prevProps.opts.playerVars || {};
|
|
5129
5325
|
var vars = props.opts.playerVars || {};
|
|
5326
|
+
|
|
5130
5327
|
return prevVars.start !== vars.start || prevVars.end !== vars.end;
|
|
5131
5328
|
}
|
|
5132
|
-
/**
|
|
5133
|
-
* Neutralize API options that only require a video update, leaving only options
|
|
5134
|
-
* that require a player reset. The results can then be compared to see if a
|
|
5135
|
-
* player reset is necessary.
|
|
5136
|
-
*
|
|
5137
|
-
* @param {Object} opts
|
|
5138
|
-
*/
|
|
5139
|
-
|
|
5140
5329
|
|
|
5330
|
+
/**
|
|
5331
|
+
* Neutralise API options that only require a video update, leaving only options
|
|
5332
|
+
* that require a player reset. The results can then be compared to see if a
|
|
5333
|
+
* player reset is necessary.
|
|
5334
|
+
*
|
|
5335
|
+
* @param {Object} opts
|
|
5336
|
+
*/
|
|
5141
5337
|
function filterResetOptions(opts) {
|
|
5142
|
-
return
|
|
5143
|
-
playerVars:
|
|
5338
|
+
return _extends({}, opts, {
|
|
5339
|
+
playerVars: _extends({}, opts.playerVars, {
|
|
5144
5340
|
autoplay: 0,
|
|
5145
5341
|
start: 0,
|
|
5146
5342
|
end: 0
|
|
5147
5343
|
})
|
|
5148
5344
|
});
|
|
5149
5345
|
}
|
|
5150
|
-
/**
|
|
5151
|
-
* Check whether a `props` change should result in the player being reset.
|
|
5152
|
-
* The player is reset when the `props.opts` change, except if the only change
|
|
5153
|
-
* is in the `start` and `end` playerVars, because a video update can deal with
|
|
5154
|
-
* those.
|
|
5155
|
-
*
|
|
5156
|
-
* @param {Object} prevProps
|
|
5157
|
-
* @param {Object} props
|
|
5158
|
-
*/
|
|
5159
|
-
|
|
5160
5346
|
|
|
5347
|
+
/**
|
|
5348
|
+
* Check whether a `props` change should result in the player being reset.
|
|
5349
|
+
* The player is reset when the `props.opts` change, except if the only change
|
|
5350
|
+
* is in the `start` and `end` playerVars, because a video update can deal with
|
|
5351
|
+
* those.
|
|
5352
|
+
*
|
|
5353
|
+
* @param {Object} prevProps
|
|
5354
|
+
* @param {Object} props
|
|
5355
|
+
*/
|
|
5161
5356
|
function shouldResetPlayer(prevProps, props) {
|
|
5162
5357
|
return !fastDeepEqual(filterResetOptions(prevProps.opts), filterResetOptions(props.opts));
|
|
5163
5358
|
}
|
|
5164
|
-
/**
|
|
5165
|
-
* Check whether a props change should result in an id or className update.
|
|
5166
|
-
*
|
|
5167
|
-
* @param {Object} prevProps
|
|
5168
|
-
* @param {Object} props
|
|
5169
|
-
*/
|
|
5170
|
-
|
|
5171
5359
|
|
|
5360
|
+
/**
|
|
5361
|
+
* Check whether a props change should result in an id or className update.
|
|
5362
|
+
*
|
|
5363
|
+
* @param {Object} prevProps
|
|
5364
|
+
* @param {Object} props
|
|
5365
|
+
*/
|
|
5172
5366
|
function shouldUpdatePlayer(prevProps, props) {
|
|
5173
5367
|
return prevProps.id !== props.id || prevProps.className !== props.className;
|
|
5174
5368
|
}
|
|
5175
5369
|
|
|
5176
|
-
var YouTube =
|
|
5370
|
+
var YouTube = function (_React$Component) {
|
|
5177
5371
|
_inherits(YouTube, _React$Component);
|
|
5178
5372
|
|
|
5179
|
-
var _super = _createSuper(YouTube);
|
|
5180
|
-
|
|
5181
|
-
/**
|
|
5182
|
-
* Expose PlayerState constants for convenience. These constants can also be
|
|
5183
|
-
* accessed through the global YT object after the YouTube IFrame API is instantiated.
|
|
5184
|
-
* https://developers.google.com/youtube/iframe_api_reference#onStateChange
|
|
5185
|
-
*/
|
|
5186
5373
|
function YouTube(props) {
|
|
5187
|
-
var _this;
|
|
5188
|
-
|
|
5189
5374
|
_classCallCheck(this, YouTube);
|
|
5190
5375
|
|
|
5191
|
-
_this =
|
|
5376
|
+
var _this = _possibleConstructorReturn(this, (YouTube.__proto__ || Object.getPrototypeOf(YouTube)).call(this, props));
|
|
5192
5377
|
|
|
5193
|
-
|
|
5378
|
+
_this.onPlayerReady = function (event) {
|
|
5194
5379
|
return _this.props.onReady(event);
|
|
5195
|
-
}
|
|
5380
|
+
};
|
|
5196
5381
|
|
|
5197
|
-
|
|
5382
|
+
_this.onPlayerError = function (event) {
|
|
5198
5383
|
return _this.props.onError(event);
|
|
5199
|
-
}
|
|
5384
|
+
};
|
|
5200
5385
|
|
|
5201
|
-
|
|
5386
|
+
_this.onPlayerStateChange = function (event) {
|
|
5202
5387
|
_this.props.onStateChange(event);
|
|
5203
|
-
|
|
5204
5388
|
switch (event.data) {
|
|
5389
|
+
|
|
5205
5390
|
case YouTube.PlayerState.ENDED:
|
|
5206
5391
|
_this.props.onEnd(event);
|
|
5207
|
-
|
|
5208
5392
|
break;
|
|
5209
5393
|
|
|
5210
5394
|
case YouTube.PlayerState.PLAYING:
|
|
5211
5395
|
_this.props.onPlay(event);
|
|
5212
|
-
|
|
5213
5396
|
break;
|
|
5214
5397
|
|
|
5215
5398
|
case YouTube.PlayerState.PAUSED:
|
|
5216
5399
|
_this.props.onPause(event);
|
|
5217
|
-
|
|
5218
5400
|
break;
|
|
5219
5401
|
}
|
|
5220
|
-
}
|
|
5402
|
+
};
|
|
5221
5403
|
|
|
5222
|
-
|
|
5404
|
+
_this.onPlayerPlaybackRateChange = function (event) {
|
|
5223
5405
|
return _this.props.onPlaybackRateChange(event);
|
|
5224
|
-
}
|
|
5406
|
+
};
|
|
5225
5407
|
|
|
5226
|
-
|
|
5408
|
+
_this.onPlayerPlaybackQualityChange = function (event) {
|
|
5227
5409
|
return _this.props.onPlaybackQualityChange(event);
|
|
5228
|
-
}
|
|
5410
|
+
};
|
|
5229
5411
|
|
|
5230
|
-
|
|
5412
|
+
_this.createPlayer = function () {
|
|
5231
5413
|
// do not attempt to create a player server-side, it won't work
|
|
5232
|
-
if (typeof document === 'undefined') return;
|
|
5233
|
-
|
|
5234
|
-
var playerOpts =
|
|
5414
|
+
if (typeof document === 'undefined') return;
|
|
5415
|
+
// create player
|
|
5416
|
+
var playerOpts = _extends({}, _this.props.opts, {
|
|
5235
5417
|
// preload the `videoId` video if one is already given
|
|
5236
5418
|
videoId: _this.props.videoId
|
|
5237
5419
|
});
|
|
5238
|
-
|
|
5239
|
-
|
|
5240
|
-
|
|
5420
|
+
_this.internalPlayer = youTubePlayer(_this.container, playerOpts);
|
|
5421
|
+
// attach event handlers
|
|
5241
5422
|
_this.internalPlayer.on('ready', _this.onPlayerReady);
|
|
5242
|
-
|
|
5243
5423
|
_this.internalPlayer.on('error', _this.onPlayerError);
|
|
5244
|
-
|
|
5245
5424
|
_this.internalPlayer.on('stateChange', _this.onPlayerStateChange);
|
|
5246
|
-
|
|
5247
5425
|
_this.internalPlayer.on('playbackRateChange', _this.onPlayerPlaybackRateChange);
|
|
5248
|
-
|
|
5249
5426
|
_this.internalPlayer.on('playbackQualityChange', _this.onPlayerPlaybackQualityChange);
|
|
5250
|
-
}
|
|
5427
|
+
};
|
|
5251
5428
|
|
|
5252
|
-
|
|
5429
|
+
_this.resetPlayer = function () {
|
|
5253
5430
|
return _this.internalPlayer.destroy().then(_this.createPlayer);
|
|
5254
|
-
}
|
|
5431
|
+
};
|
|
5255
5432
|
|
|
5256
|
-
|
|
5433
|
+
_this.updatePlayer = function () {
|
|
5257
5434
|
_this.internalPlayer.getIframe().then(function (iframe) {
|
|
5258
5435
|
if (_this.props.id) iframe.setAttribute('id', _this.props.id);else iframe.removeAttribute('id');
|
|
5259
5436
|
if (_this.props.className) iframe.setAttribute('class', _this.props.className);else iframe.removeAttribute('class');
|
|
5260
5437
|
});
|
|
5261
|
-
}
|
|
5438
|
+
};
|
|
5262
5439
|
|
|
5263
|
-
|
|
5440
|
+
_this.updateVideo = function () {
|
|
5264
5441
|
if (typeof _this.props.videoId === 'undefined' || _this.props.videoId === null) {
|
|
5265
5442
|
_this.internalPlayer.stopVideo();
|
|
5266
|
-
|
|
5267
5443
|
return;
|
|
5268
|
-
}
|
|
5269
|
-
|
|
5444
|
+
}
|
|
5270
5445
|
|
|
5446
|
+
// set queueing options
|
|
5271
5447
|
var autoplay = false;
|
|
5272
5448
|
var opts = {
|
|
5273
5449
|
videoId: _this.props.videoId
|
|
5274
5450
|
};
|
|
5275
|
-
|
|
5276
5451
|
if ('playerVars' in _this.props.opts) {
|
|
5277
5452
|
autoplay = _this.props.opts.playerVars.autoplay === 1;
|
|
5278
|
-
|
|
5279
5453
|
if ('start' in _this.props.opts.playerVars) {
|
|
5280
5454
|
opts.startSeconds = _this.props.opts.playerVars.start;
|
|
5281
5455
|
}
|
|
5282
|
-
|
|
5283
5456
|
if ('end' in _this.props.opts.playerVars) {
|
|
5284
5457
|
opts.endSeconds = _this.props.opts.playerVars.end;
|
|
5285
5458
|
}
|
|
5286
|
-
}
|
|
5287
|
-
|
|
5459
|
+
}
|
|
5288
5460
|
|
|
5461
|
+
// if autoplay is enabled loadVideoById
|
|
5289
5462
|
if (autoplay) {
|
|
5290
5463
|
_this.internalPlayer.loadVideoById(opts);
|
|
5291
|
-
|
|
5292
5464
|
return;
|
|
5293
|
-
}
|
|
5294
|
-
|
|
5295
|
-
|
|
5465
|
+
}
|
|
5466
|
+
// default behaviour just cues the video
|
|
5296
5467
|
_this.internalPlayer.cueVideoById(opts);
|
|
5297
|
-
}
|
|
5468
|
+
};
|
|
5298
5469
|
|
|
5299
|
-
|
|
5470
|
+
_this.refContainer = function (container) {
|
|
5300
5471
|
_this.container = container;
|
|
5301
|
-
}
|
|
5472
|
+
};
|
|
5302
5473
|
|
|
5303
5474
|
_this.container = null;
|
|
5304
5475
|
_this.internalPlayer = null;
|
|
5305
5476
|
return _this;
|
|
5306
5477
|
}
|
|
5307
5478
|
|
|
5479
|
+
/**
|
|
5480
|
+
* Expose PlayerState constants for convenience. These constants can also be
|
|
5481
|
+
* accessed through the global YT object after the YouTube IFrame API is instantiated.
|
|
5482
|
+
* https://developers.google.com/youtube/iframe_api_reference#onStateChange
|
|
5483
|
+
*/
|
|
5484
|
+
|
|
5485
|
+
|
|
5308
5486
|
_createClass(YouTube, [{
|
|
5309
|
-
key:
|
|
5487
|
+
key: 'componentDidMount',
|
|
5310
5488
|
value: function componentDidMount() {
|
|
5311
5489
|
this.createPlayer();
|
|
5312
5490
|
}
|
|
5313
5491
|
}, {
|
|
5314
|
-
key:
|
|
5492
|
+
key: 'componentDidUpdate',
|
|
5315
5493
|
value: function componentDidUpdate(prevProps) {
|
|
5316
5494
|
if (shouldUpdatePlayer(prevProps, this.props)) {
|
|
5317
5495
|
this.updatePlayer();
|
|
@@ -5326,58 +5504,112 @@ var YouTube = /*#__PURE__*/function (_React$Component) {
|
|
|
5326
5504
|
}
|
|
5327
5505
|
}
|
|
5328
5506
|
}, {
|
|
5329
|
-
key:
|
|
5507
|
+
key: 'componentWillUnmount',
|
|
5330
5508
|
value: function componentWillUnmount() {
|
|
5331
|
-
/**
|
|
5332
|
-
* Note: The `youtube-player` package that is used promisifies all
|
|
5333
|
-
* Player API calls, which introduces a delay of a tick before it actually
|
|
5334
|
-
* gets destroyed. Since React attempts to remove the element instantly
|
|
5335
|
-
* this method isn't quick enough to reset the container element.
|
|
5509
|
+
/**
|
|
5510
|
+
* Note: The `youtube-player` package that is used promisifies all Youtube
|
|
5511
|
+
* Player API calls, which introduces a delay of a tick before it actually
|
|
5512
|
+
* gets destroyed. Since React attempts to remove the element instantly
|
|
5513
|
+
* this method isn't quick enough to reset the container element.
|
|
5336
5514
|
*/
|
|
5337
5515
|
this.internalPlayer.destroy();
|
|
5338
5516
|
}
|
|
5339
|
-
|
|
5340
|
-
|
|
5341
|
-
*
|
|
5342
|
-
*
|
|
5343
|
-
*
|
|
5517
|
+
|
|
5518
|
+
/**
|
|
5519
|
+
* https://developers.google.com/youtube/iframe_api_reference#onReady
|
|
5520
|
+
*
|
|
5521
|
+
* @param {Object} event
|
|
5522
|
+
* @param {Object} target - player object
|
|
5523
|
+
*/
|
|
5524
|
+
|
|
5525
|
+
|
|
5526
|
+
/**
|
|
5527
|
+
* https://developers.google.com/youtube/iframe_api_reference#onError
|
|
5528
|
+
*
|
|
5529
|
+
* @param {Object} event
|
|
5530
|
+
* @param {Integer} data - error type
|
|
5531
|
+
* @param {Object} target - player object
|
|
5532
|
+
*/
|
|
5533
|
+
|
|
5534
|
+
|
|
5535
|
+
/**
|
|
5536
|
+
* https://developers.google.com/youtube/iframe_api_reference#onStateChange
|
|
5537
|
+
*
|
|
5538
|
+
* @param {Object} event
|
|
5539
|
+
* @param {Integer} data - status change type
|
|
5540
|
+
* @param {Object} target - actual YT player
|
|
5541
|
+
*/
|
|
5542
|
+
|
|
5543
|
+
|
|
5544
|
+
/**
|
|
5545
|
+
* https://developers.google.com/youtube/iframe_api_reference#onPlaybackRateChange
|
|
5546
|
+
*
|
|
5547
|
+
* @param {Object} event
|
|
5548
|
+
* @param {Float} data - playback rate
|
|
5549
|
+
* @param {Object} target - actual YT player
|
|
5550
|
+
*/
|
|
5551
|
+
|
|
5552
|
+
|
|
5553
|
+
/**
|
|
5554
|
+
* https://developers.google.com/youtube/iframe_api_reference#onPlaybackQualityChange
|
|
5555
|
+
*
|
|
5556
|
+
* @param {Object} event
|
|
5557
|
+
* @param {String} data - playback quality
|
|
5558
|
+
* @param {Object} target - actual YT player
|
|
5559
|
+
*/
|
|
5560
|
+
|
|
5561
|
+
|
|
5562
|
+
/**
|
|
5563
|
+
* Initialize the Youtube Player API on the container and attach event handlers
|
|
5564
|
+
*/
|
|
5565
|
+
|
|
5566
|
+
|
|
5567
|
+
/**
|
|
5568
|
+
* Shorthand for destroying and then re-creating the Youtube Player
|
|
5569
|
+
*/
|
|
5570
|
+
|
|
5571
|
+
|
|
5572
|
+
/**
|
|
5573
|
+
* Method to update the id and class of the Youtube Player iframe.
|
|
5574
|
+
* React should update this automatically but since the Youtube Player API
|
|
5575
|
+
* replaced the DIV that is mounted by React we need to do this manually.
|
|
5576
|
+
*/
|
|
5577
|
+
|
|
5578
|
+
|
|
5579
|
+
/**
|
|
5580
|
+
* Call Youtube Player API methods to update the currently playing video.
|
|
5581
|
+
* Depeding on the `opts.playerVars.autoplay` this function uses one of two
|
|
5582
|
+
* Youtube Player API methods to update the video.
|
|
5344
5583
|
*/
|
|
5345
5584
|
|
|
5346
5585
|
}, {
|
|
5347
|
-
key:
|
|
5586
|
+
key: 'render',
|
|
5348
5587
|
value: function render() {
|
|
5349
|
-
return
|
|
5350
|
-
|
|
5351
|
-
|
|
5352
|
-
id: this.props.id,
|
|
5353
|
-
|
|
5354
|
-
ref: this.refContainer
|
|
5355
|
-
}));
|
|
5588
|
+
return React__default.createElement(
|
|
5589
|
+
'div',
|
|
5590
|
+
{ className: this.props.containerClassName },
|
|
5591
|
+
React__default.createElement('div', { id: this.props.id, className: this.props.className, ref: this.refContainer })
|
|
5592
|
+
);
|
|
5356
5593
|
}
|
|
5357
5594
|
}]);
|
|
5358
5595
|
|
|
5359
5596
|
return YouTube;
|
|
5360
5597
|
}(React__default.Component);
|
|
5361
5598
|
|
|
5362
|
-
_defineProperty(YouTube, "PlayerState", {
|
|
5363
|
-
UNSTARTED: -1,
|
|
5364
|
-
ENDED: 0,
|
|
5365
|
-
PLAYING: 1,
|
|
5366
|
-
PAUSED: 2,
|
|
5367
|
-
BUFFERING: 3,
|
|
5368
|
-
CUED: 5
|
|
5369
|
-
});
|
|
5370
|
-
|
|
5371
5599
|
YouTube.propTypes = {
|
|
5372
5600
|
videoId: PropTypes.string,
|
|
5601
|
+
|
|
5373
5602
|
// custom ID for player element
|
|
5374
5603
|
id: PropTypes.string,
|
|
5604
|
+
|
|
5375
5605
|
// custom class name for player element
|
|
5376
5606
|
className: PropTypes.string,
|
|
5377
5607
|
// custom class name for player container element
|
|
5378
5608
|
containerClassName: PropTypes.string,
|
|
5609
|
+
|
|
5379
5610
|
// https://developers.google.com/youtube/iframe_api_reference#Loading_a_Video_Player
|
|
5380
5611
|
opts: PropTypes.objectOf(PropTypes.any),
|
|
5612
|
+
|
|
5381
5613
|
// event subscriptions
|
|
5382
5614
|
onReady: PropTypes.func,
|
|
5383
5615
|
onError: PropTypes.func,
|
|
@@ -5389,7 +5621,6 @@ YouTube.propTypes = {
|
|
|
5389
5621
|
onPlaybackQualityChange: PropTypes.func
|
|
5390
5622
|
};
|
|
5391
5623
|
YouTube.defaultProps = {
|
|
5392
|
-
videoId: null,
|
|
5393
5624
|
id: null,
|
|
5394
5625
|
className: null,
|
|
5395
5626
|
opts: {},
|
|
@@ -5403,6 +5634,14 @@ YouTube.defaultProps = {
|
|
|
5403
5634
|
onPlaybackRateChange: function onPlaybackRateChange() {},
|
|
5404
5635
|
onPlaybackQualityChange: function onPlaybackQualityChange() {}
|
|
5405
5636
|
};
|
|
5637
|
+
YouTube.PlayerState = {
|
|
5638
|
+
UNSTARTED: -1,
|
|
5639
|
+
ENDED: 0,
|
|
5640
|
+
PLAYING: 1,
|
|
5641
|
+
PAUSED: 2,
|
|
5642
|
+
BUFFERING: 3,
|
|
5643
|
+
CUED: 5
|
|
5644
|
+
};
|
|
5406
5645
|
|
|
5407
5646
|
var YouTubePlayer = function YouTubePlayer(_ref) {
|
|
5408
5647
|
var url = _ref.url;
|
|
@@ -5424,11 +5663,6 @@ var YouTubePlayer = function YouTubePlayer(_ref) {
|
|
|
5424
5663
|
intervalID = _useState6[0],
|
|
5425
5664
|
setIntervalID = _useState6[1];
|
|
5426
5665
|
|
|
5427
|
-
var _useState7 = useState(null),
|
|
5428
|
-
_useState8 = _slicedToArray(_useState7, 2),
|
|
5429
|
-
segmentData = _useState8[0],
|
|
5430
|
-
setSegemntData = _useState8[1];
|
|
5431
|
-
|
|
5432
5666
|
var queueProgress = [];
|
|
5433
5667
|
|
|
5434
5668
|
var opts = {
|
|
@@ -5438,12 +5672,14 @@ var YouTubePlayer = function YouTubePlayer(_ref) {
|
|
|
5438
5672
|
}
|
|
5439
5673
|
};
|
|
5440
5674
|
|
|
5441
|
-
|
|
5442
|
-
|
|
5443
|
-
|
|
5444
|
-
|
|
5445
|
-
|
|
5446
|
-
|
|
5675
|
+
var handleOnReady = function handleOnReady(event) {
|
|
5676
|
+
var player = event.target;
|
|
5677
|
+
var current = player.getCurrentTime();
|
|
5678
|
+
var duration = player.getDuration();
|
|
5679
|
+
var queue = Math.floor(duration / 10);
|
|
5680
|
+
var segment = Math.floor(current / queue);
|
|
5681
|
+
Beam.report_beam_video('Ready', main_16, duration, current, segment);
|
|
5682
|
+
};
|
|
5447
5683
|
|
|
5448
5684
|
var handlePlayPercent = function handlePlayPercent(player) {
|
|
5449
5685
|
var current = player.getCurrentTime();
|
|
@@ -5452,28 +5688,22 @@ var YouTubePlayer = function YouTubePlayer(_ref) {
|
|
|
5452
5688
|
var segment = Math.floor(current / queue);
|
|
5453
5689
|
|
|
5454
5690
|
if (!queueProgress.includes(segment)) {
|
|
5455
|
-
|
|
5456
|
-
current: current,
|
|
5457
|
-
duration: duration,
|
|
5458
|
-
queue: queue,
|
|
5459
|
-
segment: segment
|
|
5460
|
-
});
|
|
5691
|
+
Beam.report_beam_video('Segment', main_16, duration, current, segment);
|
|
5461
5692
|
queueProgress.push(segment);
|
|
5462
5693
|
}
|
|
5463
5694
|
};
|
|
5464
5695
|
|
|
5465
5696
|
var handleOnPlay = function handleOnPlay(event) {
|
|
5466
5697
|
// report play
|
|
5467
|
-
|
|
5468
|
-
|
|
5698
|
+
var player = event.target;
|
|
5699
|
+
var current = player.getCurrentTime();
|
|
5700
|
+
var duration = player.getDuration();
|
|
5701
|
+
var queue = Math.floor(duration / 10);
|
|
5702
|
+
var segment = Math.floor(current / queue);
|
|
5469
5703
|
|
|
5470
|
-
|
|
5471
|
-
var current = player.getCurrentTime();
|
|
5472
|
-
var duration = player.getDuration();
|
|
5473
|
-
var queue = Math.floor(duration / 10);
|
|
5474
|
-
var segment = Math.floor(current / queue);
|
|
5704
|
+
Beam.report_beam_video('Play', main_16, duration, current, segment);
|
|
5475
5705
|
|
|
5476
|
-
|
|
5706
|
+
if (!playReported) {
|
|
5477
5707
|
setPlayReported(true);
|
|
5478
5708
|
var _intervalID = setInterval(function () {
|
|
5479
5709
|
handlePlayPercent(event.target);
|
|
@@ -5484,7 +5714,6 @@ var YouTubePlayer = function YouTubePlayer(_ref) {
|
|
|
5484
5714
|
|
|
5485
5715
|
var handleOnEnd = function handleOnEnd(event) {
|
|
5486
5716
|
if (!endReported) {
|
|
5487
|
-
console.log('Video End', event);
|
|
5488
5717
|
var player = event.target;
|
|
5489
5718
|
var current = player.getCurrentTime();
|
|
5490
5719
|
var duration = player.getDuration();
|
|
@@ -5498,7 +5727,6 @@ var YouTubePlayer = function YouTubePlayer(_ref) {
|
|
|
5498
5727
|
};
|
|
5499
5728
|
|
|
5500
5729
|
var handleOnPause = function handleOnPause(event) {
|
|
5501
|
-
console.log('Video Pause');
|
|
5502
5730
|
var player = event.target;
|
|
5503
5731
|
var current = player.getCurrentTime();
|
|
5504
5732
|
var duration = player.getDuration();
|
|
@@ -5508,7 +5736,7 @@ var YouTubePlayer = function YouTubePlayer(_ref) {
|
|
|
5508
5736
|
Beam.report_beam_video('Pause', main_16, duration, current, segment);
|
|
5509
5737
|
};
|
|
5510
5738
|
|
|
5511
|
-
return React__default.createElement(YouTube, { videoId: id, opts: opts, onPlay: handleOnPlay, onPause: handleOnPause, onEnd: handleOnEnd });
|
|
5739
|
+
return React__default.createElement(YouTube, { videoId: id, opts: opts, onReady: handleOnReady, onPlay: handleOnPlay, onPause: handleOnPause, onEnd: handleOnEnd });
|
|
5512
5740
|
};
|
|
5513
5741
|
|
|
5514
5742
|
var Sidebar = function Sidebar(_ref) {
|
|
@@ -6437,8 +6665,8 @@ var window_1 = win;
|
|
|
6437
6665
|
|
|
6438
6666
|
/*! @name @brightcove/react-player-loader @version 1.4.0 @license Apache-2.0 */
|
|
6439
6667
|
|
|
6440
|
-
function _extends() {
|
|
6441
|
-
_extends = Object.assign || function (target) {
|
|
6668
|
+
function _extends$1() {
|
|
6669
|
+
_extends$1 = Object.assign || function (target) {
|
|
6442
6670
|
for (var i = 1; i < arguments.length; i++) {
|
|
6443
6671
|
var source = arguments[i];
|
|
6444
6672
|
|
|
@@ -6452,7 +6680,7 @@ function _extends() {
|
|
|
6452
6680
|
return target;
|
|
6453
6681
|
};
|
|
6454
6682
|
|
|
6455
|
-
return _extends.apply(this, arguments);
|
|
6683
|
+
return _extends$1.apply(this, arguments);
|
|
6456
6684
|
}
|
|
6457
6685
|
|
|
6458
6686
|
function _inheritsLoose(subClass, superClass) {
|
|
@@ -6461,7 +6689,7 @@ function _inheritsLoose(subClass, superClass) {
|
|
|
6461
6689
|
subClass.__proto__ = superClass;
|
|
6462
6690
|
}
|
|
6463
6691
|
|
|
6464
|
-
function _assertThisInitialized
|
|
6692
|
+
function _assertThisInitialized(self) {
|
|
6465
6693
|
if (self === void 0) {
|
|
6466
6694
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
6467
6695
|
}
|
|
@@ -6471,8 +6699,8 @@ function _assertThisInitialized$1(self) {
|
|
|
6471
6699
|
|
|
6472
6700
|
/*! @name @brightcove/player-loader @version 1.7.1 @license Apache-2.0 */
|
|
6473
6701
|
|
|
6474
|
-
function _extends$1() {
|
|
6475
|
-
_extends$1 = Object.assign || function (target) {
|
|
6702
|
+
function _extends$1$1() {
|
|
6703
|
+
_extends$1$1 = Object.assign || function (target) {
|
|
6476
6704
|
for (var i = 1; i < arguments.length; i++) {
|
|
6477
6705
|
var source = arguments[i];
|
|
6478
6706
|
|
|
@@ -6486,7 +6714,7 @@ function _extends$1() {
|
|
|
6486
6714
|
return target;
|
|
6487
6715
|
};
|
|
6488
6716
|
|
|
6489
|
-
return _extends$1.apply(this, arguments);
|
|
6717
|
+
return _extends$1$1.apply(this, arguments);
|
|
6490
6718
|
}
|
|
6491
6719
|
|
|
6492
6720
|
var version$1 = "1.7.1";
|
|
@@ -6494,7 +6722,7 @@ var version$1 = "1.7.1";
|
|
|
6494
6722
|
/*! @name @brightcove/player-url @version 1.2.0 @license Apache-2.0 */
|
|
6495
6723
|
var version$1$1 = "1.2.0";
|
|
6496
6724
|
|
|
6497
|
-
var _typeof
|
|
6725
|
+
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
|
|
6498
6726
|
return typeof obj;
|
|
6499
6727
|
} : function (obj) {
|
|
6500
6728
|
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
@@ -6629,7 +6857,7 @@ var brightcovePlayerUrl = function brightcovePlayerUrl(_ref) {
|
|
|
6629
6857
|
|
|
6630
6858
|
var qs = '';
|
|
6631
6859
|
|
|
6632
|
-
if (iframe && queryParams && (typeof queryParams === 'undefined' ? 'undefined' : _typeof
|
|
6860
|
+
if (iframe && queryParams && (typeof queryParams === 'undefined' ? 'undefined' : _typeof(queryParams)) === 'object') {
|
|
6633
6861
|
qs = getQueryString(queryParams);
|
|
6634
6862
|
}
|
|
6635
6863
|
|
|
@@ -6863,7 +7091,7 @@ var wrapResponsive = function wrapResponsive(embedType, embedOptions, el) {
|
|
|
6863
7091
|
el.style.width = '100%';
|
|
6864
7092
|
el.style.height = '100%';
|
|
6865
7093
|
|
|
6866
|
-
var responsive = _extends$1({
|
|
7094
|
+
var responsive = _extends$1$1({
|
|
6867
7095
|
aspectRatio: DEFAULT_ASPECT_RATIO,
|
|
6868
7096
|
iframeHorizontalPlaylist: DEFAULT_IFRAME_HORIZONTAL_PLAYLIST,
|
|
6869
7097
|
maxWidth: DEFAULT_MAX_WIDTH
|
|
@@ -7548,7 +7776,7 @@ var loadPlayer = function loadPlayer(params, resolve, reject) {
|
|
|
7548
7776
|
|
|
7549
7777
|
|
|
7550
7778
|
var brightcovePlayerLoader = function brightcovePlayerLoader(parameters) {
|
|
7551
|
-
var params = _extends$1({}, DEFAULTS, parameters);
|
|
7779
|
+
var params = _extends$1$1({}, DEFAULTS, parameters);
|
|
7552
7780
|
|
|
7553
7781
|
var Promise = params.Promise,
|
|
7554
7782
|
onSuccess = params.onSuccess,
|
|
@@ -7690,7 +7918,7 @@ function (_React$Component) {
|
|
|
7690
7918
|
_this.refNode = ref;
|
|
7691
7919
|
};
|
|
7692
7920
|
|
|
7693
|
-
_this.loadPlayer = _this.loadPlayer.bind(_assertThisInitialized
|
|
7921
|
+
_this.loadPlayer = _this.loadPlayer.bind(_assertThisInitialized(_this));
|
|
7694
7922
|
return _this;
|
|
7695
7923
|
}
|
|
7696
7924
|
/**
|
|
@@ -7711,7 +7939,7 @@ function (_React$Component) {
|
|
|
7711
7939
|
var userSuccess = this.props.onSuccess;
|
|
7712
7940
|
var userFailure = this.props.onFailure;
|
|
7713
7941
|
|
|
7714
|
-
var options = _extends({}, this.props, {
|
|
7942
|
+
var options = _extends$1({}, this.props, {
|
|
7715
7943
|
refNode: this.refNode,
|
|
7716
7944
|
refNodeInsert: 'append',
|
|
7717
7945
|
onSuccess: function onSuccess(_ref) {
|
|
@@ -8020,7 +8248,7 @@ function (_React$Component) {
|
|
|
8020
8248
|
;
|
|
8021
8249
|
|
|
8022
8250
|
_proto.render = function render() {
|
|
8023
|
-
var props = _extends({
|
|
8251
|
+
var props = _extends$1({
|
|
8024
8252
|
className: 'brightcove-react-player-loader'
|
|
8025
8253
|
}, this.props.attrs, {
|
|
8026
8254
|
ref: this.setRefNode
|
|
@@ -8434,17 +8662,11 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
|
8434
8662
|
|
|
8435
8663
|
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; }
|
|
8436
8664
|
|
|
8437
|
-
function
|
|
8438
|
-
|
|
8439
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
8665
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
|
|
8440
8666
|
|
|
8441
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance
|
|
8667
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
|
|
8442
8668
|
|
|
8443
|
-
function
|
|
8444
|
-
|
|
8445
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
8446
|
-
|
|
8447
|
-
function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
8669
|
+
function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { 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; }
|
|
8448
8670
|
|
|
8449
8671
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
8450
8672
|
|
|
@@ -8574,12 +8796,12 @@ function getSDK(url, sdkGlobal) {
|
|
|
8574
8796
|
|
|
8575
8797
|
function getConfig(props$1, defaultProps, showWarning) {
|
|
8576
8798
|
var config = (0, _deepmerge["default"])(defaultProps.config, props$1.config);
|
|
8577
|
-
|
|
8578
|
-
var
|
|
8579
|
-
|
|
8799
|
+
var _iteratorNormalCompletion = true;
|
|
8800
|
+
var _didIteratorError = false;
|
|
8801
|
+
var _iteratorError = undefined;
|
|
8580
8802
|
|
|
8581
8803
|
try {
|
|
8582
|
-
for (_iterator.
|
|
8804
|
+
for (var _iterator = props.DEPRECATED_CONFIG_PROPS[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
8583
8805
|
var p = _step.value;
|
|
8584
8806
|
|
|
8585
8807
|
if (props$1[p]) {
|
|
@@ -8594,9 +8816,18 @@ function getConfig(props$1, defaultProps, showWarning) {
|
|
|
8594
8816
|
}
|
|
8595
8817
|
}
|
|
8596
8818
|
} catch (err) {
|
|
8597
|
-
|
|
8819
|
+
_didIteratorError = true;
|
|
8820
|
+
_iteratorError = err;
|
|
8598
8821
|
} finally {
|
|
8599
|
-
|
|
8822
|
+
try {
|
|
8823
|
+
if (!_iteratorNormalCompletion && _iterator["return"] != null) {
|
|
8824
|
+
_iterator["return"]();
|
|
8825
|
+
}
|
|
8826
|
+
} finally {
|
|
8827
|
+
if (_didIteratorError) {
|
|
8828
|
+
throw _iteratorError;
|
|
8829
|
+
}
|
|
8830
|
+
}
|
|
8600
8831
|
}
|
|
8601
8832
|
|
|
8602
8833
|
return config;
|
|
@@ -8743,16 +8974,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
8743
8974
|
|
|
8744
8975
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
8745
8976
|
|
|
8746
|
-
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
8747
|
-
|
|
8748
8977
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
8749
8978
|
|
|
8750
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
8751
|
-
|
|
8752
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
8753
|
-
|
|
8754
8979
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
8755
8980
|
|
|
8981
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
8982
|
+
|
|
8756
8983
|
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); }
|
|
8757
8984
|
|
|
8758
8985
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -8761,12 +8988,14 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
8761
8988
|
|
|
8762
8989
|
var SEEK_ON_PLAY_EXPIRY = 5000;
|
|
8763
8990
|
|
|
8764
|
-
var Player =
|
|
8991
|
+
var Player =
|
|
8992
|
+
/*#__PURE__*/
|
|
8993
|
+
function (_Component) {
|
|
8765
8994
|
_inherits(Player, _Component);
|
|
8766
8995
|
|
|
8767
|
-
var _super = _createSuper(Player);
|
|
8768
|
-
|
|
8769
8996
|
function Player() {
|
|
8997
|
+
var _getPrototypeOf2;
|
|
8998
|
+
|
|
8770
8999
|
var _this;
|
|
8771
9000
|
|
|
8772
9001
|
_classCallCheck(this, Player);
|
|
@@ -8775,7 +9004,7 @@ var Player = /*#__PURE__*/function (_Component) {
|
|
|
8775
9004
|
_args[_key] = arguments[_key];
|
|
8776
9005
|
}
|
|
8777
9006
|
|
|
8778
|
-
_this =
|
|
9007
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Player)).call.apply(_getPrototypeOf2, [this].concat(_args)));
|
|
8779
9008
|
|
|
8780
9009
|
_defineProperty(_assertThisInitialized(_this), "mounted", false);
|
|
8781
9010
|
|
|
@@ -9100,7 +9329,7 @@ var Player = /*#__PURE__*/function (_Component) {
|
|
|
9100
9329
|
return null;
|
|
9101
9330
|
}
|
|
9102
9331
|
|
|
9103
|
-
return
|
|
9332
|
+
return _react["default"].createElement(Player, _extends({}, this.props, {
|
|
9104
9333
|
ref: this.ref,
|
|
9105
9334
|
onReady: this.handleReady,
|
|
9106
9335
|
onPlay: this.handlePlay,
|
|
@@ -9161,16 +9390,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
9161
9390
|
|
|
9162
9391
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
9163
9392
|
|
|
9164
|
-
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
9165
|
-
|
|
9166
9393
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
9167
9394
|
|
|
9168
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
9169
|
-
|
|
9170
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
9171
|
-
|
|
9172
9395
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
9173
9396
|
|
|
9397
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
9398
|
+
|
|
9174
9399
|
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); }
|
|
9175
9400
|
|
|
9176
9401
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -9182,12 +9407,14 @@ var SUPPORTED_PROPS = Object.keys(props.propTypes);
|
|
|
9182
9407
|
function createSinglePlayer(activePlayer) {
|
|
9183
9408
|
var _class, _temp;
|
|
9184
9409
|
|
|
9185
|
-
return _temp = _class =
|
|
9410
|
+
return _temp = _class =
|
|
9411
|
+
/*#__PURE__*/
|
|
9412
|
+
function (_Component) {
|
|
9186
9413
|
_inherits(SinglePlayer, _Component);
|
|
9187
9414
|
|
|
9188
|
-
var _super = _createSuper(SinglePlayer);
|
|
9189
|
-
|
|
9190
9415
|
function SinglePlayer() {
|
|
9416
|
+
var _getPrototypeOf2;
|
|
9417
|
+
|
|
9191
9418
|
var _this;
|
|
9192
9419
|
|
|
9193
9420
|
_classCallCheck(this, SinglePlayer);
|
|
@@ -9196,7 +9423,7 @@ function createSinglePlayer(activePlayer) {
|
|
|
9196
9423
|
args[_key] = arguments[_key];
|
|
9197
9424
|
}
|
|
9198
9425
|
|
|
9199
|
-
_this =
|
|
9426
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(SinglePlayer)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
9200
9427
|
|
|
9201
9428
|
_defineProperty(_assertThisInitialized(_this), "config", (0, utils.getConfig)(_this.props, props.defaultProps, true));
|
|
9202
9429
|
|
|
@@ -9264,12 +9491,12 @@ function createSinglePlayer(activePlayer) {
|
|
|
9264
9491
|
height = _this$props.height,
|
|
9265
9492
|
Wrapper = _this$props.wrapper;
|
|
9266
9493
|
var otherProps = (0, utils.omit)(this.props, SUPPORTED_PROPS, props.DEPRECATED_CONFIG_PROPS);
|
|
9267
|
-
return
|
|
9494
|
+
return _react["default"].createElement(Wrapper, _extends({
|
|
9268
9495
|
style: _objectSpread({}, style, {
|
|
9269
9496
|
width: width,
|
|
9270
9497
|
height: height
|
|
9271
9498
|
})
|
|
9272
|
-
}, otherProps),
|
|
9499
|
+
}, otherProps), _react["default"].createElement(_Player["default"], _extends({}, this.props, {
|
|
9273
9500
|
ref: this.ref,
|
|
9274
9501
|
activePlayer: activePlayer,
|
|
9275
9502
|
config: this.config
|
|
@@ -9315,31 +9542,23 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
9315
9542
|
|
|
9316
9543
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
9317
9544
|
|
|
9318
|
-
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
9319
|
-
|
|
9320
9545
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
9321
9546
|
|
|
9322
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
9323
|
-
|
|
9324
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
9325
|
-
|
|
9326
9547
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
9327
9548
|
|
|
9549
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
9550
|
+
|
|
9328
9551
|
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); }
|
|
9329
9552
|
|
|
9330
9553
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
9331
9554
|
|
|
9332
9555
|
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; }
|
|
9333
9556
|
|
|
9334
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) ||
|
|
9335
|
-
|
|
9336
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
9337
|
-
|
|
9338
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
9557
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
|
|
9339
9558
|
|
|
9340
|
-
function
|
|
9559
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
|
|
9341
9560
|
|
|
9342
|
-
function _iterableToArrayLimit(arr, i) { if (
|
|
9561
|
+
function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { 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; }
|
|
9343
9562
|
|
|
9344
9563
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
9345
9564
|
|
|
@@ -9364,12 +9583,14 @@ function parsePlaylist(url) {
|
|
|
9364
9583
|
return {};
|
|
9365
9584
|
}
|
|
9366
9585
|
|
|
9367
|
-
var YouTube =
|
|
9586
|
+
var YouTube =
|
|
9587
|
+
/*#__PURE__*/
|
|
9588
|
+
function (_Component) {
|
|
9368
9589
|
_inherits(YouTube, _Component);
|
|
9369
9590
|
|
|
9370
|
-
var _super = _createSuper(YouTube);
|
|
9371
|
-
|
|
9372
9591
|
function YouTube() {
|
|
9592
|
+
var _getPrototypeOf2;
|
|
9593
|
+
|
|
9373
9594
|
var _this;
|
|
9374
9595
|
|
|
9375
9596
|
_classCallCheck(this, YouTube);
|
|
@@ -9378,7 +9599,7 @@ var YouTube = /*#__PURE__*/function (_Component) {
|
|
|
9378
9599
|
args[_key] = arguments[_key];
|
|
9379
9600
|
}
|
|
9380
9601
|
|
|
9381
|
-
_this =
|
|
9602
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(YouTube)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
9382
9603
|
|
|
9383
9604
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
9384
9605
|
|
|
@@ -9566,9 +9787,9 @@ var YouTube = /*#__PURE__*/function (_Component) {
|
|
|
9566
9787
|
height: '100%',
|
|
9567
9788
|
display: display
|
|
9568
9789
|
};
|
|
9569
|
-
return
|
|
9790
|
+
return _react["default"].createElement("div", {
|
|
9570
9791
|
style: style
|
|
9571
|
-
},
|
|
9792
|
+
}, _react["default"].createElement("div", {
|
|
9572
9793
|
ref: this.ref
|
|
9573
9794
|
}));
|
|
9574
9795
|
}
|
|
@@ -9624,16 +9845,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
9624
9845
|
|
|
9625
9846
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
9626
9847
|
|
|
9627
|
-
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
9628
|
-
|
|
9629
9848
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
9630
9849
|
|
|
9631
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
9632
|
-
|
|
9633
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
9634
|
-
|
|
9635
9850
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
9636
9851
|
|
|
9852
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
9853
|
+
|
|
9637
9854
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
9638
9855
|
|
|
9639
9856
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -9642,14 +9859,16 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
9642
9859
|
|
|
9643
9860
|
var SDK_URL = 'https://w.soundcloud.com/player/api.js';
|
|
9644
9861
|
var SDK_GLOBAL = 'SC';
|
|
9645
|
-
var MATCH_URL = /(
|
|
9862
|
+
var MATCH_URL = /(soundcloud\.com|snd\.sc)\/.+$/;
|
|
9646
9863
|
|
|
9647
|
-
var SoundCloud =
|
|
9864
|
+
var SoundCloud =
|
|
9865
|
+
/*#__PURE__*/
|
|
9866
|
+
function (_Component) {
|
|
9648
9867
|
_inherits(SoundCloud, _Component);
|
|
9649
9868
|
|
|
9650
|
-
var _super = _createSuper(SoundCloud);
|
|
9651
|
-
|
|
9652
9869
|
function SoundCloud() {
|
|
9870
|
+
var _getPrototypeOf2;
|
|
9871
|
+
|
|
9653
9872
|
var _this;
|
|
9654
9873
|
|
|
9655
9874
|
_classCallCheck(this, SoundCloud);
|
|
@@ -9658,7 +9877,7 @@ var SoundCloud = /*#__PURE__*/function (_Component) {
|
|
|
9658
9877
|
args[_key] = arguments[_key];
|
|
9659
9878
|
}
|
|
9660
9879
|
|
|
9661
|
-
_this =
|
|
9880
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(SoundCloud)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
9662
9881
|
|
|
9663
9882
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
9664
9883
|
|
|
@@ -9779,7 +9998,7 @@ var SoundCloud = /*#__PURE__*/function (_Component) {
|
|
|
9779
9998
|
height: '100%',
|
|
9780
9999
|
display: display
|
|
9781
10000
|
};
|
|
9782
|
-
return
|
|
10001
|
+
return _react["default"].createElement("iframe", {
|
|
9783
10002
|
ref: this.ref,
|
|
9784
10003
|
src: "https://w.soundcloud.com/player/?url=".concat(encodeURIComponent(this.props.url)),
|
|
9785
10004
|
style: style,
|
|
@@ -9841,16 +10060,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
9841
10060
|
|
|
9842
10061
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
9843
10062
|
|
|
9844
|
-
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
9845
|
-
|
|
9846
10063
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
9847
10064
|
|
|
9848
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
9849
|
-
|
|
9850
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
9851
|
-
|
|
9852
10065
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
9853
10066
|
|
|
10067
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
10068
|
+
|
|
9854
10069
|
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); }
|
|
9855
10070
|
|
|
9856
10071
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -9862,12 +10077,14 @@ var SDK_GLOBAL = 'Vimeo';
|
|
|
9862
10077
|
var MATCH_URL = /vimeo\.com\/.+/;
|
|
9863
10078
|
var MATCH_FILE_URL = /vimeo\.com\/external\/[0-9]+\..+/;
|
|
9864
10079
|
|
|
9865
|
-
var Vimeo =
|
|
10080
|
+
var Vimeo =
|
|
10081
|
+
/*#__PURE__*/
|
|
10082
|
+
function (_Component) {
|
|
9866
10083
|
_inherits(Vimeo, _Component);
|
|
9867
10084
|
|
|
9868
|
-
var _super = _createSuper(Vimeo);
|
|
9869
|
-
|
|
9870
10085
|
function Vimeo() {
|
|
10086
|
+
var _getPrototypeOf2;
|
|
10087
|
+
|
|
9871
10088
|
var _this;
|
|
9872
10089
|
|
|
9873
10090
|
_classCallCheck(this, Vimeo);
|
|
@@ -9876,7 +10093,7 @@ var Vimeo = /*#__PURE__*/function (_Component) {
|
|
|
9876
10093
|
args[_key] = arguments[_key];
|
|
9877
10094
|
}
|
|
9878
10095
|
|
|
9879
|
-
_this =
|
|
10096
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Vimeo)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
9880
10097
|
|
|
9881
10098
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
9882
10099
|
|
|
@@ -10033,7 +10250,7 @@ var Vimeo = /*#__PURE__*/function (_Component) {
|
|
|
10033
10250
|
overflow: 'hidden',
|
|
10034
10251
|
display: display
|
|
10035
10252
|
};
|
|
10036
|
-
return
|
|
10253
|
+
return _react["default"].createElement("div", {
|
|
10037
10254
|
key: this.props.url,
|
|
10038
10255
|
ref: this.ref,
|
|
10039
10256
|
style: style
|
|
@@ -10093,16 +10310,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
10093
10310
|
|
|
10094
10311
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
10095
10312
|
|
|
10096
|
-
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
10097
|
-
|
|
10098
10313
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
10099
10314
|
|
|
10100
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
10101
|
-
|
|
10102
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
10103
|
-
|
|
10104
10315
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
10105
10316
|
|
|
10317
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
10318
|
+
|
|
10106
10319
|
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); }
|
|
10107
10320
|
|
|
10108
10321
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -10115,12 +10328,14 @@ var SDK_GLOBAL_READY = 'fbAsyncInit';
|
|
|
10115
10328
|
var MATCH_URL = /^https?:\/\/(www\.)?facebook\.com.*\/(video(s)?|watch|story)(\.php?|\/).+$/;
|
|
10116
10329
|
var PLAYER_ID_PREFIX = 'facebook-player-';
|
|
10117
10330
|
|
|
10118
|
-
var Facebook =
|
|
10331
|
+
var Facebook =
|
|
10332
|
+
/*#__PURE__*/
|
|
10333
|
+
function (_Component) {
|
|
10119
10334
|
_inherits(Facebook, _Component);
|
|
10120
10335
|
|
|
10121
|
-
var _super = _createSuper(Facebook);
|
|
10122
|
-
|
|
10123
10336
|
function Facebook() {
|
|
10337
|
+
var _getPrototypeOf2;
|
|
10338
|
+
|
|
10124
10339
|
var _this;
|
|
10125
10340
|
|
|
10126
10341
|
_classCallCheck(this, Facebook);
|
|
@@ -10129,7 +10344,7 @@ var Facebook = /*#__PURE__*/function (_Component) {
|
|
|
10129
10344
|
args[_key] = arguments[_key];
|
|
10130
10345
|
}
|
|
10131
10346
|
|
|
10132
|
-
_this =
|
|
10347
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Facebook)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
10133
10348
|
|
|
10134
10349
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
10135
10350
|
|
|
@@ -10245,7 +10460,7 @@ var Facebook = /*#__PURE__*/function (_Component) {
|
|
|
10245
10460
|
width: '100%',
|
|
10246
10461
|
height: '100%'
|
|
10247
10462
|
};
|
|
10248
|
-
return
|
|
10463
|
+
return _react["default"].createElement("div", {
|
|
10249
10464
|
style: style,
|
|
10250
10465
|
id: this.playerID,
|
|
10251
10466
|
className: "fb-video",
|
|
@@ -10305,16 +10520,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
10305
10520
|
|
|
10306
10521
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
10307
10522
|
|
|
10308
|
-
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
10309
|
-
|
|
10310
10523
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
10311
10524
|
|
|
10312
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
10313
|
-
|
|
10314
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
10315
|
-
|
|
10316
10525
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
10317
10526
|
|
|
10527
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
10528
|
+
|
|
10318
10529
|
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); }
|
|
10319
10530
|
|
|
10320
10531
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -10325,12 +10536,14 @@ var SDK_URL = 'https://cdn.embed.ly/player-0.1.0.min.js';
|
|
|
10325
10536
|
var SDK_GLOBAL = 'playerjs';
|
|
10326
10537
|
var MATCH_URL = /streamable\.com\/([a-z0-9]+)$/;
|
|
10327
10538
|
|
|
10328
|
-
var Streamable =
|
|
10539
|
+
var Streamable =
|
|
10540
|
+
/*#__PURE__*/
|
|
10541
|
+
function (_Component) {
|
|
10329
10542
|
_inherits(Streamable, _Component);
|
|
10330
10543
|
|
|
10331
|
-
var _super = _createSuper(Streamable);
|
|
10332
|
-
|
|
10333
10544
|
function Streamable() {
|
|
10545
|
+
var _getPrototypeOf2;
|
|
10546
|
+
|
|
10334
10547
|
var _this;
|
|
10335
10548
|
|
|
10336
10549
|
_classCallCheck(this, Streamable);
|
|
@@ -10339,7 +10552,7 @@ var Streamable = /*#__PURE__*/function (_Component) {
|
|
|
10339
10552
|
args[_key] = arguments[_key];
|
|
10340
10553
|
}
|
|
10341
10554
|
|
|
10342
|
-
_this =
|
|
10555
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Streamable)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
10343
10556
|
|
|
10344
10557
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
10345
10558
|
|
|
@@ -10459,7 +10672,7 @@ var Streamable = /*#__PURE__*/function (_Component) {
|
|
|
10459
10672
|
width: '100%',
|
|
10460
10673
|
height: '100%'
|
|
10461
10674
|
};
|
|
10462
|
-
return
|
|
10675
|
+
return _react["default"].createElement("iframe", {
|
|
10463
10676
|
ref: this.ref,
|
|
10464
10677
|
src: "https://streamable.com/o/".concat(id),
|
|
10465
10678
|
frameBorder: "0",
|
|
@@ -10520,16 +10733,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
10520
10733
|
|
|
10521
10734
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
10522
10735
|
|
|
10523
|
-
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
10524
|
-
|
|
10525
10736
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
10526
10737
|
|
|
10527
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
10528
|
-
|
|
10529
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
10530
|
-
|
|
10531
10738
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
10532
10739
|
|
|
10740
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
10741
|
+
|
|
10533
10742
|
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); }
|
|
10534
10743
|
|
|
10535
10744
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -10540,48 +10749,26 @@ var SDK_URL = 'https://fast.wistia.com/assets/external/E-v1.js';
|
|
|
10540
10749
|
var SDK_GLOBAL = 'Wistia';
|
|
10541
10750
|
var MATCH_URL = /(?:wistia\.com|wi\.st)\/(?:medias|embed)\/(.*)$/;
|
|
10542
10751
|
|
|
10543
|
-
var Wistia =
|
|
10752
|
+
var Wistia =
|
|
10753
|
+
/*#__PURE__*/
|
|
10754
|
+
function (_Component) {
|
|
10544
10755
|
_inherits(Wistia, _Component);
|
|
10545
10756
|
|
|
10546
|
-
var _super = _createSuper(Wistia);
|
|
10547
|
-
|
|
10548
10757
|
function Wistia() {
|
|
10758
|
+
var _getPrototypeOf2;
|
|
10759
|
+
|
|
10549
10760
|
var _this;
|
|
10550
10761
|
|
|
10551
10762
|
_classCallCheck(this, Wistia);
|
|
10552
10763
|
|
|
10553
|
-
for (var _len = arguments.length,
|
|
10554
|
-
|
|
10764
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
10765
|
+
args[_key] = arguments[_key];
|
|
10555
10766
|
}
|
|
10556
10767
|
|
|
10557
|
-
_this =
|
|
10768
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Wistia)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
10558
10769
|
|
|
10559
10770
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
10560
10771
|
|
|
10561
|
-
_defineProperty(_assertThisInitialized(_this), "onPlay", function () {
|
|
10562
|
-
var _this$props;
|
|
10563
|
-
|
|
10564
|
-
return (_this$props = _this.props).onPlay.apply(_this$props, arguments);
|
|
10565
|
-
});
|
|
10566
|
-
|
|
10567
|
-
_defineProperty(_assertThisInitialized(_this), "onPause", function () {
|
|
10568
|
-
var _this$props2;
|
|
10569
|
-
|
|
10570
|
-
return (_this$props2 = _this.props).onPause.apply(_this$props2, arguments);
|
|
10571
|
-
});
|
|
10572
|
-
|
|
10573
|
-
_defineProperty(_assertThisInitialized(_this), "onSeek", function () {
|
|
10574
|
-
var _this$props3;
|
|
10575
|
-
|
|
10576
|
-
return (_this$props3 = _this.props).onSeek.apply(_this$props3, arguments);
|
|
10577
|
-
});
|
|
10578
|
-
|
|
10579
|
-
_defineProperty(_assertThisInitialized(_this), "onEnded", function () {
|
|
10580
|
-
var _this$props4;
|
|
10581
|
-
|
|
10582
|
-
return (_this$props4 = _this.props).onEnded.apply(_this$props4, arguments);
|
|
10583
|
-
});
|
|
10584
|
-
|
|
10585
10772
|
_defineProperty(_assertThisInitialized(_this), "mute", function () {
|
|
10586
10773
|
_this.callPlayer('mute');
|
|
10587
10774
|
});
|
|
@@ -10603,13 +10790,17 @@ var Wistia = /*#__PURE__*/function (_Component) {
|
|
|
10603
10790
|
value: function load(url) {
|
|
10604
10791
|
var _this2 = this;
|
|
10605
10792
|
|
|
10606
|
-
var _this$
|
|
10607
|
-
playing = _this$
|
|
10608
|
-
muted = _this$
|
|
10609
|
-
controls = _this$
|
|
10610
|
-
_onReady = _this$
|
|
10611
|
-
|
|
10612
|
-
|
|
10793
|
+
var _this$props = this.props,
|
|
10794
|
+
playing = _this$props.playing,
|
|
10795
|
+
muted = _this$props.muted,
|
|
10796
|
+
controls = _this$props.controls,
|
|
10797
|
+
_onReady = _this$props.onReady,
|
|
10798
|
+
onPlay = _this$props.onPlay,
|
|
10799
|
+
onPause = _this$props.onPause,
|
|
10800
|
+
onSeek = _this$props.onSeek,
|
|
10801
|
+
onEnded = _this$props.onEnded,
|
|
10802
|
+
config = _this$props.config,
|
|
10803
|
+
onError = _this$props.onError;
|
|
10613
10804
|
(0, utils.getSDK)(SDK_URL, SDK_GLOBAL).then(function () {
|
|
10614
10805
|
window._wq = window._wq || [];
|
|
10615
10806
|
|
|
@@ -10626,28 +10817,19 @@ var Wistia = /*#__PURE__*/function (_Component) {
|
|
|
10626
10817
|
|
|
10627
10818
|
_this2.unbind();
|
|
10628
10819
|
|
|
10629
|
-
_this2.player.bind('play',
|
|
10820
|
+
_this2.player.bind('play', onPlay);
|
|
10630
10821
|
|
|
10631
|
-
_this2.player.bind('pause',
|
|
10822
|
+
_this2.player.bind('pause', onPause);
|
|
10632
10823
|
|
|
10633
|
-
_this2.player.bind('seek',
|
|
10824
|
+
_this2.player.bind('seek', onSeek);
|
|
10634
10825
|
|
|
10635
|
-
_this2.player.bind('end',
|
|
10826
|
+
_this2.player.bind('end', onEnded);
|
|
10636
10827
|
|
|
10637
10828
|
_onReady();
|
|
10638
10829
|
}
|
|
10639
10830
|
});
|
|
10640
10831
|
}, onError);
|
|
10641
10832
|
}
|
|
10642
|
-
}, {
|
|
10643
|
-
key: "unbind",
|
|
10644
|
-
value: function unbind() {
|
|
10645
|
-
this.player.unbind('play', this.onPlay);
|
|
10646
|
-
this.player.unbind('pause', this.onPause);
|
|
10647
|
-
this.player.unbind('seek', this.onSeek);
|
|
10648
|
-
this.player.unbind('end', this.onEnded);
|
|
10649
|
-
} // Proxy methods to prevent listener leaks
|
|
10650
|
-
|
|
10651
10833
|
}, {
|
|
10652
10834
|
key: "play",
|
|
10653
10835
|
value: function play() {
|
|
@@ -10658,6 +10840,19 @@ var Wistia = /*#__PURE__*/function (_Component) {
|
|
|
10658
10840
|
value: function pause() {
|
|
10659
10841
|
this.callPlayer('pause');
|
|
10660
10842
|
}
|
|
10843
|
+
}, {
|
|
10844
|
+
key: "unbind",
|
|
10845
|
+
value: function unbind() {
|
|
10846
|
+
var _this$props2 = this.props,
|
|
10847
|
+
onPlay = _this$props2.onPlay,
|
|
10848
|
+
onPause = _this$props2.onPause,
|
|
10849
|
+
onSeek = _this$props2.onSeek,
|
|
10850
|
+
onEnded = _this$props2.onEnded;
|
|
10851
|
+
this.player.unbind('play', onPlay);
|
|
10852
|
+
this.player.unbind('pause', onPause);
|
|
10853
|
+
this.player.unbind('seek', onSeek);
|
|
10854
|
+
this.player.unbind('end', onEnded);
|
|
10855
|
+
}
|
|
10661
10856
|
}, {
|
|
10662
10857
|
key: "stop",
|
|
10663
10858
|
value: function stop() {
|
|
@@ -10703,7 +10898,7 @@ var Wistia = /*#__PURE__*/function (_Component) {
|
|
|
10703
10898
|
width: '100%',
|
|
10704
10899
|
height: '100%'
|
|
10705
10900
|
};
|
|
10706
|
-
return
|
|
10901
|
+
return _react["default"].createElement("div", {
|
|
10707
10902
|
key: id,
|
|
10708
10903
|
className: className,
|
|
10709
10904
|
style: style
|
|
@@ -10763,16 +10958,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
10763
10958
|
|
|
10764
10959
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
10765
10960
|
|
|
10766
|
-
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
10767
|
-
|
|
10768
10961
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
10769
10962
|
|
|
10770
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
10771
|
-
|
|
10772
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
10773
|
-
|
|
10774
10963
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
10775
10964
|
|
|
10965
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
10966
|
+
|
|
10776
10967
|
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); }
|
|
10777
10968
|
|
|
10778
10969
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -10785,12 +10976,14 @@ var MATCH_VIDEO_URL = /(?:www\.|go\.)?twitch\.tv\/videos\/(\d+)($|\?)/;
|
|
|
10785
10976
|
var MATCH_CHANNEL_URL = /(?:www\.|go\.)?twitch\.tv\/([a-z0-9_]+)($|\?)/;
|
|
10786
10977
|
var PLAYER_ID_PREFIX = 'twitch-player-';
|
|
10787
10978
|
|
|
10788
|
-
var Twitch =
|
|
10979
|
+
var Twitch =
|
|
10980
|
+
/*#__PURE__*/
|
|
10981
|
+
function (_Component) {
|
|
10789
10982
|
_inherits(Twitch, _Component);
|
|
10790
10983
|
|
|
10791
|
-
var _super = _createSuper(Twitch);
|
|
10792
|
-
|
|
10793
10984
|
function Twitch() {
|
|
10985
|
+
var _getPrototypeOf2;
|
|
10986
|
+
|
|
10794
10987
|
var _this;
|
|
10795
10988
|
|
|
10796
10989
|
_classCallCheck(this, Twitch);
|
|
@@ -10799,7 +10992,7 @@ var Twitch = /*#__PURE__*/function (_Component) {
|
|
|
10799
10992
|
args[_key] = arguments[_key];
|
|
10800
10993
|
}
|
|
10801
10994
|
|
|
10802
|
-
_this =
|
|
10995
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Twitch)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
10803
10996
|
|
|
10804
10997
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
10805
10998
|
|
|
@@ -10920,7 +11113,7 @@ var Twitch = /*#__PURE__*/function (_Component) {
|
|
|
10920
11113
|
width: '100%',
|
|
10921
11114
|
height: '100%'
|
|
10922
11115
|
};
|
|
10923
|
-
return
|
|
11116
|
+
return _react["default"].createElement("div", {
|
|
10924
11117
|
style: style,
|
|
10925
11118
|
id: this.playerID
|
|
10926
11119
|
});
|
|
@@ -10973,15 +11166,11 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
10973
11166
|
|
|
10974
11167
|
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; }
|
|
10975
11168
|
|
|
10976
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) ||
|
|
10977
|
-
|
|
10978
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
11169
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
|
|
10979
11170
|
|
|
10980
|
-
function
|
|
11171
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
|
|
10981
11172
|
|
|
10982
|
-
function
|
|
10983
|
-
|
|
10984
|
-
function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
11173
|
+
function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { 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; }
|
|
10985
11174
|
|
|
10986
11175
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
10987
11176
|
|
|
@@ -10991,16 +11180,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
10991
11180
|
|
|
10992
11181
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
10993
11182
|
|
|
10994
|
-
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
10995
|
-
|
|
10996
11183
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
10997
11184
|
|
|
10998
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
10999
|
-
|
|
11000
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
11001
|
-
|
|
11002
11185
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
11003
11186
|
|
|
11187
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
11188
|
+
|
|
11004
11189
|
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); }
|
|
11005
11190
|
|
|
11006
11191
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -11012,12 +11197,14 @@ var SDK_GLOBAL = 'DM';
|
|
|
11012
11197
|
var SDK_GLOBAL_READY = 'dmAsyncInit';
|
|
11013
11198
|
var MATCH_URL = /^(?:(?:https?):)?(?:\/\/)?(?:www\.)?(?:(?:dailymotion\.com(?:\/embed)?\/video)|dai\.ly)\/([a-zA-Z0-9]+)(?:_[\w_-]+)?$/;
|
|
11014
11199
|
|
|
11015
|
-
var DailyMotion =
|
|
11200
|
+
var DailyMotion =
|
|
11201
|
+
/*#__PURE__*/
|
|
11202
|
+
function (_Component) {
|
|
11016
11203
|
_inherits(DailyMotion, _Component);
|
|
11017
11204
|
|
|
11018
|
-
var _super = _createSuper(DailyMotion);
|
|
11019
|
-
|
|
11020
11205
|
function DailyMotion() {
|
|
11206
|
+
var _getPrototypeOf2;
|
|
11207
|
+
|
|
11021
11208
|
var _this;
|
|
11022
11209
|
|
|
11023
11210
|
_classCallCheck(this, DailyMotion);
|
|
@@ -11026,7 +11213,7 @@ var DailyMotion = /*#__PURE__*/function (_Component) {
|
|
|
11026
11213
|
args[_key] = arguments[_key];
|
|
11027
11214
|
}
|
|
11028
11215
|
|
|
11029
|
-
_this =
|
|
11216
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(DailyMotion)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
11030
11217
|
|
|
11031
11218
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
11032
11219
|
|
|
@@ -11155,9 +11342,9 @@ var DailyMotion = /*#__PURE__*/function (_Component) {
|
|
|
11155
11342
|
height: '100%',
|
|
11156
11343
|
display: display
|
|
11157
11344
|
};
|
|
11158
|
-
return
|
|
11345
|
+
return _react["default"].createElement("div", {
|
|
11159
11346
|
style: style
|
|
11160
|
-
},
|
|
11347
|
+
}, _react["default"].createElement("div", {
|
|
11161
11348
|
ref: this.ref
|
|
11162
11349
|
}));
|
|
11163
11350
|
}
|
|
@@ -11215,16 +11402,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
11215
11402
|
|
|
11216
11403
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
11217
11404
|
|
|
11218
|
-
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
11219
|
-
|
|
11220
11405
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
11221
11406
|
|
|
11222
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
11223
|
-
|
|
11224
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
11225
|
-
|
|
11226
11407
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
11227
11408
|
|
|
11409
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
11410
|
+
|
|
11228
11411
|
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); }
|
|
11229
11412
|
|
|
11230
11413
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -11235,12 +11418,14 @@ var SDK_URL = 'https://widget.mixcloud.com/media/js/widgetApi.js';
|
|
|
11235
11418
|
var SDK_GLOBAL = 'Mixcloud';
|
|
11236
11419
|
var MATCH_URL = /mixcloud\.com\/([^/]+\/[^/]+)/;
|
|
11237
11420
|
|
|
11238
|
-
var Mixcloud =
|
|
11421
|
+
var Mixcloud =
|
|
11422
|
+
/*#__PURE__*/
|
|
11423
|
+
function (_Component) {
|
|
11239
11424
|
_inherits(Mixcloud, _Component);
|
|
11240
11425
|
|
|
11241
|
-
var _super = _createSuper(Mixcloud);
|
|
11242
|
-
|
|
11243
11426
|
function Mixcloud() {
|
|
11427
|
+
var _getPrototypeOf2;
|
|
11428
|
+
|
|
11244
11429
|
var _this;
|
|
11245
11430
|
|
|
11246
11431
|
_classCallCheck(this, Mixcloud);
|
|
@@ -11249,7 +11434,7 @@ var Mixcloud = /*#__PURE__*/function (_Component) {
|
|
|
11249
11434
|
args[_key] = arguments[_key];
|
|
11250
11435
|
}
|
|
11251
11436
|
|
|
11252
|
-
_this =
|
|
11437
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Mixcloud)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
11253
11438
|
|
|
11254
11439
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
11255
11440
|
|
|
@@ -11352,7 +11537,7 @@ var Mixcloud = /*#__PURE__*/function (_Component) {
|
|
|
11352
11537
|
})); // We have to give the iframe a key here to prevent a
|
|
11353
11538
|
// weird dialog appearing when loading a new track
|
|
11354
11539
|
|
|
11355
|
-
return
|
|
11540
|
+
return _react["default"].createElement("iframe", {
|
|
11356
11541
|
key: id,
|
|
11357
11542
|
ref: this.ref,
|
|
11358
11543
|
style: style,
|
|
@@ -11412,33 +11597,23 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
11412
11597
|
|
|
11413
11598
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
11414
11599
|
|
|
11415
|
-
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
11416
|
-
|
|
11417
11600
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
11418
11601
|
|
|
11419
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
11420
|
-
|
|
11421
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
11422
|
-
|
|
11423
11602
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
11424
11603
|
|
|
11604
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
11605
|
+
|
|
11425
11606
|
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); }
|
|
11426
11607
|
|
|
11427
11608
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
11428
11609
|
|
|
11429
11610
|
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; }
|
|
11430
11611
|
|
|
11431
|
-
function _createForOfIteratorHelper(o) { if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (o = _unsupportedIterableToArray(o))) { var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var it, normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
11432
|
-
|
|
11433
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
11434
|
-
|
|
11435
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
11436
|
-
|
|
11437
11612
|
var IOS = typeof navigator !== 'undefined' && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
|
|
11438
11613
|
var AUDIO_EXTENSIONS = /\.(m4a|mp4a|mpga|mp2|mp2a|mp3|m2a|m3a|wav|weba|aac|oga|spx)($|\?)/i;
|
|
11439
11614
|
var VIDEO_EXTENSIONS = /\.(mp4|og[gv]|webm|mov|m4v)($|\?)/i;
|
|
11440
11615
|
var HLS_EXTENSIONS = /\.(m3u8)($|\?)/i;
|
|
11441
|
-
var HLS_SDK_URL = 'https://cdn.jsdelivr.net/npm/hls.js@VERSION
|
|
11616
|
+
var HLS_SDK_URL = 'https://cdn.jsdelivr.net/npm/hls.js@VERSION';
|
|
11442
11617
|
var HLS_GLOBAL = 'Hls';
|
|
11443
11618
|
var DASH_EXTENSIONS = /\.(mpd)($|\?)/i;
|
|
11444
11619
|
var DASH_SDK_URL = 'https://cdnjs.cloudflare.com/ajax/libs/dashjs/VERSION/dash.all.min.js';
|
|
@@ -11447,11 +11622,12 @@ var MATCH_DROPBOX_URL = /www\.dropbox\.com\/.+/;
|
|
|
11447
11622
|
|
|
11448
11623
|
function canPlay(url) {
|
|
11449
11624
|
if (url instanceof Array) {
|
|
11450
|
-
var
|
|
11451
|
-
|
|
11625
|
+
var _iteratorNormalCompletion = true;
|
|
11626
|
+
var _didIteratorError = false;
|
|
11627
|
+
var _iteratorError = undefined;
|
|
11452
11628
|
|
|
11453
11629
|
try {
|
|
11454
|
-
for (_iterator.
|
|
11630
|
+
for (var _iterator = url[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
11455
11631
|
var item = _step.value;
|
|
11456
11632
|
|
|
11457
11633
|
if (typeof item === 'string' && canPlay(item)) {
|
|
@@ -11463,9 +11639,18 @@ function canPlay(url) {
|
|
|
11463
11639
|
}
|
|
11464
11640
|
}
|
|
11465
11641
|
} catch (err) {
|
|
11466
|
-
|
|
11642
|
+
_didIteratorError = true;
|
|
11643
|
+
_iteratorError = err;
|
|
11467
11644
|
} finally {
|
|
11468
|
-
|
|
11645
|
+
try {
|
|
11646
|
+
if (!_iteratorNormalCompletion && _iterator["return"] != null) {
|
|
11647
|
+
_iterator["return"]();
|
|
11648
|
+
}
|
|
11649
|
+
} finally {
|
|
11650
|
+
if (_didIteratorError) {
|
|
11651
|
+
throw _iteratorError;
|
|
11652
|
+
}
|
|
11653
|
+
}
|
|
11469
11654
|
}
|
|
11470
11655
|
|
|
11471
11656
|
return false;
|
|
@@ -11489,12 +11674,14 @@ function canEnablePIP(url) {
|
|
|
11489
11674
|
return canPlay(url) && (!!document.pictureInPictureEnabled || supportsWebKitPresentationMode()) && !AUDIO_EXTENSIONS.test(url);
|
|
11490
11675
|
}
|
|
11491
11676
|
|
|
11492
|
-
var FilePlayer =
|
|
11677
|
+
var FilePlayer =
|
|
11678
|
+
/*#__PURE__*/
|
|
11679
|
+
function (_Component) {
|
|
11493
11680
|
_inherits(FilePlayer, _Component);
|
|
11494
11681
|
|
|
11495
|
-
var _super = _createSuper(FilePlayer);
|
|
11496
|
-
|
|
11497
11682
|
function FilePlayer() {
|
|
11683
|
+
var _getPrototypeOf2;
|
|
11684
|
+
|
|
11498
11685
|
var _this;
|
|
11499
11686
|
|
|
11500
11687
|
_classCallCheck(this, FilePlayer);
|
|
@@ -11503,7 +11690,7 @@ var FilePlayer = /*#__PURE__*/function (_Component) {
|
|
|
11503
11690
|
_args[_key] = arguments[_key];
|
|
11504
11691
|
}
|
|
11505
11692
|
|
|
11506
|
-
_this =
|
|
11693
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(FilePlayer)).call.apply(_getPrototypeOf2, [this].concat(_args)));
|
|
11507
11694
|
|
|
11508
11695
|
_defineProperty(_assertThisInitialized(_this), "onReady", function () {
|
|
11509
11696
|
var _this$props;
|
|
@@ -11590,19 +11777,19 @@ var FilePlayer = /*#__PURE__*/function (_Component) {
|
|
|
11590
11777
|
|
|
11591
11778
|
_defineProperty(_assertThisInitialized(_this), "renderSourceElement", function (source, index) {
|
|
11592
11779
|
if (typeof source === 'string') {
|
|
11593
|
-
return
|
|
11780
|
+
return _react["default"].createElement("source", {
|
|
11594
11781
|
key: index,
|
|
11595
11782
|
src: source
|
|
11596
11783
|
});
|
|
11597
11784
|
}
|
|
11598
11785
|
|
|
11599
|
-
return
|
|
11786
|
+
return _react["default"].createElement("source", _extends({
|
|
11600
11787
|
key: index
|
|
11601
11788
|
}, source));
|
|
11602
11789
|
});
|
|
11603
11790
|
|
|
11604
11791
|
_defineProperty(_assertThisInitialized(_this), "renderTrack", function (track, index) {
|
|
11605
|
-
return
|
|
11792
|
+
return _react["default"].createElement("track", _extends({
|
|
11606
11793
|
key: index
|
|
11607
11794
|
}, track));
|
|
11608
11795
|
});
|
|
@@ -11640,10 +11827,6 @@ var FilePlayer = /*#__PURE__*/function (_Component) {
|
|
|
11640
11827
|
key: "componentWillUnmount",
|
|
11641
11828
|
value: function componentWillUnmount() {
|
|
11642
11829
|
this.removeListeners(this.player);
|
|
11643
|
-
|
|
11644
|
-
if (this.hls) {
|
|
11645
|
-
this.hls.destroy();
|
|
11646
|
-
}
|
|
11647
11830
|
}
|
|
11648
11831
|
}, {
|
|
11649
11832
|
key: "addListeners",
|
|
@@ -11774,6 +11957,10 @@ var FilePlayer = /*#__PURE__*/function (_Component) {
|
|
|
11774
11957
|
value: function stop() {
|
|
11775
11958
|
this.player.removeAttribute('src');
|
|
11776
11959
|
|
|
11960
|
+
if (this.hls) {
|
|
11961
|
+
this.hls.destroy();
|
|
11962
|
+
}
|
|
11963
|
+
|
|
11777
11964
|
if (this.dash) {
|
|
11778
11965
|
this.dash.reset();
|
|
11779
11966
|
}
|
|
@@ -11885,7 +12072,7 @@ var FilePlayer = /*#__PURE__*/function (_Component) {
|
|
|
11885
12072
|
width: width === 'auto' ? width : '100%',
|
|
11886
12073
|
height: height === 'auto' ? height : '100%'
|
|
11887
12074
|
};
|
|
11888
|
-
return
|
|
12075
|
+
return _react["default"].createElement(Element, _extends({
|
|
11889
12076
|
ref: this.ref,
|
|
11890
12077
|
src: this.getSource(url),
|
|
11891
12078
|
style: style,
|
|
@@ -11975,16 +12162,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
11975
12162
|
|
|
11976
12163
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
11977
12164
|
|
|
11978
|
-
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
11979
|
-
|
|
11980
12165
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
11981
12166
|
|
|
11982
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
11983
|
-
|
|
11984
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
11985
|
-
|
|
11986
12167
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
11987
12168
|
|
|
12169
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
12170
|
+
|
|
11988
12171
|
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); }
|
|
11989
12172
|
|
|
11990
12173
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -11993,12 +12176,14 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
11993
12176
|
|
|
11994
12177
|
var ICON_SIZE = '64px';
|
|
11995
12178
|
|
|
11996
|
-
var Preview =
|
|
12179
|
+
var Preview =
|
|
12180
|
+
/*#__PURE__*/
|
|
12181
|
+
function (_Component) {
|
|
11997
12182
|
_inherits(Preview, _Component);
|
|
11998
12183
|
|
|
11999
|
-
var _super = _createSuper(Preview);
|
|
12000
|
-
|
|
12001
12184
|
function Preview() {
|
|
12185
|
+
var _getPrototypeOf2;
|
|
12186
|
+
|
|
12002
12187
|
var _this;
|
|
12003
12188
|
|
|
12004
12189
|
_classCallCheck(this, Preview);
|
|
@@ -12007,7 +12192,7 @@ var Preview = /*#__PURE__*/function (_Component) {
|
|
|
12007
12192
|
args[_key] = arguments[_key];
|
|
12008
12193
|
}
|
|
12009
12194
|
|
|
12010
|
-
_this =
|
|
12195
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Preview)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
12011
12196
|
|
|
12012
12197
|
_defineProperty(_assertThisInitialized(_this), "mounted", false);
|
|
12013
12198
|
|
|
@@ -12105,15 +12290,15 @@ var Preview = /*#__PURE__*/function (_Component) {
|
|
|
12105
12290
|
}
|
|
12106
12291
|
};
|
|
12107
12292
|
|
|
12108
|
-
var defaultPlayIcon =
|
|
12293
|
+
var defaultPlayIcon = _react["default"].createElement("div", {
|
|
12109
12294
|
style: styles.shadow,
|
|
12110
12295
|
className: "react-player__shadow"
|
|
12111
|
-
},
|
|
12296
|
+
}, _react["default"].createElement("div", {
|
|
12112
12297
|
style: styles.playIcon,
|
|
12113
12298
|
className: "react-player__play-icon"
|
|
12114
12299
|
}));
|
|
12115
12300
|
|
|
12116
|
-
return
|
|
12301
|
+
return _react["default"].createElement("div", {
|
|
12117
12302
|
style: styles.preview,
|
|
12118
12303
|
className: "react-player__preview",
|
|
12119
12304
|
onClick: onClick
|
|
@@ -12150,12 +12335,6 @@ var _Player = _interopRequireDefault(Player_1);
|
|
|
12150
12335
|
|
|
12151
12336
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
12152
12337
|
|
|
12153
|
-
function _createForOfIteratorHelper(o) { if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (o = _unsupportedIterableToArray(o))) { var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var it, normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
12154
|
-
|
|
12155
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
12156
|
-
|
|
12157
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
12158
|
-
|
|
12159
12338
|
var PRELOAD_PLAYERS = [{
|
|
12160
12339
|
Player: YouTube_1.YouTube,
|
|
12161
12340
|
configKey: 'youtube',
|
|
@@ -12176,16 +12355,16 @@ var PRELOAD_PLAYERS = [{
|
|
|
12176
12355
|
|
|
12177
12356
|
function renderPreloadPlayers(url, controls, config) {
|
|
12178
12357
|
var players = [];
|
|
12179
|
-
|
|
12180
|
-
var
|
|
12181
|
-
|
|
12358
|
+
var _iteratorNormalCompletion = true;
|
|
12359
|
+
var _didIteratorError = false;
|
|
12360
|
+
var _iteratorError = undefined;
|
|
12182
12361
|
|
|
12183
12362
|
try {
|
|
12184
|
-
for (_iterator.
|
|
12363
|
+
for (var _iterator = PRELOAD_PLAYERS[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
12185
12364
|
var player = _step.value;
|
|
12186
12365
|
|
|
12187
12366
|
if (!player.Player.canPlay(url) && config[player.configKey].preload) {
|
|
12188
|
-
players.push(
|
|
12367
|
+
players.push(_react["default"].createElement(_Player["default"], {
|
|
12189
12368
|
key: player.Player.displayName,
|
|
12190
12369
|
activePlayer: player.Player,
|
|
12191
12370
|
url: player.url,
|
|
@@ -12197,9 +12376,18 @@ function renderPreloadPlayers(url, controls, config) {
|
|
|
12197
12376
|
}
|
|
12198
12377
|
}
|
|
12199
12378
|
} catch (err) {
|
|
12200
|
-
|
|
12379
|
+
_didIteratorError = true;
|
|
12380
|
+
_iteratorError = err;
|
|
12201
12381
|
} finally {
|
|
12202
|
-
|
|
12382
|
+
try {
|
|
12383
|
+
if (!_iteratorNormalCompletion && _iterator["return"] != null) {
|
|
12384
|
+
_iterator["return"]();
|
|
12385
|
+
}
|
|
12386
|
+
} finally {
|
|
12387
|
+
if (_didIteratorError) {
|
|
12388
|
+
throw _iteratorError;
|
|
12389
|
+
}
|
|
12390
|
+
}
|
|
12203
12391
|
}
|
|
12204
12392
|
|
|
12205
12393
|
return players;
|
|
@@ -12323,17 +12511,13 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
12323
12511
|
|
|
12324
12512
|
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); }
|
|
12325
12513
|
|
|
12326
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) ||
|
|
12327
|
-
|
|
12328
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
12329
|
-
|
|
12330
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
12514
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }
|
|
12331
12515
|
|
|
12332
|
-
function
|
|
12516
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); }
|
|
12333
12517
|
|
|
12334
|
-
function
|
|
12518
|
+
function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); }
|
|
12335
12519
|
|
|
12336
|
-
function
|
|
12520
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }
|
|
12337
12521
|
|
|
12338
12522
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
12339
12523
|
|
|
@@ -12341,16 +12525,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
12341
12525
|
|
|
12342
12526
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
12343
12527
|
|
|
12344
|
-
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
12345
|
-
|
|
12346
12528
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
12347
12529
|
|
|
12348
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
12349
|
-
|
|
12350
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
12351
|
-
|
|
12352
12530
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
12353
12531
|
|
|
12532
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
12533
|
+
|
|
12354
12534
|
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); }
|
|
12355
12535
|
|
|
12356
12536
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -12360,12 +12540,14 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
12360
12540
|
var SUPPORTED_PROPS = Object.keys(props.propTypes);
|
|
12361
12541
|
var customPlayers = [];
|
|
12362
12542
|
|
|
12363
|
-
var ReactPlayer =
|
|
12543
|
+
var ReactPlayer =
|
|
12544
|
+
/*#__PURE__*/
|
|
12545
|
+
function (_Component) {
|
|
12364
12546
|
_inherits(ReactPlayer, _Component);
|
|
12365
12547
|
|
|
12366
|
-
var _super = _createSuper(ReactPlayer);
|
|
12367
|
-
|
|
12368
12548
|
function ReactPlayer() {
|
|
12549
|
+
var _getPrototypeOf2;
|
|
12550
|
+
|
|
12369
12551
|
var _this;
|
|
12370
12552
|
|
|
12371
12553
|
_classCallCheck(this, ReactPlayer);
|
|
@@ -12374,7 +12556,7 @@ var ReactPlayer = /*#__PURE__*/function (_Component) {
|
|
|
12374
12556
|
args[_key] = arguments[_key];
|
|
12375
12557
|
}
|
|
12376
12558
|
|
|
12377
|
-
_this =
|
|
12559
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(ReactPlayer)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
12378
12560
|
|
|
12379
12561
|
_defineProperty(_assertThisInitialized(_this), "config", (0, utils.getConfig)(_this.props, props.defaultProps, true));
|
|
12380
12562
|
|
|
@@ -12485,7 +12667,7 @@ var ReactPlayer = /*#__PURE__*/function (_Component) {
|
|
|
12485
12667
|
key: "renderActivePlayer",
|
|
12486
12668
|
value: function renderActivePlayer(url, activePlayer) {
|
|
12487
12669
|
if (!url) return null;
|
|
12488
|
-
return
|
|
12670
|
+
return _react["default"].createElement(_Player4["default"], _extends({}, this.props, {
|
|
12489
12671
|
key: activePlayer.displayName,
|
|
12490
12672
|
ref: this.activePlayerRef,
|
|
12491
12673
|
config: this.config,
|
|
@@ -12522,14 +12704,14 @@ var ReactPlayer = /*#__PURE__*/function (_Component) {
|
|
|
12522
12704
|
var preloadPlayers = (0, _preload["default"])(url, controls, this.config);
|
|
12523
12705
|
var players = [renderedActivePlayer].concat(_toConsumableArray(preloadPlayers)).sort(this.sortPlayers);
|
|
12524
12706
|
|
|
12525
|
-
var preview =
|
|
12707
|
+
var preview = _react["default"].createElement(_Preview["default"], {
|
|
12526
12708
|
url: url,
|
|
12527
12709
|
light: light,
|
|
12528
12710
|
playIcon: playIcon,
|
|
12529
12711
|
onClick: this.handleClickPreview
|
|
12530
12712
|
});
|
|
12531
12713
|
|
|
12532
|
-
return
|
|
12714
|
+
return _react["default"].createElement(Wrapper, _extends({
|
|
12533
12715
|
ref: this.wrapperRef,
|
|
12534
12716
|
style: _objectSpread({}, style, {
|
|
12535
12717
|
width: width,
|
|
@@ -12642,34 +12824,29 @@ var YouTubeGallery = function YouTubeGallery(_ref) {
|
|
|
12642
12824
|
intervalID = _useState6[0],
|
|
12643
12825
|
setIntervalID = _useState6[1];
|
|
12644
12826
|
|
|
12645
|
-
var _useState7 = useState(null),
|
|
12646
|
-
_useState8 = _slicedToArray(_useState7, 2),
|
|
12647
|
-
segmentData = _useState8[0],
|
|
12648
|
-
setSegemntData = _useState8[1];
|
|
12649
|
-
|
|
12650
12827
|
var queueProgress = [];
|
|
12651
12828
|
|
|
12652
12829
|
//state
|
|
12653
12830
|
|
|
12654
|
-
var
|
|
12831
|
+
var _useState7 = useState(''),
|
|
12832
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
12833
|
+
vidUrl = _useState8[0],
|
|
12834
|
+
setVidUrl = _useState8[1];
|
|
12835
|
+
|
|
12836
|
+
var _useState9 = useState('youtube'),
|
|
12655
12837
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
12656
|
-
|
|
12657
|
-
|
|
12838
|
+
vidType = _useState10[0],
|
|
12839
|
+
setVidType = _useState10[1];
|
|
12658
12840
|
|
|
12659
|
-
var _useState11 = useState('
|
|
12841
|
+
var _useState11 = useState(''),
|
|
12660
12842
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
12661
|
-
|
|
12662
|
-
|
|
12843
|
+
series = _useState12[0],
|
|
12844
|
+
setSeries = _useState12[1];
|
|
12663
12845
|
|
|
12664
|
-
var _useState13 = useState(
|
|
12846
|
+
var _useState13 = useState([]),
|
|
12665
12847
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
12666
|
-
|
|
12667
|
-
|
|
12668
|
-
|
|
12669
|
-
var _useState15 = useState([]),
|
|
12670
|
-
_useState16 = _slicedToArray(_useState15, 2),
|
|
12671
|
-
seriesData = _useState16[0],
|
|
12672
|
-
setData = _useState16[1];
|
|
12848
|
+
seriesData = _useState14[0],
|
|
12849
|
+
setData = _useState14[1];
|
|
12673
12850
|
//variables
|
|
12674
12851
|
|
|
12675
12852
|
|
|
@@ -12714,13 +12891,6 @@ var YouTubeGallery = function YouTubeGallery(_ref) {
|
|
|
12714
12891
|
setData(data);
|
|
12715
12892
|
}, []);
|
|
12716
12893
|
|
|
12717
|
-
useEffect(function () {
|
|
12718
|
-
if (segmentData) {
|
|
12719
|
-
console.log('Video Segment', segmentData);
|
|
12720
|
-
Beam.report_beam_video('Segment', main_16, segmentData.duration, segmentData.current, segmentData.segment);
|
|
12721
|
-
}
|
|
12722
|
-
}, [segmentData]);
|
|
12723
|
-
|
|
12724
12894
|
function toggleSeries() {
|
|
12725
12895
|
var series = document.querySelector('.vid-series');
|
|
12726
12896
|
if (series.classList.contains('active')) {
|
|
@@ -12742,10 +12912,18 @@ var YouTubeGallery = function YouTubeGallery(_ref) {
|
|
|
12742
12912
|
setSeries(vidIndex);
|
|
12743
12913
|
}
|
|
12744
12914
|
|
|
12915
|
+
var handleOnReady = function handleOnReady(event) {
|
|
12916
|
+
var player = event.target;
|
|
12917
|
+
var current = player.getCurrentTime();
|
|
12918
|
+
var duration = player.getDuration();
|
|
12919
|
+
var queue = Math.floor(duration / 10);
|
|
12920
|
+
var segment = Math.floor(current / queue);
|
|
12921
|
+
Beam.report_beam_video('Ready', main_16, duration, current, segment);
|
|
12922
|
+
};
|
|
12923
|
+
|
|
12745
12924
|
// Handle video end
|
|
12746
12925
|
function handleOnEnd(e) {
|
|
12747
12926
|
if (!endReported) {
|
|
12748
|
-
console.log('Video End', e);
|
|
12749
12927
|
var player = e.target;
|
|
12750
12928
|
var current = player.getCurrentTime();
|
|
12751
12929
|
var duration = player.getDuration();
|
|
@@ -12794,28 +12972,22 @@ var YouTubeGallery = function YouTubeGallery(_ref) {
|
|
|
12794
12972
|
var segment = Math.floor(current / queue);
|
|
12795
12973
|
|
|
12796
12974
|
if (!queueProgress.includes(segment)) {
|
|
12797
|
-
|
|
12798
|
-
current: current,
|
|
12799
|
-
duration: duration,
|
|
12800
|
-
queue: queue,
|
|
12801
|
-
segment: segment
|
|
12802
|
-
});
|
|
12975
|
+
Beam.report_beam_video('Segment', main_16, duration, current, segment);
|
|
12803
12976
|
queueProgress.push(segment);
|
|
12804
12977
|
}
|
|
12805
12978
|
};
|
|
12806
12979
|
|
|
12807
12980
|
var handleOnPlay = function handleOnPlay(event) {
|
|
12808
12981
|
// report play
|
|
12809
|
-
|
|
12810
|
-
|
|
12982
|
+
var player = event.target;
|
|
12983
|
+
var current = player.getCurrentTime();
|
|
12984
|
+
var duration = player.getDuration();
|
|
12985
|
+
var queue = Math.floor(duration / 10);
|
|
12986
|
+
var segment = Math.floor(current / queue);
|
|
12811
12987
|
|
|
12812
|
-
|
|
12813
|
-
var current = player.getCurrentTime();
|
|
12814
|
-
var duration = player.getDuration();
|
|
12815
|
-
var queue = Math.floor(duration / 10);
|
|
12816
|
-
var segment = Math.floor(current / queue);
|
|
12988
|
+
Beam.report_beam_video('Play', main_16, duration, current, segment);
|
|
12817
12989
|
|
|
12818
|
-
|
|
12990
|
+
if (!playReported) {
|
|
12819
12991
|
setPlayReported(true);
|
|
12820
12992
|
var _intervalID = setInterval(function () {
|
|
12821
12993
|
handlePlayPercent(event.target);
|
|
@@ -12825,7 +12997,6 @@ var YouTubeGallery = function YouTubeGallery(_ref) {
|
|
|
12825
12997
|
};
|
|
12826
12998
|
|
|
12827
12999
|
var handleOnPause = function handleOnPause(event) {
|
|
12828
|
-
console.log('Video Pause');
|
|
12829
13000
|
var player = event.target;
|
|
12830
13001
|
var current = player.getCurrentTime();
|
|
12831
13002
|
var duration = player.getDuration();
|
|
@@ -12849,7 +13020,7 @@ var YouTubeGallery = function YouTubeGallery(_ref) {
|
|
|
12849
13020
|
React__default.createElement(
|
|
12850
13021
|
'div',
|
|
12851
13022
|
{ className: 'video-block', style: { position: 'relative', overflow: 'hidden' } },
|
|
12852
|
-
vidUrl && vidType == 'youtube' ? React__default.createElement(YouTube, { videoId: getYoutubeId(vidUrl), opts: opts, onPlay: handleOnPlay, onPause: handleOnPause, onEnd: function onEnd(e) {
|
|
13023
|
+
vidUrl && vidType == 'youtube' ? React__default.createElement(YouTube, { videoId: getYoutubeId(vidUrl), opts: opts, onReady: handleOnReady, onPlay: handleOnPlay, onPause: handleOnPause, onEnd: function onEnd(e) {
|
|
12853
13024
|
return handleOnEnd(e);
|
|
12854
13025
|
} }) : React__default.createElement(
|
|
12855
13026
|
'video',
|
|
@@ -13847,16 +14018,16 @@ var RelatedTopicsDropdown = function RelatedTopicsDropdown(_ref) {
|
|
|
13847
14018
|
_ref$className = _ref.className,
|
|
13848
14019
|
className = _ref$className === undefined ? '' : _ref$className;
|
|
13849
14020
|
|
|
13850
|
-
/*
|
|
13851
|
-
Props accepted - parentTaxonomy(required, object), subTaxonomy(required, array), page(optional), exclude(optional), variant(optional), className(optional)
|
|
13852
|
-
example:
|
|
13853
|
-
<RelatedTopicDropdown
|
|
13854
|
-
page='/clinical'
|
|
13855
|
-
exclude="clinical"
|
|
13856
|
-
className='mb-3'
|
|
13857
|
-
parentTaxonomy={props.parentTaxonomy}
|
|
13858
|
-
subTaxonomies={props.subTaxonomies}
|
|
13859
|
-
/>
|
|
14021
|
+
/*
|
|
14022
|
+
Props accepted - parentTaxonomy(required, object), subTaxonomy(required, array), page(optional), exclude(optional), variant(optional), className(optional)
|
|
14023
|
+
example:
|
|
14024
|
+
<RelatedTopicDropdown
|
|
14025
|
+
page='/clinical'
|
|
14026
|
+
exclude="clinical"
|
|
14027
|
+
className='mb-3'
|
|
14028
|
+
parentTaxonomy={props.parentTaxonomy}
|
|
14029
|
+
subTaxonomies={props.subTaxonomies}
|
|
14030
|
+
/>
|
|
13860
14031
|
*/
|
|
13861
14032
|
if (subTaxonomies.length === 0 && parentTaxonomy) {
|
|
13862
14033
|
if (parentTaxonomy.identifier == exclude) {
|
|
@@ -13894,19 +14065,19 @@ var RelatedTopicsDropdown = function RelatedTopicsDropdown(_ref) {
|
|
|
13894
14065
|
}
|
|
13895
14066
|
};
|
|
13896
14067
|
|
|
13897
|
-
/*
|
|
13898
|
-
This dropdown is used inside Article body to display related content placement pages
|
|
13899
|
-
sample usage: <ArticleDetailDropdown contentPlacement={content_placement} exclude={['News',]} />
|
|
13900
|
-
|
|
13901
|
-
in article query, need to add '...' to content_placement to retreive additional info needed
|
|
13902
|
-
|
|
13903
|
-
'content_placement': taxonomyMapping[]-> {
|
|
13904
|
-
...,
|
|
13905
|
-
'ancestor': parent->parent->identifier,
|
|
13906
|
-
'parent': parent->identifier,
|
|
13907
|
-
'path': identifier
|
|
13908
|
-
}
|
|
13909
|
-
|
|
14068
|
+
/*
|
|
14069
|
+
This dropdown is used inside Article body to display related content placement pages
|
|
14070
|
+
sample usage: <ArticleDetailDropdown contentPlacement={content_placement} exclude={['News',]} />
|
|
14071
|
+
|
|
14072
|
+
in article query, need to add '...' to content_placement to retreive additional info needed
|
|
14073
|
+
|
|
14074
|
+
'content_placement': taxonomyMapping[]-> {
|
|
14075
|
+
...,
|
|
14076
|
+
'ancestor': parent->parent->identifier,
|
|
14077
|
+
'parent': parent->identifier,
|
|
14078
|
+
'path': identifier
|
|
14079
|
+
}
|
|
14080
|
+
|
|
13910
14081
|
*/
|
|
13911
14082
|
|
|
13912
14083
|
var ArticleDetailDropdown = function ArticleDetailDropdown(props) {
|
|
@@ -14739,34 +14910,34 @@ var GridHero = function GridHero(props) {
|
|
|
14739
14910
|
);
|
|
14740
14911
|
};
|
|
14741
14912
|
|
|
14742
|
-
/*
|
|
14743
|
-
Sample query
|
|
14744
|
-
let references = ''
|
|
14745
|
-
if(article.taxonomyMapping.length > 0){
|
|
14746
|
-
article.taxonomyMapping.forEach((ref, index) => {
|
|
14747
|
-
references = references + `references('${ref._ref}') `
|
|
14748
|
-
if(index+1 !== article.taxonomyMapping.length){
|
|
14749
|
-
references = references + ` && `
|
|
14750
|
-
}
|
|
14751
|
-
})
|
|
14752
|
-
}
|
|
14753
|
-
|
|
14754
|
-
const relatedArticlesQuery = `*[!(_id in path("drafts.**")) && _type == "article" && title !='${article.title}' && defined(title) && is_visible == true && ( references('article.documentGroup._id') || ${references} ) && published <= '${today}'] | order(published desc) [0...4] {
|
|
14755
|
-
...,
|
|
14756
|
-
title,
|
|
14757
|
-
summary,
|
|
14758
|
-
thumbnail,
|
|
14759
|
-
url,
|
|
14760
|
-
published,
|
|
14761
|
-
authorMapping[]->,
|
|
14762
|
-
contentCategory->
|
|
14763
|
-
}`
|
|
14764
|
-
const relatedArticles = await client.fetch(relatedArticlesQuery)
|
|
14765
|
-
|
|
14766
|
-
Sample usage
|
|
14767
|
-
<RelatedContent dataRecord={props.relatedArticles} client={client} showAuthor showPublished reverse/>
|
|
14768
|
-
|
|
14769
|
-
|
|
14913
|
+
/*
|
|
14914
|
+
Sample query
|
|
14915
|
+
let references = ''
|
|
14916
|
+
if(article.taxonomyMapping.length > 0){
|
|
14917
|
+
article.taxonomyMapping.forEach((ref, index) => {
|
|
14918
|
+
references = references + `references('${ref._ref}') `
|
|
14919
|
+
if(index+1 !== article.taxonomyMapping.length){
|
|
14920
|
+
references = references + ` && `
|
|
14921
|
+
}
|
|
14922
|
+
})
|
|
14923
|
+
}
|
|
14924
|
+
|
|
14925
|
+
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] {
|
|
14926
|
+
...,
|
|
14927
|
+
title,
|
|
14928
|
+
summary,
|
|
14929
|
+
thumbnail,
|
|
14930
|
+
url,
|
|
14931
|
+
published,
|
|
14932
|
+
authorMapping[]->,
|
|
14933
|
+
contentCategory->
|
|
14934
|
+
}`
|
|
14935
|
+
const relatedArticles = await client.fetch(relatedArticlesQuery)
|
|
14936
|
+
|
|
14937
|
+
Sample usage
|
|
14938
|
+
<RelatedContent dataRecord={props.relatedArticles} client={client} showAuthor showPublished reverse/>
|
|
14939
|
+
|
|
14940
|
+
|
|
14770
14941
|
*/
|
|
14771
14942
|
var RelatedContent = function RelatedContent(props) {
|
|
14772
14943
|
var client = props.client,
|
|
@@ -14833,21 +15004,21 @@ var RelatedContent = function RelatedContent(props) {
|
|
|
14833
15004
|
);
|
|
14834
15005
|
};
|
|
14835
15006
|
|
|
14836
|
-
/*
|
|
14837
|
-
Example usage - targetedonc.com/latest-conference
|
|
14838
|
-
const query = `*[!(_id in path("drafts.**")) && _type == "article" && defined(title) && is_visible == true && published <= '${today}' && references('b49d36b8-aa56-4183-a2bc-1568c229fb72') ] | order(published desc) [$from...$to] {
|
|
14839
|
-
...,
|
|
14840
|
-
title,
|
|
14841
|
-
summary,
|
|
14842
|
-
thumbnail,
|
|
14843
|
-
url,
|
|
14844
|
-
published,
|
|
14845
|
-
documentGroup->,
|
|
14846
|
-
contentCategory->,
|
|
14847
|
-
'pageNumber': ${currentPage}
|
|
14848
|
-
}`
|
|
14849
|
-
|
|
14850
|
-
const posts = await client.fetch(query, params)
|
|
15007
|
+
/*
|
|
15008
|
+
Example usage - targetedonc.com/latest-conference
|
|
15009
|
+
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] {
|
|
15010
|
+
...,
|
|
15011
|
+
title,
|
|
15012
|
+
summary,
|
|
15013
|
+
thumbnail,
|
|
15014
|
+
url,
|
|
15015
|
+
published,
|
|
15016
|
+
documentGroup->,
|
|
15017
|
+
contentCategory->,
|
|
15018
|
+
'pageNumber': ${currentPage}
|
|
15019
|
+
}`
|
|
15020
|
+
|
|
15021
|
+
const posts = await client.fetch(query, params)
|
|
14851
15022
|
*/
|
|
14852
15023
|
|
|
14853
15024
|
var ConferenceArticleCard = function ConferenceArticleCard(props) {
|
|
@@ -15474,27 +15645,27 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
15474
15645
|
};
|
|
15475
15646
|
|
|
15476
15647
|
var KMTracker = function KMTracker(props) {
|
|
15477
|
-
|
|
15648
|
+
var id = props.id;
|
|
15478
15649
|
|
|
15479
|
-
|
|
15650
|
+
if (document && id) {
|
|
15480
15651
|
(function () {
|
|
15481
|
-
|
|
15652
|
+
var ecnJquery = document.createElement('script');
|
|
15482
15653
|
|
|
15483
|
-
|
|
15484
|
-
|
|
15485
|
-
|
|
15654
|
+
ecnJquery.type = 'text/javascript';
|
|
15655
|
+
ecnJquery.async = true;
|
|
15656
|
+
ecnJquery.src = 'https://apidt.ecn5.com/ECN_jQuery.min.js';
|
|
15486
15657
|
|
|
15487
|
-
|
|
15658
|
+
var ecnScript = document.createElement('script');
|
|
15488
15659
|
|
|
15489
|
-
|
|
15490
|
-
|
|
15491
|
-
|
|
15492
|
-
|
|
15660
|
+
ecnScript.type = 'text/javascript';
|
|
15661
|
+
ecnScript.async = true;
|
|
15662
|
+
ecnScript.id = 'km-tracker';
|
|
15663
|
+
ecnScript.src = 'https://apidt.ecn5.com/ECN_tracker_Secure.js?TrackerKey=' + id;
|
|
15493
15664
|
|
|
15494
|
-
|
|
15495
|
-
|
|
15496
|
-
|
|
15497
|
-
|
|
15665
|
+
document.head.appendChild(ecnJquery);
|
|
15666
|
+
document.head.appendChild(ecnScript);
|
|
15667
|
+
})();
|
|
15668
|
+
}
|
|
15498
15669
|
};
|
|
15499
15670
|
|
|
15500
|
-
export { AD300x250, AD300x250x600, ADFooter, AccordionPanel, AdSlotsProvider, AlphabeticList, ArticleDetailDropdown, ArticleQueue, Breadcrumbs$1 as Breadcrumbs, CMEDeck, ConferenceArticleCard, EventsDeck, Feature, fbsHero as ForbesHero, GridHero, Hero, HorizontalHero, KMTracker, OncliveHero, OncliveLargeHero, PdfDownload, RelatedContent, RelatedTopicsDropdown, SetCookie, SocialShare$1 as SocialShare, VerticalHero, YahooHero, getSerializers };
|
|
15671
|
+
export { AD300x250, AD300x250x600, ADFloatingFooter, ADFooter, ADGutter, ADWelcome, AccordionPanel, AdSlotsProvider, AlphabeticList, ArticleDetailDropdown, ArticleQueue, Breadcrumbs$1 as Breadcrumbs, CMEDeck, ConferenceArticleCard, EventsDeck, Feature, fbsHero as ForbesHero, GridHero, Hero, HorizontalHero, KMTracker, OncliveHero, OncliveLargeHero, PdfDownload, RelatedContent, RelatedTopicsDropdown, SetCookie, SocialShare$1 as SocialShare, VerticalHero, YahooHero, getSerializers };
|