@mjhls/mjh-framework 1.0.918 → 1.0.919-TEST-V2
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 +1 -1
- package/dist/cjs/ArticleProgramLandingPage.js +4 -2
- package/dist/cjs/ExternalResources.js +3 -1
- package/dist/cjs/HorizontalArticleListing.js +4 -2
- package/dist/cjs/IssueLanding.js +4 -2
- package/dist/cjs/{MediaSeriesCard-34235827.js → MediaSeriesCard-7e1ebe32.js} +1 -1
- package/dist/cjs/MediaSeriesLanding.js +5 -3
- package/dist/cjs/MediaSeriesLandingPaginated.js +4 -2
- package/dist/cjs/PartnerDetailListing.js +4 -2
- package/dist/cjs/PartnerDetailListingPaginated.js +3 -1
- package/dist/cjs/TaxonomyDescription.js +4 -2
- package/dist/cjs/VideoProgramLandingPage.js +2 -1
- package/dist/cjs/View.js +8 -1
- package/dist/cjs/getSerializers.js +4 -2
- package/dist/cjs/{index-f9f5f7c0.js → index-619b5600.js} +327 -22
- package/dist/cjs/index.js +1 -1
- package/dist/esm/ArticleProgramLandingPage.js +4 -2
- package/dist/esm/ExternalResources.js +3 -1
- package/dist/esm/HorizontalArticleListing.js +4 -2
- package/dist/esm/IssueLanding.js +4 -2
- package/dist/esm/{MediaSeriesCard-8a9b91e6.js → MediaSeriesCard-ca3c348f.js} +1 -1
- package/dist/esm/MediaSeriesLanding.js +5 -3
- package/dist/esm/MediaSeriesLandingPaginated.js +4 -2
- package/dist/esm/PartnerDetailListing.js +4 -2
- package/dist/esm/PartnerDetailListingPaginated.js +3 -1
- package/dist/esm/TaxonomyDescription.js +4 -2
- package/dist/esm/VideoProgramLandingPage.js +2 -1
- package/dist/esm/View.js +8 -1
- package/dist/esm/getSerializers.js +4 -2
- package/dist/esm/{index-4d8a8743.js → index-47a80fcc.js} +328 -25
- package/dist/esm/index.js +1 -1
- package/package.json +2 -1
|
@@ -20,6 +20,10 @@ 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');
|
|
23
27
|
var GroupDeck = require('./GroupDeck.js');
|
|
24
28
|
var moment = require('./moment-aca40de1.js');
|
|
25
29
|
var SocialShare = require('./SocialShare.js');
|
|
@@ -27,7 +31,6 @@ var core_getIteratorMethod = require('./core.get-iterator-method-5643aa10.js');
|
|
|
27
31
|
var _objectToArray = require('./_object-to-array-ce86cae7.js');
|
|
28
32
|
var toConsumableArray = require('./toConsumableArray-d7797c2b.js');
|
|
29
33
|
var Pagination = require('react-bootstrap/Pagination');
|
|
30
|
-
var Button = require('react-bootstrap/Button');
|
|
31
34
|
var entities = require('./entities-df1aed86.js');
|
|
32
35
|
var AdSlot = require('./AdSlot.js');
|
|
33
36
|
var Row = require('react-bootstrap/Row');
|
|
@@ -45,8 +48,10 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
45
48
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
46
49
|
var Router__default = /*#__PURE__*/_interopDefaultLegacy(Router);
|
|
47
50
|
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
48
|
-
var
|
|
51
|
+
var Modal__default = /*#__PURE__*/_interopDefaultLegacy(Modal);
|
|
49
52
|
var Button__default = /*#__PURE__*/_interopDefaultLegacy(Button);
|
|
53
|
+
var Form__default = /*#__PURE__*/_interopDefaultLegacy(Form);
|
|
54
|
+
var Pagination__default = /*#__PURE__*/_interopDefaultLegacy(Pagination);
|
|
50
55
|
var Row__default = /*#__PURE__*/_interopDefaultLegacy(Row);
|
|
51
56
|
var Col__default = /*#__PURE__*/_interopDefaultLegacy(Col);
|
|
52
57
|
var Head__default = /*#__PURE__*/_interopDefaultLegacy(Head);
|
|
@@ -2241,7 +2246,7 @@ var VideoMp4 = function VideoMp4(_ref) {
|
|
|
2241
2246
|
var duration = player.duration;
|
|
2242
2247
|
var queue = Math.floor(duration / 10);
|
|
2243
2248
|
var segment = Math.floor(current / queue);
|
|
2244
|
-
//Beam.report_beam_video('Ready', deviceType, duration, current, segment, 'MP4')
|
|
2249
|
+
// Beam.report_beam_video('Ready', deviceType, duration, current, segment, 'MP4')
|
|
2245
2250
|
Segment.report_video_event('Video Ready', main.main_18, duration, current, segment, 'MP4');
|
|
2246
2251
|
};
|
|
2247
2252
|
|
|
@@ -2251,7 +2256,7 @@ var VideoMp4 = function VideoMp4(_ref) {
|
|
|
2251
2256
|
var queue = Math.floor(duration / 10);
|
|
2252
2257
|
var segment = Math.floor(current / queue);
|
|
2253
2258
|
if (!queueProgress.includes(segment)) {
|
|
2254
|
-
//Beam.report_beam_video('Segment', deviceType, duration, current, segment, 'MP4')
|
|
2259
|
+
// Beam.report_beam_video('Segment', deviceType, duration, current, segment, 'MP4')
|
|
2255
2260
|
Segment.report_video_event('Video Segment', main.main_18, duration, current, segment, 'MP4');
|
|
2256
2261
|
queueProgress.push(segment);
|
|
2257
2262
|
}
|
|
@@ -2264,7 +2269,7 @@ var VideoMp4 = function VideoMp4(_ref) {
|
|
|
2264
2269
|
var duration = player.duration;
|
|
2265
2270
|
var queue = Math.floor(duration / 10);
|
|
2266
2271
|
var segment = Math.floor(current / queue);
|
|
2267
|
-
//Beam.report_beam_video('Play', deviceType, duration, current, segment, 'MP4')
|
|
2272
|
+
// Beam.report_beam_video('Play', deviceType, duration, current, segment, 'MP4')
|
|
2268
2273
|
Segment.report_video_event('Video Play', main.main_18, duration, current, segment, 'MP4');
|
|
2269
2274
|
|
|
2270
2275
|
if (!playReported) {
|
|
@@ -2285,7 +2290,7 @@ var VideoMp4 = function VideoMp4(_ref) {
|
|
|
2285
2290
|
var queue = Math.floor(duration / 10);
|
|
2286
2291
|
var segment = Math.floor(current / queue);
|
|
2287
2292
|
|
|
2288
|
-
//Beam.report_beam_video('End', deviceType, duration, current, segment, 'MP4')
|
|
2293
|
+
// Beam.report_beam_video('End', deviceType, duration, current, segment, 'MP4')
|
|
2289
2294
|
Segment.report_video_event('Video End', main.main_18, duration, current, segment, 'MP4');
|
|
2290
2295
|
setEndReported(true);
|
|
2291
2296
|
clearInterval(intervalID);
|
|
@@ -2298,7 +2303,7 @@ var VideoMp4 = function VideoMp4(_ref) {
|
|
|
2298
2303
|
var duration = player.duration - current;
|
|
2299
2304
|
var queue = Math.floor(duration / 10);
|
|
2300
2305
|
var segment = Math.floor(current / queue);
|
|
2301
|
-
//Beam.report_beam_video('Pause', deviceType, duration, current, segment, 'MP4')
|
|
2306
|
+
// Beam.report_beam_video('Pause', deviceType, duration, current, segment, 'MP4')
|
|
2302
2307
|
Segment.report_video_event('Video Pause', main.main_18, duration, current, segment, 'MP4');
|
|
2303
2308
|
};
|
|
2304
2309
|
|
|
@@ -2329,6 +2334,220 @@ var VideoMp4 = function VideoMp4(_ref) {
|
|
|
2329
2334
|
);
|
|
2330
2335
|
};
|
|
2331
2336
|
|
|
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
|
+
textInputRender && !multiChoiceRender ? React__default['default'].createElement(
|
|
2527
|
+
Button__default['default'],
|
|
2528
|
+
{
|
|
2529
|
+
className: 'submitButton',
|
|
2530
|
+
type: 'submit',
|
|
2531
|
+
variant: 'success',
|
|
2532
|
+
disabled: !textAnswer
|
|
2533
|
+
},
|
|
2534
|
+
'Submit'
|
|
2535
|
+
) : React__default['default'].createElement(
|
|
2536
|
+
Button__default['default'],
|
|
2537
|
+
{
|
|
2538
|
+
className: 'submitButton',
|
|
2539
|
+
type: 'submit',
|
|
2540
|
+
variant: 'success',
|
|
2541
|
+
disabled: !pollAnswer
|
|
2542
|
+
},
|
|
2543
|
+
'Submit'
|
|
2544
|
+
)
|
|
2545
|
+
)
|
|
2546
|
+
)
|
|
2547
|
+
)
|
|
2548
|
+
);
|
|
2549
|
+
};
|
|
2550
|
+
|
|
2332
2551
|
var Video = function Video(_ref) {
|
|
2333
2552
|
var node = _ref.node,
|
|
2334
2553
|
accountIDs = _ref.accountIDs,
|
|
@@ -2345,14 +2564,52 @@ var Video = function Video(_ref) {
|
|
|
2345
2564
|
playlistID = node.playlistID,
|
|
2346
2565
|
experienceID = node.experienceID;
|
|
2347
2566
|
|
|
2567
|
+
var polls = void 0;
|
|
2568
|
+
if (node.polls) polls = node.polls;
|
|
2569
|
+
|
|
2348
2570
|
var _useState = React.useState(false),
|
|
2349
2571
|
_useState2 = slicedToArray._slicedToArray(_useState, 2),
|
|
2350
2572
|
videoLoaded = _useState2[0],
|
|
2351
2573
|
setVideoLoaded = _useState2[1];
|
|
2352
2574
|
|
|
2575
|
+
var _useState3 = React.useState(false),
|
|
2576
|
+
_useState4 = slicedToArray._slicedToArray(_useState3, 2),
|
|
2577
|
+
isPollingTime = _useState4[0],
|
|
2578
|
+
setIsPollingTime = _useState4[1];
|
|
2579
|
+
|
|
2580
|
+
var _useState5 = React.useState([]),
|
|
2581
|
+
_useState6 = slicedToArray._slicedToArray(_useState5, 2),
|
|
2582
|
+
pollItems = _useState6[0],
|
|
2583
|
+
setPollItems = _useState6[1];
|
|
2584
|
+
|
|
2585
|
+
var _useState7 = React.useState(''),
|
|
2586
|
+
_useState8 = slicedToArray._slicedToArray(_useState7, 2),
|
|
2587
|
+
pollUrl = _useState8[0],
|
|
2588
|
+
setPollUrl = _useState8[1];
|
|
2589
|
+
|
|
2590
|
+
var _useState9 = React.useState(),
|
|
2591
|
+
_useState10 = slicedToArray._slicedToArray(_useState9, 2),
|
|
2592
|
+
videoPlayer = _useState10[0],
|
|
2593
|
+
setVideoPlayer = _useState10[1];
|
|
2594
|
+
|
|
2595
|
+
var _useState11 = React.useState(false),
|
|
2596
|
+
_useState12 = slicedToArray._slicedToArray(_useState11, 2),
|
|
2597
|
+
multiChoiceRender = _useState12[0],
|
|
2598
|
+
setMultiChoiceRender = _useState12[1];
|
|
2599
|
+
|
|
2600
|
+
var _useState13 = React.useState(false),
|
|
2601
|
+
_useState14 = slicedToArray._slicedToArray(_useState13, 2),
|
|
2602
|
+
textInputRender = _useState14[0],
|
|
2603
|
+
setTextInputRender = _useState14[1];
|
|
2604
|
+
|
|
2605
|
+
var restartPlayer = function restartPlayer() {
|
|
2606
|
+
setIsPollingTime(false);
|
|
2607
|
+
videoPlayer.play();
|
|
2608
|
+
};
|
|
2609
|
+
|
|
2353
2610
|
React.useEffect(function () {
|
|
2354
2611
|
if (!videoLoaded && experienceID) {
|
|
2355
|
-
//To load Experience Player JS
|
|
2612
|
+
// To load Experience Player JS
|
|
2356
2613
|
var experiencePlayerScript = document.createElement('script');
|
|
2357
2614
|
experiencePlayerScript.src = 'https://players.brightcove.net/' + accountIDs.brightcove.accountId + '/experience_' + experienceID + '/live.js';
|
|
2358
2615
|
document.body.appendChild(experiencePlayerScript);
|
|
@@ -2365,8 +2622,9 @@ var Video = function Video(_ref) {
|
|
|
2365
2622
|
};
|
|
2366
2623
|
|
|
2367
2624
|
var onVideoSuccess = function onVideoSuccess(success) {
|
|
2368
|
-
//console.log('success:', success
|
|
2625
|
+
// console.log('success:', success)
|
|
2369
2626
|
var player = success.ref;
|
|
2627
|
+
setVideoPlayer(player);
|
|
2370
2628
|
if (_typeof$1._typeof(player.ima3) === 'object' && player.ima3.settings && player.ima3.settings.serverUrl && targeting !== null) {
|
|
2371
2629
|
player.ima3.settings.debug = true;
|
|
2372
2630
|
if (targeting.content_placement && targeting.document_url) {
|
|
@@ -2377,7 +2635,7 @@ var Video = function Video(_ref) {
|
|
|
2377
2635
|
player.on('loadedmetadata', function (evt) {
|
|
2378
2636
|
var _this = this;
|
|
2379
2637
|
|
|
2380
|
-
//console.log('loadedmetadata:', evt)
|
|
2638
|
+
// console.log('loadedmetadata:', evt)
|
|
2381
2639
|
console.log('mediainfo:', player.mediainfo); // get the duration from here
|
|
2382
2640
|
var duration = player.mediainfo.duration;
|
|
2383
2641
|
var current = player.currentTime();
|
|
@@ -2421,17 +2679,46 @@ var Video = function Video(_ref) {
|
|
|
2421
2679
|
autoPlayVideo();
|
|
2422
2680
|
}
|
|
2423
2681
|
|
|
2424
|
-
//Beam.report_beam_video('Ready', deviceType, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID)
|
|
2682
|
+
// Beam.report_beam_video('Ready', deviceType, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID)
|
|
2425
2683
|
Segment.report_video_event('Video Ready', main.main_18, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID);
|
|
2426
2684
|
});
|
|
2427
|
-
|
|
2428
|
-
|
|
2685
|
+
var intId = void 0;
|
|
2686
|
+
var convertTime = function convertTime(timeStr) {
|
|
2687
|
+
var minutes = parseInt(timeStr.slice(0, 2));
|
|
2688
|
+
var seconds = parseInt(timeStr.slice(3));
|
|
2689
|
+
return minutes * 60 + seconds;
|
|
2690
|
+
};
|
|
2691
|
+
var modalTimes = [];
|
|
2692
|
+
polls.forEach(function (pollObj) {
|
|
2693
|
+
return modalTimes.push(convertTime(pollObj.timestamp));
|
|
2694
|
+
});
|
|
2695
|
+
// console.log('last poll time', modalTimes[modalTimes.length - 1])
|
|
2429
2696
|
player.on('play', function (evt) {
|
|
2430
2697
|
var duration = player.mediainfo.duration;
|
|
2431
2698
|
var current = player.currentTime();
|
|
2432
2699
|
var queue = Math.floor(duration / 10);
|
|
2433
2700
|
var segment = Math.floor(current / queue);
|
|
2434
|
-
|
|
2701
|
+
if (polls) {
|
|
2702
|
+
var vidPlayer = this;
|
|
2703
|
+
intId = setInterval(function () {
|
|
2704
|
+
var ct = player.currentTime();
|
|
2705
|
+
// if (intId) console.log(`interval ID is ${intId}`)
|
|
2706
|
+
// console.log('isPollingTime', isPollingTime)
|
|
2707
|
+
modalTimes.forEach(function (modalTime, ind) {
|
|
2708
|
+
if (Math.floor(ct) === modalTime) {
|
|
2709
|
+
setPollItems(polls[ind].pollItems);
|
|
2710
|
+
setPollUrl(targeting.document_url[0]);
|
|
2711
|
+
setIsPollingTime(true);
|
|
2712
|
+
polls[ind].pollItems.forEach(function (item) {
|
|
2713
|
+
if (item.format === 'multiChoice') setMultiChoiceRender(true);
|
|
2714
|
+
if (item.format === 'textInput') setTextInputRender(true);
|
|
2715
|
+
});
|
|
2716
|
+
vidPlayer.pause();
|
|
2717
|
+
}
|
|
2718
|
+
});
|
|
2719
|
+
}, 1000);
|
|
2720
|
+
}
|
|
2721
|
+
// Beam.report_beam_video('Play', deviceType, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID)
|
|
2435
2722
|
Segment.report_video_event('Video Play', main.main_18, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID);
|
|
2436
2723
|
});
|
|
2437
2724
|
|
|
@@ -2441,7 +2728,9 @@ var Video = function Video(_ref) {
|
|
|
2441
2728
|
var current = player.currentTime();
|
|
2442
2729
|
var queue = Math.floor(duration / 10);
|
|
2443
2730
|
var segment = Math.floor(current / queue);
|
|
2444
|
-
|
|
2731
|
+
clearInterval(intId);
|
|
2732
|
+
console.log('clearing interval ' + intId + ' in pause');
|
|
2733
|
+
// Beam.report_beam_video('Pause', deviceType, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID)
|
|
2445
2734
|
Segment.report_video_event('Video Pause', main.main_18, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID);
|
|
2446
2735
|
});
|
|
2447
2736
|
|
|
@@ -2451,9 +2740,10 @@ var Video = function Video(_ref) {
|
|
|
2451
2740
|
var current = player.currentTime();
|
|
2452
2741
|
var queue = Math.floor(duration / 10);
|
|
2453
2742
|
var segment = Math.floor(current / queue);
|
|
2454
|
-
|
|
2743
|
+
clearInterval(intId);
|
|
2744
|
+
// Beam.report_beam_video('End', deviceType, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID)
|
|
2455
2745
|
Segment.report_video_event('Video End', main.main_18, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID);
|
|
2456
|
-
//This is for old series format
|
|
2746
|
+
// This is for old series format
|
|
2457
2747
|
autoplayNextVideo(evt);
|
|
2458
2748
|
if (nextVideo) {
|
|
2459
2749
|
window.location.href = '/view/' + nextVideo;
|
|
@@ -2467,7 +2757,7 @@ var Video = function Video(_ref) {
|
|
|
2467
2757
|
var queue = Math.floor(duration / 10);
|
|
2468
2758
|
var segment = Math.floor(current / queue);
|
|
2469
2759
|
if (!queueProgress.includes(segment)) {
|
|
2470
|
-
//Beam.report_beam_video('Segment', deviceType, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID)
|
|
2760
|
+
// Beam.report_beam_video('Segment', deviceType, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID)
|
|
2471
2761
|
Segment.report_video_event('Video Segment', main.main_18, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID);
|
|
2472
2762
|
queueProgress.push(segment);
|
|
2473
2763
|
}
|
|
@@ -2476,19 +2766,19 @@ var Video = function Video(_ref) {
|
|
|
2476
2766
|
// ad impression
|
|
2477
2767
|
player.on('ads-ad-started', function (evt) {
|
|
2478
2768
|
var duration = player.ads.ad.duration;
|
|
2479
|
-
player.ads.ad.id
|
|
2769
|
+
// const id = player.ads.ad.id
|
|
2480
2770
|
var adType = 'Bright Cove: ' + player.ads.ad.type;
|
|
2481
2771
|
|
|
2482
|
-
//Beam.report_beam_ad('AD Started', deviceType, '', '', '', '', '', adType, duration, id)
|
|
2772
|
+
// Beam.report_beam_ad('AD Started', deviceType, '', '', '', '', '', adType, duration, id)
|
|
2483
2773
|
Segment.report_ad_event('Video Ad Started', main.main_18, duration, adType, accountIDs.brightcove.playerId, accountIDs.brightcove.accountId);
|
|
2484
2774
|
});
|
|
2485
2775
|
|
|
2486
2776
|
// ad ended
|
|
2487
2777
|
player.on('ads-ad-ended', function (evt) {
|
|
2488
2778
|
var duration = player.ads.ad.duration;
|
|
2489
|
-
player.ads.ad.id
|
|
2779
|
+
// const id = player.ads.ad.id
|
|
2490
2780
|
var adType = 'Bright Cove: ' + player.ads.ad.type;
|
|
2491
|
-
//Beam.report_beam_ad('AD Ended', deviceType, '', '', '', '', '', adType, duration, id)
|
|
2781
|
+
// Beam.report_beam_ad('AD Ended', deviceType, '', '', '', '', '', adType, duration, id)
|
|
2492
2782
|
Segment.report_ad_event('Video Ad Ended', main.main_18, duration, adType, accountIDs.brightcove.playerId, accountIDs.brightcove.accountId);
|
|
2493
2783
|
});
|
|
2494
2784
|
};
|
|
@@ -2498,6 +2788,20 @@ var Video = function Video(_ref) {
|
|
|
2498
2788
|
return React__default['default'].createElement(
|
|
2499
2789
|
'div',
|
|
2500
2790
|
null,
|
|
2791
|
+
isPollingTime ? React__default['default'].createElement(PopupPollModal
|
|
2792
|
+
// eslint-disable-next-line react/jsx-indent-props
|
|
2793
|
+
, { pollItems: pollItems
|
|
2794
|
+
// eslint-disable-next-line react/jsx-indent-props
|
|
2795
|
+
, pollUrl: pollUrl
|
|
2796
|
+
// eslint-disable-next-line react/jsx-indent-props
|
|
2797
|
+
, isPollingTime: isPollingTime
|
|
2798
|
+
// eslint-disable-next-line react/jsx-indent-props
|
|
2799
|
+
, restartPlayer: restartPlayer
|
|
2800
|
+
// eslint-disable-next-line react/jsx-indent-props
|
|
2801
|
+
, textInputRender: textInputRender
|
|
2802
|
+
// eslint-disable-next-line react/jsx-indent-props
|
|
2803
|
+
, multiChoiceRender: multiChoiceRender
|
|
2804
|
+
}) : null,
|
|
2501
2805
|
React__default['default'].createElement(brightcoveReactPlayerLoader_es.ReactPlayerLoader, {
|
|
2502
2806
|
onSuccess: onVideoSuccess,
|
|
2503
2807
|
onFailure: onVideoFailure,
|
|
@@ -2539,6 +2843,7 @@ var Video = function Video(_ref) {
|
|
|
2539
2843
|
}
|
|
2540
2844
|
return null;
|
|
2541
2845
|
}
|
|
2846
|
+
|
|
2542
2847
|
if (source === 'mp4') {
|
|
2543
2848
|
return React__default['default'].createElement(
|
|
2544
2849
|
'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-619b5600.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-47a80fcc.js';
|
|
7
7
|
import ArticleSeriesListing from './ArticleSeriesListing.js';
|
|
8
8
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
9
9
|
import './core.get-iterator-method-ea258bb1.js';
|
|
@@ -30,6 +30,9 @@ 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';
|
|
33
36
|
import './GroupDeck.js';
|
|
34
37
|
import './smoothscroll-fa4e3f8c.js';
|
|
35
38
|
import './moment-bc12cb97.js';
|
|
@@ -39,7 +42,6 @@ import 'react-share';
|
|
|
39
42
|
import './_object-to-array-2300e51b.js';
|
|
40
43
|
import './toConsumableArray-f7074d7c.js';
|
|
41
44
|
import 'react-bootstrap/Pagination';
|
|
42
|
-
import 'react-bootstrap/Button';
|
|
43
45
|
import './entities-6d9154b4.js';
|
|
44
46
|
import './AdSlot.js';
|
|
45
47
|
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-47a80fcc.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,6 +31,8 @@ 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';
|
|
34
36
|
import './GroupDeck.js';
|
|
35
37
|
import './smoothscroll-fa4e3f8c.js';
|
|
36
38
|
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-47a80fcc.js';
|
|
7
7
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
8
8
|
import './core.get-iterator-method-ea258bb1.js';
|
|
9
9
|
import './_object-pie-133f504a.js';
|
|
@@ -34,6 +34,9 @@ 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';
|
|
37
40
|
import './GroupDeck.js';
|
|
38
41
|
import './moment-bc12cb97.js';
|
|
39
42
|
import './SocialShare.js';
|
|
@@ -42,7 +45,6 @@ import 'react-share';
|
|
|
42
45
|
import './_object-to-array-2300e51b.js';
|
|
43
46
|
import './toConsumableArray-f7074d7c.js';
|
|
44
47
|
import 'react-bootstrap/Pagination';
|
|
45
|
-
import 'react-bootstrap/Button';
|
|
46
48
|
import './entities-6d9154b4.js';
|
|
47
49
|
import './AdSlot.js';
|
|
48
50
|
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-47a80fcc.js';
|
|
7
7
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
8
8
|
import './core.get-iterator-method-ea258bb1.js';
|
|
9
9
|
import './_object-pie-133f504a.js';
|
|
@@ -48,6 +48,9 @@ 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';
|
|
51
54
|
import './GroupDeck.js';
|
|
52
55
|
import './smoothscroll-fa4e3f8c.js';
|
|
53
56
|
import './SocialShare.js';
|
|
@@ -55,7 +58,6 @@ import 'next/head';
|
|
|
55
58
|
import 'react-share';
|
|
56
59
|
import './_object-to-array-2300e51b.js';
|
|
57
60
|
import 'react-bootstrap/Pagination';
|
|
58
|
-
import 'react-bootstrap/Button';
|
|
59
61
|
import 'react-bootstrap/Row';
|
|
60
62
|
import 'react-bootstrap/Col';
|
|
61
63
|
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-47a80fcc.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-ca3c348f.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-47a80fcc.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,6 +52,9 @@ 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';
|
|
55
58
|
import './GroupDeck.js';
|
|
56
59
|
import './smoothscroll-fa4e3f8c.js';
|
|
57
60
|
import './SocialShare.js';
|
|
@@ -59,7 +62,6 @@ import 'next/head';
|
|
|
59
62
|
import 'react-share';
|
|
60
63
|
import './_object-to-array-2300e51b.js';
|
|
61
64
|
import 'react-bootstrap/Pagination';
|
|
62
|
-
import 'react-bootstrap/Button';
|
|
63
65
|
import './entities-6d9154b4.js';
|
|
64
66
|
import './index.esm-eb1e8e80.js';
|
|
65
67
|
import './iconBase-ccc56b97.js';
|