@mjhls/mjh-framework 1.0.919-TEST → 1.0.919
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/dist/cjs/ArticleProgramLandingPage.js +2 -4
- package/dist/cjs/ExternalResources.js +1 -3
- package/dist/cjs/HorizontalArticleListing.js +2 -4
- package/dist/cjs/IssueLanding.js +2 -4
- package/dist/cjs/{MediaSeriesCard-31e82b76.js → MediaSeriesCard-34235827.js} +1 -1
- package/dist/cjs/MediaSeriesLanding.js +3 -5
- package/dist/cjs/MediaSeriesLandingPaginated.js +2 -4
- package/dist/cjs/PartnerDetailListing.js +2 -4
- package/dist/cjs/PartnerDetailListingPaginated.js +1 -3
- package/dist/cjs/TaxonomyDescription.js +2 -4
- package/dist/cjs/VideoProgramLandingPage.js +1 -2
- package/dist/cjs/View.js +1 -2
- package/dist/cjs/getSerializers.js +2 -4
- package/dist/cjs/{index-da44b1e7.js → index-f9f5f7c0.js} +22 -345
- package/dist/cjs/index.js +1 -1
- package/dist/esm/ArticleProgramLandingPage.js +2 -4
- package/dist/esm/ExternalResources.js +1 -3
- package/dist/esm/HorizontalArticleListing.js +2 -4
- package/dist/esm/IssueLanding.js +2 -4
- package/dist/esm/{MediaSeriesCard-3d6acf32.js → MediaSeriesCard-8a9b91e6.js} +1 -1
- package/dist/esm/MediaSeriesLanding.js +3 -5
- package/dist/esm/MediaSeriesLandingPaginated.js +2 -4
- package/dist/esm/PartnerDetailListing.js +2 -4
- package/dist/esm/PartnerDetailListingPaginated.js +1 -3
- package/dist/esm/TaxonomyDescription.js +2 -4
- package/dist/esm/VideoProgramLandingPage.js +1 -2
- package/dist/esm/View.js +1 -2
- package/dist/esm/getSerializers.js +2 -4
- package/dist/esm/{index-803278c4.js → index-4d8a8743.js} +25 -346
- package/dist/esm/index.js +1 -1
- package/package.json +1 -2
|
@@ -20,10 +20,6 @@ var index$2 = require('./index-eadd5035.js');
|
|
|
20
20
|
var asyncToGenerator = require('./asyncToGenerator-77821af0.js');
|
|
21
21
|
var _typeof$1 = require('./typeof-567e31ff.js');
|
|
22
22
|
var brightcoveReactPlayerLoader_es = require('./brightcove-react-player-loader.es-a195642e.js');
|
|
23
|
-
var stringify = require('./stringify-f7a37a8d.js');
|
|
24
|
-
var Modal = require('react-bootstrap/Modal');
|
|
25
|
-
var Button = require('react-bootstrap/Button');
|
|
26
|
-
var Form = require('react-bootstrap/Form');
|
|
27
23
|
var GroupDeck = require('./GroupDeck.js');
|
|
28
24
|
var moment = require('./moment-aca40de1.js');
|
|
29
25
|
var SocialShare = require('./SocialShare.js');
|
|
@@ -31,6 +27,7 @@ var core_getIteratorMethod = require('./core.get-iterator-method-5643aa10.js');
|
|
|
31
27
|
var _objectToArray = require('./_object-to-array-ce86cae7.js');
|
|
32
28
|
var toConsumableArray = require('./toConsumableArray-d7797c2b.js');
|
|
33
29
|
var Pagination = require('react-bootstrap/Pagination');
|
|
30
|
+
var Button = require('react-bootstrap/Button');
|
|
34
31
|
var entities = require('./entities-df1aed86.js');
|
|
35
32
|
var AdSlot = require('./AdSlot.js');
|
|
36
33
|
var Row = require('react-bootstrap/Row');
|
|
@@ -48,10 +45,8 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
48
45
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
49
46
|
var Router__default = /*#__PURE__*/_interopDefaultLegacy(Router);
|
|
50
47
|
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
51
|
-
var Modal__default = /*#__PURE__*/_interopDefaultLegacy(Modal);
|
|
52
|
-
var Button__default = /*#__PURE__*/_interopDefaultLegacy(Button);
|
|
53
|
-
var Form__default = /*#__PURE__*/_interopDefaultLegacy(Form);
|
|
54
48
|
var Pagination__default = /*#__PURE__*/_interopDefaultLegacy(Pagination);
|
|
49
|
+
var Button__default = /*#__PURE__*/_interopDefaultLegacy(Button);
|
|
55
50
|
var Row__default = /*#__PURE__*/_interopDefaultLegacy(Row);
|
|
56
51
|
var Col__default = /*#__PURE__*/_interopDefaultLegacy(Col);
|
|
57
52
|
var Head__default = /*#__PURE__*/_interopDefaultLegacy(Head);
|
|
@@ -2246,7 +2241,7 @@ var VideoMp4 = function VideoMp4(_ref) {
|
|
|
2246
2241
|
var duration = player.duration;
|
|
2247
2242
|
var queue = Math.floor(duration / 10);
|
|
2248
2243
|
var segment = Math.floor(current / queue);
|
|
2249
|
-
//
|
|
2244
|
+
//Beam.report_beam_video('Ready', deviceType, duration, current, segment, 'MP4')
|
|
2250
2245
|
Segment.report_video_event('Video Ready', main.main_18, duration, current, segment, 'MP4');
|
|
2251
2246
|
};
|
|
2252
2247
|
|
|
@@ -2256,7 +2251,7 @@ var VideoMp4 = function VideoMp4(_ref) {
|
|
|
2256
2251
|
var queue = Math.floor(duration / 10);
|
|
2257
2252
|
var segment = Math.floor(current / queue);
|
|
2258
2253
|
if (!queueProgress.includes(segment)) {
|
|
2259
|
-
//
|
|
2254
|
+
//Beam.report_beam_video('Segment', deviceType, duration, current, segment, 'MP4')
|
|
2260
2255
|
Segment.report_video_event('Video Segment', main.main_18, duration, current, segment, 'MP4');
|
|
2261
2256
|
queueProgress.push(segment);
|
|
2262
2257
|
}
|
|
@@ -2269,7 +2264,7 @@ var VideoMp4 = function VideoMp4(_ref) {
|
|
|
2269
2264
|
var duration = player.duration;
|
|
2270
2265
|
var queue = Math.floor(duration / 10);
|
|
2271
2266
|
var segment = Math.floor(current / queue);
|
|
2272
|
-
//
|
|
2267
|
+
//Beam.report_beam_video('Play', deviceType, duration, current, segment, 'MP4')
|
|
2273
2268
|
Segment.report_video_event('Video Play', main.main_18, duration, current, segment, 'MP4');
|
|
2274
2269
|
|
|
2275
2270
|
if (!playReported) {
|
|
@@ -2290,7 +2285,7 @@ var VideoMp4 = function VideoMp4(_ref) {
|
|
|
2290
2285
|
var queue = Math.floor(duration / 10);
|
|
2291
2286
|
var segment = Math.floor(current / queue);
|
|
2292
2287
|
|
|
2293
|
-
//
|
|
2288
|
+
//Beam.report_beam_video('End', deviceType, duration, current, segment, 'MP4')
|
|
2294
2289
|
Segment.report_video_event('Video End', main.main_18, duration, current, segment, 'MP4');
|
|
2295
2290
|
setEndReported(true);
|
|
2296
2291
|
clearInterval(intervalID);
|
|
@@ -2303,7 +2298,7 @@ var VideoMp4 = function VideoMp4(_ref) {
|
|
|
2303
2298
|
var duration = player.duration - current;
|
|
2304
2299
|
var queue = Math.floor(duration / 10);
|
|
2305
2300
|
var segment = Math.floor(current / queue);
|
|
2306
|
-
//
|
|
2301
|
+
//Beam.report_beam_video('Pause', deviceType, duration, current, segment, 'MP4')
|
|
2307
2302
|
Segment.report_video_event('Video Pause', main.main_18, duration, current, segment, 'MP4');
|
|
2308
2303
|
};
|
|
2309
2304
|
|
|
@@ -2334,229 +2329,6 @@ var VideoMp4 = function VideoMp4(_ref) {
|
|
|
2334
2329
|
);
|
|
2335
2330
|
};
|
|
2336
2331
|
|
|
2337
|
-
var PopupMultiChoice = function PopupMultiChoice(_ref) {
|
|
2338
|
-
var question = _ref.question,
|
|
2339
|
-
choices = _ref.choices,
|
|
2340
|
-
handlePollAnswer = _ref.handlePollAnswer;
|
|
2341
|
-
|
|
2342
|
-
var choiceArray = choices.map(function (choice) {
|
|
2343
|
-
return React__default['default'].createElement(Form__default['default'].Check, {
|
|
2344
|
-
inline: true,
|
|
2345
|
-
label: choice.choiceText,
|
|
2346
|
-
value: choice.choiceText,
|
|
2347
|
-
name: 'radioButton',
|
|
2348
|
-
type: 'radio',
|
|
2349
|
-
className: 'radioButton',
|
|
2350
|
-
onClick: handlePollAnswer
|
|
2351
|
-
});
|
|
2352
|
-
});
|
|
2353
|
-
return React__default['default'].createElement(
|
|
2354
|
-
'div',
|
|
2355
|
-
{
|
|
2356
|
-
key: 'inline-radio',
|
|
2357
|
-
className: 'mb-3' },
|
|
2358
|
-
React__default['default'].createElement(
|
|
2359
|
-
'h2',
|
|
2360
|
-
{
|
|
2361
|
-
className: 'radioLabelText'
|
|
2362
|
-
},
|
|
2363
|
-
question
|
|
2364
|
-
),
|
|
2365
|
-
React__default['default'].createElement(
|
|
2366
|
-
'div',
|
|
2367
|
-
{
|
|
2368
|
-
className: 'multiChoiceDiv'
|
|
2369
|
-
},
|
|
2370
|
-
choiceArray
|
|
2371
|
-
)
|
|
2372
|
-
);
|
|
2373
|
-
};
|
|
2374
|
-
|
|
2375
|
-
var PopupPollTextInput = function PopupPollTextInput(_ref) {
|
|
2376
|
-
var textInputQuestion = _ref.textInputQuestion,
|
|
2377
|
-
textAnswer = _ref.textAnswer,
|
|
2378
|
-
handleTextAnswer = _ref.handleTextAnswer;
|
|
2379
|
-
|
|
2380
|
-
return React__default['default'].createElement(
|
|
2381
|
-
'div',
|
|
2382
|
-
{
|
|
2383
|
-
className: 'textInputDiv'
|
|
2384
|
-
},
|
|
2385
|
-
React__default['default'].createElement(
|
|
2386
|
-
'h2',
|
|
2387
|
-
{
|
|
2388
|
-
className: 'textInputQuestion'
|
|
2389
|
-
},
|
|
2390
|
-
textInputQuestion
|
|
2391
|
-
),
|
|
2392
|
-
React__default['default'].createElement(Form__default['default'].Control, {
|
|
2393
|
-
type: 'text',
|
|
2394
|
-
className: 'textInput',
|
|
2395
|
-
value: textAnswer,
|
|
2396
|
-
placeholder: 'Your response',
|
|
2397
|
-
onChange: handleTextAnswer
|
|
2398
|
-
})
|
|
2399
|
-
);
|
|
2400
|
-
};
|
|
2401
|
-
|
|
2402
|
-
var _this = undefined;
|
|
2403
|
-
var fetch = require('node-fetch');
|
|
2404
|
-
|
|
2405
|
-
var PopupPollModal = function PopupPollModal(props) {
|
|
2406
|
-
var pollItems = props.pollItems,
|
|
2407
|
-
pollUrl = props.pollUrl,
|
|
2408
|
-
restartPlayer = props.restartPlayer,
|
|
2409
|
-
multiChoiceRender = props.multiChoiceRender,
|
|
2410
|
-
textInputRender = props.textInputRender;
|
|
2411
|
-
|
|
2412
|
-
var _useState = React.useState(''),
|
|
2413
|
-
_useState2 = slicedToArray._slicedToArray(_useState, 2),
|
|
2414
|
-
pollAnswer = _useState2[0],
|
|
2415
|
-
setPollAnswer = _useState2[1];
|
|
2416
|
-
|
|
2417
|
-
var _useState3 = React.useState(''),
|
|
2418
|
-
_useState4 = slicedToArray._slicedToArray(_useState3, 2),
|
|
2419
|
-
textAnswer = _useState4[0],
|
|
2420
|
-
setTextAnswer = _useState4[1];
|
|
2421
|
-
|
|
2422
|
-
React.useEffect(function () {
|
|
2423
|
-
var modal = document.getElementById('modalDiv');
|
|
2424
|
-
modal.style.visibility = 'visible';
|
|
2425
|
-
}, []);
|
|
2426
|
-
|
|
2427
|
-
var handleTextAnswer = function handleTextAnswer(e) {
|
|
2428
|
-
setTextAnswer(e.target.value);
|
|
2429
|
-
};
|
|
2430
|
-
|
|
2431
|
-
var handlePollAnswer = function handlePollAnswer(e) {
|
|
2432
|
-
setPollAnswer(e.target.value);
|
|
2433
|
-
};
|
|
2434
|
-
|
|
2435
|
-
var handleSubmit = function handleSubmit(e) {
|
|
2436
|
-
var currentDate = new Date(Date.now()).toUTCString();
|
|
2437
|
-
// eslint-disable-next-line no-undef
|
|
2438
|
-
var anonymousID = typeof analytics !== 'undefined' && typeof analytics.user === 'function' && analytics.user() && analytics.user().anonymousId();
|
|
2439
|
-
pollItems.forEach(function (item) {
|
|
2440
|
-
var submitAnswer = void 0;
|
|
2441
|
-
if (item.format === 'multiChoice') submitAnswer = pollAnswer;
|
|
2442
|
-
if (item.format === 'textInput') submitAnswer = textAnswer;
|
|
2443
|
-
var formData = {
|
|
2444
|
-
uuid: anonymousID,
|
|
2445
|
-
url: pollUrl,
|
|
2446
|
-
date: currentDate,
|
|
2447
|
-
question: item.question,
|
|
2448
|
-
answer: submitAnswer
|
|
2449
|
-
};
|
|
2450
|
-
var requestOptions = {
|
|
2451
|
-
method: 'POST',
|
|
2452
|
-
headers: { 'content-type': 'application/json' },
|
|
2453
|
-
body: stringify._JSON$stringify({ data: formData })
|
|
2454
|
-
};
|
|
2455
|
-
var insertData = function () {
|
|
2456
|
-
var _ref = asyncToGenerator._asyncToGenerator( /*#__PURE__*/asyncToGenerator.regenerator.mark(function _callee() {
|
|
2457
|
-
return asyncToGenerator.regenerator.wrap(function _callee$(_context) {
|
|
2458
|
-
while (1) {
|
|
2459
|
-
switch (_context.prev = _context.next) {
|
|
2460
|
-
case 0:
|
|
2461
|
-
_context.next = 2;
|
|
2462
|
-
return fetch('/api/popup_polls', requestOptions).then(function (res) {
|
|
2463
|
-
return res.json();
|
|
2464
|
-
}).then(function (res) {
|
|
2465
|
-
return console.log(res);
|
|
2466
|
-
});
|
|
2467
|
-
|
|
2468
|
-
case 2:
|
|
2469
|
-
case 'end':
|
|
2470
|
-
return _context.stop();
|
|
2471
|
-
}
|
|
2472
|
-
}
|
|
2473
|
-
}, _callee, _this);
|
|
2474
|
-
}));
|
|
2475
|
-
|
|
2476
|
-
return function insertData() {
|
|
2477
|
-
return _ref.apply(this, arguments);
|
|
2478
|
-
};
|
|
2479
|
-
}();
|
|
2480
|
-
console.log('formData', formData);
|
|
2481
|
-
insertData();
|
|
2482
|
-
});
|
|
2483
|
-
restartPlayer();
|
|
2484
|
-
e.preventDefault();
|
|
2485
|
-
};
|
|
2486
|
-
|
|
2487
|
-
var pollArray = [];
|
|
2488
|
-
pollItems.forEach(function (item, ind) {
|
|
2489
|
-
if (item.format === 'multiChoice') {
|
|
2490
|
-
pollArray.push(React__default['default'].createElement(PopupMultiChoice, {
|
|
2491
|
-
question: item.question,
|
|
2492
|
-
choices: item.choices,
|
|
2493
|
-
handlePollAnswer: handlePollAnswer,
|
|
2494
|
-
key: ind
|
|
2495
|
-
}));
|
|
2496
|
-
}
|
|
2497
|
-
if (item.format === 'textInput') {
|
|
2498
|
-
pollArray.push(React__default['default'].createElement(PopupPollTextInput, {
|
|
2499
|
-
textInputQuestion: item.question,
|
|
2500
|
-
textanswer: textAnswer,
|
|
2501
|
-
handleTextAnswer: handleTextAnswer,
|
|
2502
|
-
key: ind
|
|
2503
|
-
}));
|
|
2504
|
-
}
|
|
2505
|
-
});
|
|
2506
|
-
|
|
2507
|
-
return React__default['default'].createElement(
|
|
2508
|
-
'div',
|
|
2509
|
-
{
|
|
2510
|
-
className: 'modalDiv',
|
|
2511
|
-
id: 'modalDiv'
|
|
2512
|
-
},
|
|
2513
|
-
React__default['default'].createElement(
|
|
2514
|
-
Modal__default['default'].Dialog,
|
|
2515
|
-
null,
|
|
2516
|
-
React__default['default'].createElement(
|
|
2517
|
-
Modal__default['default'].Body,
|
|
2518
|
-
null,
|
|
2519
|
-
React__default['default'].createElement(
|
|
2520
|
-
Form__default['default'],
|
|
2521
|
-
{
|
|
2522
|
-
onSubmit: handleSubmit,
|
|
2523
|
-
className: 'modalForm'
|
|
2524
|
-
},
|
|
2525
|
-
pollArray,
|
|
2526
|
-
multiChoiceRender && !textInputRender ? React__default['default'].createElement(
|
|
2527
|
-
Button__default['default'],
|
|
2528
|
-
{
|
|
2529
|
-
className: 'submitButton',
|
|
2530
|
-
type: 'submit',
|
|
2531
|
-
variant: 'success',
|
|
2532
|
-
disabled: !pollAnswer
|
|
2533
|
-
},
|
|
2534
|
-
'Submit'
|
|
2535
|
-
) : textInputRender && !multiChoiceRender ? React__default['default'].createElement(
|
|
2536
|
-
Button__default['default'],
|
|
2537
|
-
{
|
|
2538
|
-
className: 'submitButton',
|
|
2539
|
-
type: 'submit',
|
|
2540
|
-
variant: 'success',
|
|
2541
|
-
disabled: !textAnswer
|
|
2542
|
-
},
|
|
2543
|
-
'Submit'
|
|
2544
|
-
) : React__default['default'].createElement(
|
|
2545
|
-
Button__default['default'],
|
|
2546
|
-
{
|
|
2547
|
-
className: 'submitButton',
|
|
2548
|
-
type: 'submit',
|
|
2549
|
-
variant: 'success',
|
|
2550
|
-
disabled: !textAnswer || !pollAnswer
|
|
2551
|
-
},
|
|
2552
|
-
'Submit'
|
|
2553
|
-
)
|
|
2554
|
-
)
|
|
2555
|
-
)
|
|
2556
|
-
)
|
|
2557
|
-
);
|
|
2558
|
-
};
|
|
2559
|
-
|
|
2560
2332
|
var Video = function Video(_ref) {
|
|
2561
2333
|
var node = _ref.node,
|
|
2562
2334
|
accountIDs = _ref.accountIDs,
|
|
@@ -2573,57 +2345,14 @@ var Video = function Video(_ref) {
|
|
|
2573
2345
|
playlistID = node.playlistID,
|
|
2574
2346
|
experienceID = node.experienceID;
|
|
2575
2347
|
|
|
2576
|
-
var polls = void 0;
|
|
2577
|
-
if (node.polls) polls = node.polls;
|
|
2578
|
-
|
|
2579
2348
|
var _useState = React.useState(false),
|
|
2580
2349
|
_useState2 = slicedToArray._slicedToArray(_useState, 2),
|
|
2581
2350
|
videoLoaded = _useState2[0],
|
|
2582
2351
|
setVideoLoaded = _useState2[1];
|
|
2583
2352
|
|
|
2584
|
-
var _useState3 = React.useState(false),
|
|
2585
|
-
_useState4 = slicedToArray._slicedToArray(_useState3, 2),
|
|
2586
|
-
isPollingTime = _useState4[0],
|
|
2587
|
-
setIsPollingTime = _useState4[1];
|
|
2588
|
-
|
|
2589
|
-
var _useState5 = React.useState([]),
|
|
2590
|
-
_useState6 = slicedToArray._slicedToArray(_useState5, 2),
|
|
2591
|
-
pollItems = _useState6[0],
|
|
2592
|
-
setPollItems = _useState6[1];
|
|
2593
|
-
|
|
2594
|
-
var _useState7 = React.useState(''),
|
|
2595
|
-
_useState8 = slicedToArray._slicedToArray(_useState7, 2),
|
|
2596
|
-
pollUrl = _useState8[0],
|
|
2597
|
-
setPollUrl = _useState8[1];
|
|
2598
|
-
|
|
2599
|
-
var _useState9 = React.useState(),
|
|
2600
|
-
_useState10 = slicedToArray._slicedToArray(_useState9, 2),
|
|
2601
|
-
videoPlayer = _useState10[0],
|
|
2602
|
-
setVideoPlayer = _useState10[1];
|
|
2603
|
-
|
|
2604
|
-
var _useState11 = React.useState(0),
|
|
2605
|
-
_useState12 = slicedToArray._slicedToArray(_useState11, 2),
|
|
2606
|
-
currentPlayTime = _useState12[0],
|
|
2607
|
-
setCurrentPlayTime = _useState12[1];
|
|
2608
|
-
|
|
2609
|
-
var _useState13 = React.useState(false),
|
|
2610
|
-
_useState14 = slicedToArray._slicedToArray(_useState13, 2),
|
|
2611
|
-
multiChoiceRender = _useState14[0],
|
|
2612
|
-
setMultiChoiceRender = _useState14[1];
|
|
2613
|
-
|
|
2614
|
-
var _useState15 = React.useState(false),
|
|
2615
|
-
_useState16 = slicedToArray._slicedToArray(_useState15, 2),
|
|
2616
|
-
textInputRender = _useState16[0],
|
|
2617
|
-
setTextInputRender = _useState16[1];
|
|
2618
|
-
|
|
2619
|
-
var restartPlayer = function restartPlayer() {
|
|
2620
|
-
setIsPollingTime(false);
|
|
2621
|
-
videoPlayer.play();
|
|
2622
|
-
};
|
|
2623
|
-
|
|
2624
2353
|
React.useEffect(function () {
|
|
2625
2354
|
if (!videoLoaded && experienceID) {
|
|
2626
|
-
//
|
|
2355
|
+
//To load Experience Player JS
|
|
2627
2356
|
var experiencePlayerScript = document.createElement('script');
|
|
2628
2357
|
experiencePlayerScript.src = 'https://players.brightcove.net/' + accountIDs.brightcove.accountId + '/experience_' + experienceID + '/live.js';
|
|
2629
2358
|
document.body.appendChild(experiencePlayerScript);
|
|
@@ -2636,9 +2365,8 @@ var Video = function Video(_ref) {
|
|
|
2636
2365
|
};
|
|
2637
2366
|
|
|
2638
2367
|
var onVideoSuccess = function onVideoSuccess(success) {
|
|
2639
|
-
//
|
|
2368
|
+
//console.log('success:', success.ref)
|
|
2640
2369
|
var player = success.ref;
|
|
2641
|
-
setVideoPlayer(player);
|
|
2642
2370
|
if (_typeof$1._typeof(player.ima3) === 'object' && player.ima3.settings && player.ima3.settings.serverUrl && targeting !== null) {
|
|
2643
2371
|
player.ima3.settings.debug = true;
|
|
2644
2372
|
if (targeting.content_placement && targeting.document_url) {
|
|
@@ -2649,7 +2377,7 @@ var Video = function Video(_ref) {
|
|
|
2649
2377
|
player.on('loadedmetadata', function (evt) {
|
|
2650
2378
|
var _this = this;
|
|
2651
2379
|
|
|
2652
|
-
//
|
|
2380
|
+
//console.log('loadedmetadata:', evt)
|
|
2653
2381
|
console.log('mediainfo:', player.mediainfo); // get the duration from here
|
|
2654
2382
|
var duration = player.mediainfo.duration;
|
|
2655
2383
|
var current = player.currentTime();
|
|
@@ -2693,50 +2421,17 @@ var Video = function Video(_ref) {
|
|
|
2693
2421
|
autoPlayVideo();
|
|
2694
2422
|
}
|
|
2695
2423
|
|
|
2696
|
-
//
|
|
2424
|
+
//Beam.report_beam_video('Ready', deviceType, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID)
|
|
2697
2425
|
Segment.report_video_event('Video Ready', main.main_18, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID);
|
|
2698
2426
|
});
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
var minutes = parseInt(timeStr.slice(0, 2));
|
|
2702
|
-
var seconds = parseInt(timeStr.slice(3));
|
|
2703
|
-
return minutes * 60 + seconds;
|
|
2704
|
-
};
|
|
2705
|
-
var modalTimes = [];
|
|
2706
|
-
polls.forEach(function (pollObj) {
|
|
2707
|
-
return modalTimes.push(convertTime(pollObj.timestamp));
|
|
2708
|
-
});
|
|
2709
|
-
console.log('last poll time', modalTimes[modalTimes.length - 1]);
|
|
2427
|
+
|
|
2428
|
+
// play
|
|
2710
2429
|
player.on('play', function (evt) {
|
|
2711
2430
|
var duration = player.mediainfo.duration;
|
|
2712
2431
|
var current = player.currentTime();
|
|
2713
2432
|
var queue = Math.floor(duration / 10);
|
|
2714
2433
|
var segment = Math.floor(current / queue);
|
|
2715
|
-
|
|
2716
|
-
var vidPlayer = this;
|
|
2717
|
-
intId = setInterval(function () {
|
|
2718
|
-
var ct = player.currentTime();
|
|
2719
|
-
console.log('ct', ct);
|
|
2720
|
-
setCurrentPlayTime(ct);
|
|
2721
|
-
console.log('currentPlayTime', currentPlayTime);
|
|
2722
|
-
console.log('intervaling');
|
|
2723
|
-
if (intId) console.log('interval ID is ' + intId);
|
|
2724
|
-
console.log('isPollingTime', isPollingTime);
|
|
2725
|
-
modalTimes.forEach(function (modalTime, ind) {
|
|
2726
|
-
if (Math.floor(ct) === modalTime) {
|
|
2727
|
-
setPollItems(polls[ind].pollItems);
|
|
2728
|
-
setPollUrl(targeting.document_url[0]);
|
|
2729
|
-
setIsPollingTime(true);
|
|
2730
|
-
polls[ind].pollItems.forEach(function (item) {
|
|
2731
|
-
if (item.format === 'multiChoice') setMultiChoiceRender(true);
|
|
2732
|
-
if (item.format === 'textInput') setTextInputRender(true);
|
|
2733
|
-
});
|
|
2734
|
-
vidPlayer.pause();
|
|
2735
|
-
}
|
|
2736
|
-
});
|
|
2737
|
-
}, 1000);
|
|
2738
|
-
}
|
|
2739
|
-
// Beam.report_beam_video('Play', deviceType, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID)
|
|
2434
|
+
//Beam.report_beam_video('Play', deviceType, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID)
|
|
2740
2435
|
Segment.report_video_event('Video Play', main.main_18, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID);
|
|
2741
2436
|
});
|
|
2742
2437
|
|
|
@@ -2746,9 +2441,7 @@ var Video = function Video(_ref) {
|
|
|
2746
2441
|
var current = player.currentTime();
|
|
2747
2442
|
var queue = Math.floor(duration / 10);
|
|
2748
2443
|
var segment = Math.floor(current / queue);
|
|
2749
|
-
|
|
2750
|
-
console.log('clearing interval ' + intId + ' in pause');
|
|
2751
|
-
// Beam.report_beam_video('Pause', deviceType, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID)
|
|
2444
|
+
//Beam.report_beam_video('Pause', deviceType, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID)
|
|
2752
2445
|
Segment.report_video_event('Video Pause', main.main_18, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID);
|
|
2753
2446
|
});
|
|
2754
2447
|
|
|
@@ -2758,10 +2451,9 @@ var Video = function Video(_ref) {
|
|
|
2758
2451
|
var current = player.currentTime();
|
|
2759
2452
|
var queue = Math.floor(duration / 10);
|
|
2760
2453
|
var segment = Math.floor(current / queue);
|
|
2761
|
-
|
|
2762
|
-
// Beam.report_beam_video('End', deviceType, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID)
|
|
2454
|
+
//Beam.report_beam_video('End', deviceType, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID)
|
|
2763
2455
|
Segment.report_video_event('Video End', main.main_18, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID);
|
|
2764
|
-
//
|
|
2456
|
+
//This is for old series format
|
|
2765
2457
|
autoplayNextVideo(evt);
|
|
2766
2458
|
if (nextVideo) {
|
|
2767
2459
|
window.location.href = '/view/' + nextVideo;
|
|
@@ -2775,7 +2467,7 @@ var Video = function Video(_ref) {
|
|
|
2775
2467
|
var queue = Math.floor(duration / 10);
|
|
2776
2468
|
var segment = Math.floor(current / queue);
|
|
2777
2469
|
if (!queueProgress.includes(segment)) {
|
|
2778
|
-
//
|
|
2470
|
+
//Beam.report_beam_video('Segment', deviceType, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID)
|
|
2779
2471
|
Segment.report_video_event('Video Segment', main.main_18, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID);
|
|
2780
2472
|
queueProgress.push(segment);
|
|
2781
2473
|
}
|
|
@@ -2784,19 +2476,19 @@ var Video = function Video(_ref) {
|
|
|
2784
2476
|
// ad impression
|
|
2785
2477
|
player.on('ads-ad-started', function (evt) {
|
|
2786
2478
|
var duration = player.ads.ad.duration;
|
|
2787
|
-
|
|
2479
|
+
player.ads.ad.id;
|
|
2788
2480
|
var adType = 'Bright Cove: ' + player.ads.ad.type;
|
|
2789
2481
|
|
|
2790
|
-
//
|
|
2482
|
+
//Beam.report_beam_ad('AD Started', deviceType, '', '', '', '', '', adType, duration, id)
|
|
2791
2483
|
Segment.report_ad_event('Video Ad Started', main.main_18, duration, adType, accountIDs.brightcove.playerId, accountIDs.brightcove.accountId);
|
|
2792
2484
|
});
|
|
2793
2485
|
|
|
2794
2486
|
// ad ended
|
|
2795
2487
|
player.on('ads-ad-ended', function (evt) {
|
|
2796
2488
|
var duration = player.ads.ad.duration;
|
|
2797
|
-
|
|
2489
|
+
player.ads.ad.id;
|
|
2798
2490
|
var adType = 'Bright Cove: ' + player.ads.ad.type;
|
|
2799
|
-
//
|
|
2491
|
+
//Beam.report_beam_ad('AD Ended', deviceType, '', '', '', '', '', adType, duration, id)
|
|
2800
2492
|
Segment.report_ad_event('Video Ad Ended', main.main_18, duration, adType, accountIDs.brightcove.playerId, accountIDs.brightcove.accountId);
|
|
2801
2493
|
});
|
|
2802
2494
|
};
|
|
@@ -2806,20 +2498,6 @@ var Video = function Video(_ref) {
|
|
|
2806
2498
|
return React__default['default'].createElement(
|
|
2807
2499
|
'div',
|
|
2808
2500
|
null,
|
|
2809
|
-
isPollingTime ? React__default['default'].createElement(PopupPollModal
|
|
2810
|
-
// eslint-disable-next-line react/jsx-indent-props
|
|
2811
|
-
, { pollItems: pollItems
|
|
2812
|
-
// eslint-disable-next-line react/jsx-indent-props
|
|
2813
|
-
, pollUrl: pollUrl
|
|
2814
|
-
// eslint-disable-next-line react/jsx-indent-props
|
|
2815
|
-
, isPollingTime: isPollingTime
|
|
2816
|
-
// eslint-disable-next-line react/jsx-indent-props
|
|
2817
|
-
, restartPlayer: restartPlayer
|
|
2818
|
-
// eslint-disable-next-line react/jsx-indent-props
|
|
2819
|
-
, textInputRender: textInputRender
|
|
2820
|
-
// eslint-disable-next-line react/jsx-indent-props
|
|
2821
|
-
, multiChoiceRender: multiChoiceRender
|
|
2822
|
-
}) : null,
|
|
2823
2501
|
React__default['default'].createElement(brightcoveReactPlayerLoader_es.ReactPlayerLoader, {
|
|
2824
2502
|
onSuccess: onVideoSuccess,
|
|
2825
2503
|
onFailure: onVideoFailure,
|
|
@@ -2861,7 +2539,6 @@ var Video = function Video(_ref) {
|
|
|
2861
2539
|
}
|
|
2862
2540
|
return null;
|
|
2863
2541
|
}
|
|
2864
|
-
|
|
2865
2542
|
if (source === 'mp4') {
|
|
2866
2543
|
return React__default['default'].createElement(
|
|
2867
2544
|
'div',
|
package/dist/cjs/index.js
CHANGED
|
@@ -82,7 +82,7 @@ var VerticalHero = require('./VerticalHero.js');
|
|
|
82
82
|
var YahooHero = require('./YahooHero.js');
|
|
83
83
|
var GridHero = require('./GridHero.js');
|
|
84
84
|
var ConferenceArticleCard = require('./ConferenceArticleCard.js');
|
|
85
|
-
var getSerializers = require('./index-
|
|
85
|
+
var getSerializers = require('./index-f9f5f7c0.js');
|
|
86
86
|
var Beam = require('./Beam.js');
|
|
87
87
|
var Segment = require('./Segment.js');
|
|
88
88
|
var KMTracker = require('./KMTracker.js');
|
|
@@ -3,7 +3,7 @@ import { _ as _slicedToArray } from './slicedToArray-6ebcbfea.js';
|
|
|
3
3
|
import { _ as _extends } from './extends-6d8e3924.js';
|
|
4
4
|
import React__default from 'react';
|
|
5
5
|
import { B as BlockContent } from './BlockContent-1e73bd2c.js';
|
|
6
|
-
import { g as getSerializers } from './index-
|
|
6
|
+
import { g as getSerializers } from './index-4d8a8743.js';
|
|
7
7
|
import ArticleSeriesListing from './ArticleSeriesListing.js';
|
|
8
8
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
9
9
|
import './core.get-iterator-method-ea258bb1.js';
|
|
@@ -30,9 +30,6 @@ import 'react-dom';
|
|
|
30
30
|
import './typeof-e9fc0c5d.js';
|
|
31
31
|
import './_is-array-8d21b9e3.js';
|
|
32
32
|
import './brightcove-react-player-loader.es-57a70a56.js';
|
|
33
|
-
import 'react-bootstrap/Modal';
|
|
34
|
-
import 'react-bootstrap/Button';
|
|
35
|
-
import 'react-bootstrap/Form';
|
|
36
33
|
import './GroupDeck.js';
|
|
37
34
|
import './smoothscroll-fa4e3f8c.js';
|
|
38
35
|
import './moment-bc12cb97.js';
|
|
@@ -42,6 +39,7 @@ import 'react-share';
|
|
|
42
39
|
import './_object-to-array-2300e51b.js';
|
|
43
40
|
import './toConsumableArray-f7074d7c.js';
|
|
44
41
|
import 'react-bootstrap/Pagination';
|
|
42
|
+
import 'react-bootstrap/Button';
|
|
45
43
|
import './entities-6d9154b4.js';
|
|
46
44
|
import './AdSlot.js';
|
|
47
45
|
import './debounce-533d9748.js';
|
|
@@ -2,7 +2,7 @@ import { _ as _extends } from './extends-6d8e3924.js';
|
|
|
2
2
|
import { _ as _slicedToArray } from './slicedToArray-6ebcbfea.js';
|
|
3
3
|
import React__default, { useState, useEffect } from 'react';
|
|
4
4
|
import { B as BlockContent } from './BlockContent-1e73bd2c.js';
|
|
5
|
-
import { g as getSerializers } from './index-
|
|
5
|
+
import { g as getSerializers } from './index-4d8a8743.js';
|
|
6
6
|
import { m as momentTimezone } from './index-79cfd25c.js';
|
|
7
7
|
import { useRouter } from 'next/router';
|
|
8
8
|
import Button from 'react-bootstrap/Button';
|
|
@@ -31,8 +31,6 @@ import 'react-dom';
|
|
|
31
31
|
import './typeof-e9fc0c5d.js';
|
|
32
32
|
import './_is-array-8d21b9e3.js';
|
|
33
33
|
import './brightcove-react-player-loader.es-57a70a56.js';
|
|
34
|
-
import 'react-bootstrap/Modal';
|
|
35
|
-
import 'react-bootstrap/Form';
|
|
36
34
|
import './GroupDeck.js';
|
|
37
35
|
import './smoothscroll-fa4e3f8c.js';
|
|
38
36
|
import './moment-bc12cb97.js';
|
|
@@ -3,7 +3,7 @@ import React__default from 'react';
|
|
|
3
3
|
import ArticleCarousel from './ArticleCarousel.js';
|
|
4
4
|
import { I as IoIosArrowForward } from './index.esm-eb1e8e80.js';
|
|
5
5
|
import { B as BlockContent } from './BlockContent-1e73bd2c.js';
|
|
6
|
-
import { g as getSerializers } from './index-
|
|
6
|
+
import { g as getSerializers } from './index-4d8a8743.js';
|
|
7
7
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
8
8
|
import './core.get-iterator-method-ea258bb1.js';
|
|
9
9
|
import './_object-pie-133f504a.js';
|
|
@@ -34,9 +34,6 @@ import './urlForFile-b69adffc.js';
|
|
|
34
34
|
import './typeof-e9fc0c5d.js';
|
|
35
35
|
import './_is-array-8d21b9e3.js';
|
|
36
36
|
import './brightcove-react-player-loader.es-57a70a56.js';
|
|
37
|
-
import 'react-bootstrap/Modal';
|
|
38
|
-
import 'react-bootstrap/Button';
|
|
39
|
-
import 'react-bootstrap/Form';
|
|
40
37
|
import './GroupDeck.js';
|
|
41
38
|
import './moment-bc12cb97.js';
|
|
42
39
|
import './SocialShare.js';
|
|
@@ -45,6 +42,7 @@ import 'react-share';
|
|
|
45
42
|
import './_object-to-array-2300e51b.js';
|
|
46
43
|
import './toConsumableArray-f7074d7c.js';
|
|
47
44
|
import 'react-bootstrap/Pagination';
|
|
45
|
+
import 'react-bootstrap/Button';
|
|
48
46
|
import './entities-6d9154b4.js';
|
|
49
47
|
import './AdSlot.js';
|
|
50
48
|
import './debounce-533d9748.js';
|
package/dist/esm/IssueLanding.js
CHANGED
|
@@ -3,7 +3,7 @@ import React__default from 'react';
|
|
|
3
3
|
import QueueDeckExpanded from './QueueDeckExpanded.js';
|
|
4
4
|
import Breadcrumbs from './Breadcrumbs.js';
|
|
5
5
|
import { B as BlockContent } from './BlockContent-1e73bd2c.js';
|
|
6
|
-
import { g as getSerializers } from './index-
|
|
6
|
+
import { g as getSerializers } from './index-4d8a8743.js';
|
|
7
7
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
8
8
|
import './core.get-iterator-method-ea258bb1.js';
|
|
9
9
|
import './_object-pie-133f504a.js';
|
|
@@ -48,9 +48,6 @@ import './urlForFile-b69adffc.js';
|
|
|
48
48
|
import './typeof-e9fc0c5d.js';
|
|
49
49
|
import './_is-array-8d21b9e3.js';
|
|
50
50
|
import './brightcove-react-player-loader.es-57a70a56.js';
|
|
51
|
-
import 'react-bootstrap/Modal';
|
|
52
|
-
import 'react-bootstrap/Button';
|
|
53
|
-
import 'react-bootstrap/Form';
|
|
54
51
|
import './GroupDeck.js';
|
|
55
52
|
import './smoothscroll-fa4e3f8c.js';
|
|
56
53
|
import './SocialShare.js';
|
|
@@ -58,6 +55,7 @@ import 'next/head';
|
|
|
58
55
|
import 'react-share';
|
|
59
56
|
import './_object-to-array-2300e51b.js';
|
|
60
57
|
import 'react-bootstrap/Pagination';
|
|
58
|
+
import 'react-bootstrap/Button';
|
|
61
59
|
import 'react-bootstrap/Row';
|
|
62
60
|
import 'react-bootstrap/Col';
|
|
63
61
|
import './inherits-a6ba2ec4.js';
|
|
@@ -9,7 +9,7 @@ import urlFor from './urlFor.js';
|
|
|
9
9
|
import { m as moment } from './moment-bc12cb97.js';
|
|
10
10
|
import { s as styleInject } from './style-inject.es-1f59c1d0.js';
|
|
11
11
|
import { B as BlockContent } from './BlockContent-1e73bd2c.js';
|
|
12
|
-
import { g as getSerializers } from './index-
|
|
12
|
+
import { g as getSerializers } from './index-4d8a8743.js';
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* Copyright (c) 2013-present, Facebook, Inc.
|
|
@@ -3,13 +3,13 @@ import { _ as _typeof } from './typeof-e9fc0c5d.js';
|
|
|
3
3
|
import { _ as _extends } from './extends-6d8e3924.js';
|
|
4
4
|
import { _ as _slicedToArray } from './slicedToArray-6ebcbfea.js';
|
|
5
5
|
import React__default, { useState, useEffect } from 'react';
|
|
6
|
-
import { M as MediaSeriesCard, D as DropdownButton, a as Dropdown } from './MediaSeriesCard-
|
|
6
|
+
import { M as MediaSeriesCard, D as DropdownButton, a as Dropdown } from './MediaSeriesCard-8a9b91e6.js';
|
|
7
7
|
import './index-98ca9cec.js';
|
|
8
8
|
import 'react-dom';
|
|
9
9
|
import Link from 'next/link';
|
|
10
10
|
import MasterDeck from './MasterDeck.js';
|
|
11
11
|
import { B as BlockContent } from './BlockContent-1e73bd2c.js';
|
|
12
|
-
import { g as getSerializers } from './index-
|
|
12
|
+
import { g as getSerializers } from './index-4d8a8743.js';
|
|
13
13
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
14
14
|
import './core.get-iterator-method-ea258bb1.js';
|
|
15
15
|
import './web.dom.iterable-ab4dea5c.js';
|
|
@@ -52,9 +52,6 @@ import './index-c7e2ac95.js';
|
|
|
52
52
|
import './util-8ed16d48.js';
|
|
53
53
|
import './urlForFile-b69adffc.js';
|
|
54
54
|
import './brightcove-react-player-loader.es-57a70a56.js';
|
|
55
|
-
import 'react-bootstrap/Modal';
|
|
56
|
-
import 'react-bootstrap/Button';
|
|
57
|
-
import 'react-bootstrap/Form';
|
|
58
55
|
import './GroupDeck.js';
|
|
59
56
|
import './smoothscroll-fa4e3f8c.js';
|
|
60
57
|
import './SocialShare.js';
|
|
@@ -62,6 +59,7 @@ import 'next/head';
|
|
|
62
59
|
import 'react-share';
|
|
63
60
|
import './_object-to-array-2300e51b.js';
|
|
64
61
|
import 'react-bootstrap/Pagination';
|
|
62
|
+
import 'react-bootstrap/Button';
|
|
65
63
|
import './entities-6d9154b4.js';
|
|
66
64
|
import './index.esm-eb1e8e80.js';
|
|
67
65
|
import './iconBase-ccc56b97.js';
|