@mjhls/mjh-framework 1.0.918 → 1.0.919-TEST

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.
Files changed (32) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/ArticleProgramLandingPage.js +4 -2
  3. package/dist/cjs/ExternalResources.js +3 -1
  4. package/dist/cjs/HorizontalArticleListing.js +4 -2
  5. package/dist/cjs/IssueLanding.js +4 -2
  6. package/dist/cjs/{MediaSeriesCard-34235827.js → MediaSeriesCard-31e82b76.js} +1 -1
  7. package/dist/cjs/MediaSeriesLanding.js +5 -3
  8. package/dist/cjs/MediaSeriesLandingPaginated.js +4 -2
  9. package/dist/cjs/PartnerDetailListing.js +4 -2
  10. package/dist/cjs/PartnerDetailListingPaginated.js +3 -1
  11. package/dist/cjs/TaxonomyDescription.js +4 -2
  12. package/dist/cjs/VideoProgramLandingPage.js +2 -1
  13. package/dist/cjs/View.js +8 -1
  14. package/dist/cjs/getSerializers.js +4 -2
  15. package/dist/cjs/{index-f9f5f7c0.js → index-da44b1e7.js} +345 -22
  16. package/dist/cjs/index.js +1 -1
  17. package/dist/esm/ArticleProgramLandingPage.js +4 -2
  18. package/dist/esm/ExternalResources.js +3 -1
  19. package/dist/esm/HorizontalArticleListing.js +4 -2
  20. package/dist/esm/IssueLanding.js +4 -2
  21. package/dist/esm/{MediaSeriesCard-8a9b91e6.js → MediaSeriesCard-3d6acf32.js} +1 -1
  22. package/dist/esm/MediaSeriesLanding.js +5 -3
  23. package/dist/esm/MediaSeriesLandingPaginated.js +4 -2
  24. package/dist/esm/PartnerDetailListing.js +4 -2
  25. package/dist/esm/PartnerDetailListingPaginated.js +3 -1
  26. package/dist/esm/TaxonomyDescription.js +4 -2
  27. package/dist/esm/VideoProgramLandingPage.js +2 -1
  28. package/dist/esm/View.js +8 -1
  29. package/dist/esm/getSerializers.js +4 -2
  30. package/dist/esm/{index-4d8a8743.js → index-803278c4.js} +346 -25
  31. package/dist/esm/index.js +1 -1
  32. 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 Pagination__default = /*#__PURE__*/_interopDefaultLegacy(Pagination);
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,229 @@ 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
+ 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
+
2332
2560
  var Video = function Video(_ref) {
2333
2561
  var node = _ref.node,
2334
2562
  accountIDs = _ref.accountIDs,
@@ -2345,14 +2573,57 @@ var Video = function Video(_ref) {
2345
2573
  playlistID = node.playlistID,
2346
2574
  experienceID = node.experienceID;
2347
2575
 
2576
+ var polls = void 0;
2577
+ if (node.polls) polls = node.polls;
2578
+
2348
2579
  var _useState = React.useState(false),
2349
2580
  _useState2 = slicedToArray._slicedToArray(_useState, 2),
2350
2581
  videoLoaded = _useState2[0],
2351
2582
  setVideoLoaded = _useState2[1];
2352
2583
 
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
+
2353
2624
  React.useEffect(function () {
2354
2625
  if (!videoLoaded && experienceID) {
2355
- //To load Experience Player JS
2626
+ // To load Experience Player JS
2356
2627
  var experiencePlayerScript = document.createElement('script');
2357
2628
  experiencePlayerScript.src = 'https://players.brightcove.net/' + accountIDs.brightcove.accountId + '/experience_' + experienceID + '/live.js';
2358
2629
  document.body.appendChild(experiencePlayerScript);
@@ -2365,8 +2636,9 @@ var Video = function Video(_ref) {
2365
2636
  };
2366
2637
 
2367
2638
  var onVideoSuccess = function onVideoSuccess(success) {
2368
- //console.log('success:', success.ref)
2639
+ // console.log('success:', success)
2369
2640
  var player = success.ref;
2641
+ setVideoPlayer(player);
2370
2642
  if (_typeof$1._typeof(player.ima3) === 'object' && player.ima3.settings && player.ima3.settings.serverUrl && targeting !== null) {
2371
2643
  player.ima3.settings.debug = true;
2372
2644
  if (targeting.content_placement && targeting.document_url) {
@@ -2377,7 +2649,7 @@ var Video = function Video(_ref) {
2377
2649
  player.on('loadedmetadata', function (evt) {
2378
2650
  var _this = this;
2379
2651
 
2380
- //console.log('loadedmetadata:', evt)
2652
+ // console.log('loadedmetadata:', evt)
2381
2653
  console.log('mediainfo:', player.mediainfo); // get the duration from here
2382
2654
  var duration = player.mediainfo.duration;
2383
2655
  var current = player.currentTime();
@@ -2421,17 +2693,50 @@ var Video = function Video(_ref) {
2421
2693
  autoPlayVideo();
2422
2694
  }
2423
2695
 
2424
- //Beam.report_beam_video('Ready', deviceType, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID)
2696
+ // Beam.report_beam_video('Ready', deviceType, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID)
2425
2697
  Segment.report_video_event('Video Ready', main.main_18, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID);
2426
2698
  });
2427
-
2428
- // play
2699
+ var intId = void 0;
2700
+ var convertTime = function convertTime(timeStr) {
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]);
2429
2710
  player.on('play', function (evt) {
2430
2711
  var duration = player.mediainfo.duration;
2431
2712
  var current = player.currentTime();
2432
2713
  var queue = Math.floor(duration / 10);
2433
2714
  var segment = Math.floor(current / queue);
2434
- //Beam.report_beam_video('Play', deviceType, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID)
2715
+ if (polls) {
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)
2435
2740
  Segment.report_video_event('Video Play', main.main_18, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID);
2436
2741
  });
2437
2742
 
@@ -2441,7 +2746,9 @@ var Video = function Video(_ref) {
2441
2746
  var current = player.currentTime();
2442
2747
  var queue = Math.floor(duration / 10);
2443
2748
  var segment = Math.floor(current / queue);
2444
- //Beam.report_beam_video('Pause', deviceType, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID)
2749
+ clearInterval(intId);
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)
2445
2752
  Segment.report_video_event('Video Pause', main.main_18, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID);
2446
2753
  });
2447
2754
 
@@ -2451,9 +2758,10 @@ var Video = function Video(_ref) {
2451
2758
  var current = player.currentTime();
2452
2759
  var queue = Math.floor(duration / 10);
2453
2760
  var segment = Math.floor(current / queue);
2454
- //Beam.report_beam_video('End', deviceType, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID)
2761
+ clearInterval(intId);
2762
+ // Beam.report_beam_video('End', deviceType, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID)
2455
2763
  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
2764
+ // This is for old series format
2457
2765
  autoplayNextVideo(evt);
2458
2766
  if (nextVideo) {
2459
2767
  window.location.href = '/view/' + nextVideo;
@@ -2467,7 +2775,7 @@ var Video = function Video(_ref) {
2467
2775
  var queue = Math.floor(duration / 10);
2468
2776
  var segment = Math.floor(current / queue);
2469
2777
  if (!queueProgress.includes(segment)) {
2470
- //Beam.report_beam_video('Segment', deviceType, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID)
2778
+ // Beam.report_beam_video('Segment', deviceType, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID)
2471
2779
  Segment.report_video_event('Video Segment', main.main_18, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID);
2472
2780
  queueProgress.push(segment);
2473
2781
  }
@@ -2476,19 +2784,19 @@ var Video = function Video(_ref) {
2476
2784
  // ad impression
2477
2785
  player.on('ads-ad-started', function (evt) {
2478
2786
  var duration = player.ads.ad.duration;
2479
- player.ads.ad.id;
2787
+ // const id = player.ads.ad.id
2480
2788
  var adType = 'Bright Cove: ' + player.ads.ad.type;
2481
2789
 
2482
- //Beam.report_beam_ad('AD Started', deviceType, '', '', '', '', '', adType, duration, id)
2790
+ // Beam.report_beam_ad('AD Started', deviceType, '', '', '', '', '', adType, duration, id)
2483
2791
  Segment.report_ad_event('Video Ad Started', main.main_18, duration, adType, accountIDs.brightcove.playerId, accountIDs.brightcove.accountId);
2484
2792
  });
2485
2793
 
2486
2794
  // ad ended
2487
2795
  player.on('ads-ad-ended', function (evt) {
2488
2796
  var duration = player.ads.ad.duration;
2489
- player.ads.ad.id;
2797
+ // const id = player.ads.ad.id
2490
2798
  var adType = 'Bright Cove: ' + player.ads.ad.type;
2491
- //Beam.report_beam_ad('AD Ended', deviceType, '', '', '', '', '', adType, duration, id)
2799
+ // Beam.report_beam_ad('AD Ended', deviceType, '', '', '', '', '', adType, duration, id)
2492
2800
  Segment.report_ad_event('Video Ad Ended', main.main_18, duration, adType, accountIDs.brightcove.playerId, accountIDs.brightcove.accountId);
2493
2801
  });
2494
2802
  };
@@ -2498,6 +2806,20 @@ var Video = function Video(_ref) {
2498
2806
  return React__default['default'].createElement(
2499
2807
  'div',
2500
2808
  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,
2501
2823
  React__default['default'].createElement(brightcoveReactPlayerLoader_es.ReactPlayerLoader, {
2502
2824
  onSuccess: onVideoSuccess,
2503
2825
  onFailure: onVideoFailure,
@@ -2539,6 +2861,7 @@ var Video = function Video(_ref) {
2539
2861
  }
2540
2862
  return null;
2541
2863
  }
2864
+
2542
2865
  if (source === 'mp4') {
2543
2866
  return React__default['default'].createElement(
2544
2867
  '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-f9f5f7c0.js');
85
+ var getSerializers = require('./index-da44b1e7.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-4d8a8743.js';
6
+ import { g as getSerializers } from './index-803278c4.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-4d8a8743.js';
5
+ import { g as getSerializers } from './index-803278c4.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-4d8a8743.js';
6
+ import { g as getSerializers } from './index-803278c4.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';
@@ -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-4d8a8743.js';
6
+ import { g as getSerializers } from './index-803278c4.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-4d8a8743.js';
12
+ import { g as getSerializers } from './index-803278c4.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-8a9b91e6.js';
6
+ import { M as MediaSeriesCard, D as DropdownButton, a as Dropdown } from './MediaSeriesCard-3d6acf32.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-4d8a8743.js';
12
+ import { g as getSerializers } from './index-803278c4.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';