@mjhls/mjh-framework 1.0.919-TEST-V2 → 1.0.920
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 +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-7e1ebe32.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 +7 -2
- package/dist/cjs/getQuery.js +1 -1
- package/dist/cjs/getSerializers.js +2 -4
- package/dist/cjs/{index-619b5600.js → index-f9f5f7c0.js} +22 -327
- 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-ca3c348f.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 +7 -2
- package/dist/esm/getQuery.js +1 -1
- package/dist/esm/getSerializers.js +2 -4
- package/dist/esm/{index-47a80fcc.js → index-4d8a8743.js} +25 -328
- package/dist/esm/index.js +1 -1
- package/package.json +1 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { _ as _extends, b as _extends$1 } from './extends-6d8e3924.js';
|
|
2
2
|
import React__default, { useState, useEffect, useRef, useLayoutEffect, useCallback } from 'react';
|
|
3
3
|
import { _ as _slicedToArray, a as _getIterator } from './slicedToArray-6ebcbfea.js';
|
|
4
|
-
import { Carousel, Table, Figure as Figure$1, Card, Row, Col, Button
|
|
4
|
+
import { Carousel, Table, Figure as Figure$1, Card, Row, Col, Button, ProgressBar } from 'react-bootstrap';
|
|
5
5
|
import urlFor from './urlFor.js';
|
|
6
6
|
import { l as lib_3 } from './index-f0fc23eb.js';
|
|
7
7
|
import Router, { useRouter } from 'next/router';
|
|
@@ -18,10 +18,6 @@ import { L as LazyLoad } from './index-755f2cc2.js';
|
|
|
18
18
|
import { a as _asyncToGenerator, r as regenerator } from './asyncToGenerator-5ef104a7.js';
|
|
19
19
|
import { _ as _typeof$1 } from './typeof-e9fc0c5d.js';
|
|
20
20
|
import { R as ReactPlayerLoader } from './brightcove-react-player-loader.es-57a70a56.js';
|
|
21
|
-
import { _ as _JSON$stringify } from './stringify-2b084bee.js';
|
|
22
|
-
import Modal from 'react-bootstrap/Modal';
|
|
23
|
-
import Button from 'react-bootstrap/Button';
|
|
24
|
-
import Form from 'react-bootstrap/Form';
|
|
25
21
|
import GroupDeck from './GroupDeck.js';
|
|
26
22
|
import { m as moment } from './moment-bc12cb97.js';
|
|
27
23
|
import SocialShare from './SocialShare.js';
|
|
@@ -29,6 +25,7 @@ import { _ as _export, a as _core } from './core.get-iterator-method-ea258bb1.js
|
|
|
29
25
|
import { _ as _objectToArray } from './_object-to-array-2300e51b.js';
|
|
30
26
|
import { a as _Array$from, _ as _toConsumableArray } from './toConsumableArray-f7074d7c.js';
|
|
31
27
|
import Pagination from 'react-bootstrap/Pagination';
|
|
28
|
+
import Button$1 from 'react-bootstrap/Button';
|
|
32
29
|
import { h as html_decode_1 } from './entities-6d9154b4.js';
|
|
33
30
|
import DFPAdSlot from './AdSlot.js';
|
|
34
31
|
import Row$1 from 'react-bootstrap/Row';
|
|
@@ -2227,7 +2224,7 @@ var VideoMp4 = function VideoMp4(_ref) {
|
|
|
2227
2224
|
var duration = player.duration;
|
|
2228
2225
|
var queue = Math.floor(duration / 10);
|
|
2229
2226
|
var segment = Math.floor(current / queue);
|
|
2230
|
-
//
|
|
2227
|
+
//Beam.report_beam_video('Ready', deviceType, duration, current, segment, 'MP4')
|
|
2231
2228
|
Segment.report_video_event('Video Ready', main_18, duration, current, segment, 'MP4');
|
|
2232
2229
|
};
|
|
2233
2230
|
|
|
@@ -2237,7 +2234,7 @@ var VideoMp4 = function VideoMp4(_ref) {
|
|
|
2237
2234
|
var queue = Math.floor(duration / 10);
|
|
2238
2235
|
var segment = Math.floor(current / queue);
|
|
2239
2236
|
if (!queueProgress.includes(segment)) {
|
|
2240
|
-
//
|
|
2237
|
+
//Beam.report_beam_video('Segment', deviceType, duration, current, segment, 'MP4')
|
|
2241
2238
|
Segment.report_video_event('Video Segment', main_18, duration, current, segment, 'MP4');
|
|
2242
2239
|
queueProgress.push(segment);
|
|
2243
2240
|
}
|
|
@@ -2250,7 +2247,7 @@ var VideoMp4 = function VideoMp4(_ref) {
|
|
|
2250
2247
|
var duration = player.duration;
|
|
2251
2248
|
var queue = Math.floor(duration / 10);
|
|
2252
2249
|
var segment = Math.floor(current / queue);
|
|
2253
|
-
//
|
|
2250
|
+
//Beam.report_beam_video('Play', deviceType, duration, current, segment, 'MP4')
|
|
2254
2251
|
Segment.report_video_event('Video Play', main_18, duration, current, segment, 'MP4');
|
|
2255
2252
|
|
|
2256
2253
|
if (!playReported) {
|
|
@@ -2271,7 +2268,7 @@ var VideoMp4 = function VideoMp4(_ref) {
|
|
|
2271
2268
|
var queue = Math.floor(duration / 10);
|
|
2272
2269
|
var segment = Math.floor(current / queue);
|
|
2273
2270
|
|
|
2274
|
-
//
|
|
2271
|
+
//Beam.report_beam_video('End', deviceType, duration, current, segment, 'MP4')
|
|
2275
2272
|
Segment.report_video_event('Video End', main_18, duration, current, segment, 'MP4');
|
|
2276
2273
|
setEndReported(true);
|
|
2277
2274
|
clearInterval(intervalID);
|
|
@@ -2284,7 +2281,7 @@ var VideoMp4 = function VideoMp4(_ref) {
|
|
|
2284
2281
|
var duration = player.duration - current;
|
|
2285
2282
|
var queue = Math.floor(duration / 10);
|
|
2286
2283
|
var segment = Math.floor(current / queue);
|
|
2287
|
-
//
|
|
2284
|
+
//Beam.report_beam_video('Pause', deviceType, duration, current, segment, 'MP4')
|
|
2288
2285
|
Segment.report_video_event('Video Pause', main_18, duration, current, segment, 'MP4');
|
|
2289
2286
|
};
|
|
2290
2287
|
|
|
@@ -2315,220 +2312,6 @@ var VideoMp4 = function VideoMp4(_ref) {
|
|
|
2315
2312
|
);
|
|
2316
2313
|
};
|
|
2317
2314
|
|
|
2318
|
-
var PopupMultiChoice = function PopupMultiChoice(_ref) {
|
|
2319
|
-
var question = _ref.question,
|
|
2320
|
-
choices = _ref.choices,
|
|
2321
|
-
handlePollAnswer = _ref.handlePollAnswer;
|
|
2322
|
-
|
|
2323
|
-
var choiceArray = choices.map(function (choice) {
|
|
2324
|
-
return React__default.createElement(Form.Check, {
|
|
2325
|
-
inline: true,
|
|
2326
|
-
label: choice.choiceText,
|
|
2327
|
-
value: choice.choiceText,
|
|
2328
|
-
name: 'radioButton',
|
|
2329
|
-
type: 'radio',
|
|
2330
|
-
className: 'radioButton',
|
|
2331
|
-
onClick: handlePollAnswer
|
|
2332
|
-
});
|
|
2333
|
-
});
|
|
2334
|
-
return React__default.createElement(
|
|
2335
|
-
'div',
|
|
2336
|
-
{
|
|
2337
|
-
key: 'inline-radio',
|
|
2338
|
-
className: 'mb-3' },
|
|
2339
|
-
React__default.createElement(
|
|
2340
|
-
'h2',
|
|
2341
|
-
{
|
|
2342
|
-
className: 'radioLabelText'
|
|
2343
|
-
},
|
|
2344
|
-
question
|
|
2345
|
-
),
|
|
2346
|
-
React__default.createElement(
|
|
2347
|
-
'div',
|
|
2348
|
-
{
|
|
2349
|
-
className: 'multiChoiceDiv'
|
|
2350
|
-
},
|
|
2351
|
-
choiceArray
|
|
2352
|
-
)
|
|
2353
|
-
);
|
|
2354
|
-
};
|
|
2355
|
-
|
|
2356
|
-
var PopupPollTextInput = function PopupPollTextInput(_ref) {
|
|
2357
|
-
var textInputQuestion = _ref.textInputQuestion,
|
|
2358
|
-
textAnswer = _ref.textAnswer,
|
|
2359
|
-
handleTextAnswer = _ref.handleTextAnswer;
|
|
2360
|
-
|
|
2361
|
-
return React__default.createElement(
|
|
2362
|
-
'div',
|
|
2363
|
-
{
|
|
2364
|
-
className: 'textInputDiv'
|
|
2365
|
-
},
|
|
2366
|
-
React__default.createElement(
|
|
2367
|
-
'h2',
|
|
2368
|
-
{
|
|
2369
|
-
className: 'textInputQuestion'
|
|
2370
|
-
},
|
|
2371
|
-
textInputQuestion
|
|
2372
|
-
),
|
|
2373
|
-
React__default.createElement(Form.Control, {
|
|
2374
|
-
type: 'text',
|
|
2375
|
-
className: 'textInput',
|
|
2376
|
-
value: textAnswer,
|
|
2377
|
-
placeholder: 'Your response',
|
|
2378
|
-
onChange: handleTextAnswer
|
|
2379
|
-
})
|
|
2380
|
-
);
|
|
2381
|
-
};
|
|
2382
|
-
|
|
2383
|
-
var _this = undefined;
|
|
2384
|
-
var fetch = require('node-fetch');
|
|
2385
|
-
|
|
2386
|
-
var PopupPollModal = function PopupPollModal(props) {
|
|
2387
|
-
var pollItems = props.pollItems,
|
|
2388
|
-
pollUrl = props.pollUrl,
|
|
2389
|
-
restartPlayer = props.restartPlayer,
|
|
2390
|
-
multiChoiceRender = props.multiChoiceRender,
|
|
2391
|
-
textInputRender = props.textInputRender;
|
|
2392
|
-
|
|
2393
|
-
var _useState = useState(''),
|
|
2394
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
2395
|
-
pollAnswer = _useState2[0],
|
|
2396
|
-
setPollAnswer = _useState2[1];
|
|
2397
|
-
|
|
2398
|
-
var _useState3 = useState(''),
|
|
2399
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
2400
|
-
textAnswer = _useState4[0],
|
|
2401
|
-
setTextAnswer = _useState4[1];
|
|
2402
|
-
|
|
2403
|
-
useEffect(function () {
|
|
2404
|
-
var modal = document.getElementById('modalDiv');
|
|
2405
|
-
modal.style.visibility = 'visible';
|
|
2406
|
-
}, []);
|
|
2407
|
-
|
|
2408
|
-
var handleTextAnswer = function handleTextAnswer(e) {
|
|
2409
|
-
setTextAnswer(e.target.value);
|
|
2410
|
-
};
|
|
2411
|
-
|
|
2412
|
-
var handlePollAnswer = function handlePollAnswer(e) {
|
|
2413
|
-
setPollAnswer(e.target.value);
|
|
2414
|
-
};
|
|
2415
|
-
|
|
2416
|
-
var handleSubmit = function handleSubmit(e) {
|
|
2417
|
-
var currentDate = new Date(Date.now()).toUTCString();
|
|
2418
|
-
// eslint-disable-next-line no-undef
|
|
2419
|
-
var anonymousID = typeof analytics !== 'undefined' && typeof analytics.user === 'function' && analytics.user() && analytics.user().anonymousId();
|
|
2420
|
-
pollItems.forEach(function (item) {
|
|
2421
|
-
var submitAnswer = void 0;
|
|
2422
|
-
if (item.format === 'multiChoice') submitAnswer = pollAnswer;
|
|
2423
|
-
if (item.format === 'textInput') submitAnswer = textAnswer;
|
|
2424
|
-
var formData = {
|
|
2425
|
-
uuid: anonymousID,
|
|
2426
|
-
url: pollUrl,
|
|
2427
|
-
date: currentDate,
|
|
2428
|
-
question: item.question,
|
|
2429
|
-
answer: submitAnswer
|
|
2430
|
-
};
|
|
2431
|
-
var requestOptions = {
|
|
2432
|
-
method: 'POST',
|
|
2433
|
-
headers: { 'content-type': 'application/json' },
|
|
2434
|
-
body: _JSON$stringify({ data: formData })
|
|
2435
|
-
};
|
|
2436
|
-
var insertData = function () {
|
|
2437
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee() {
|
|
2438
|
-
return regenerator.wrap(function _callee$(_context) {
|
|
2439
|
-
while (1) {
|
|
2440
|
-
switch (_context.prev = _context.next) {
|
|
2441
|
-
case 0:
|
|
2442
|
-
_context.next = 2;
|
|
2443
|
-
return fetch('/api/popup_polls', requestOptions).then(function (res) {
|
|
2444
|
-
return res.json();
|
|
2445
|
-
}).then(function (res) {
|
|
2446
|
-
return console.log(res);
|
|
2447
|
-
});
|
|
2448
|
-
|
|
2449
|
-
case 2:
|
|
2450
|
-
case 'end':
|
|
2451
|
-
return _context.stop();
|
|
2452
|
-
}
|
|
2453
|
-
}
|
|
2454
|
-
}, _callee, _this);
|
|
2455
|
-
}));
|
|
2456
|
-
|
|
2457
|
-
return function insertData() {
|
|
2458
|
-
return _ref.apply(this, arguments);
|
|
2459
|
-
};
|
|
2460
|
-
}();
|
|
2461
|
-
console.log('formData', formData);
|
|
2462
|
-
insertData();
|
|
2463
|
-
});
|
|
2464
|
-
restartPlayer();
|
|
2465
|
-
e.preventDefault();
|
|
2466
|
-
};
|
|
2467
|
-
|
|
2468
|
-
var pollArray = [];
|
|
2469
|
-
pollItems.forEach(function (item, ind) {
|
|
2470
|
-
if (item.format === 'multiChoice') {
|
|
2471
|
-
pollArray.push(React__default.createElement(PopupMultiChoice, {
|
|
2472
|
-
question: item.question,
|
|
2473
|
-
choices: item.choices,
|
|
2474
|
-
handlePollAnswer: handlePollAnswer,
|
|
2475
|
-
key: ind
|
|
2476
|
-
}));
|
|
2477
|
-
}
|
|
2478
|
-
if (item.format === 'textInput') {
|
|
2479
|
-
pollArray.push(React__default.createElement(PopupPollTextInput, {
|
|
2480
|
-
textInputQuestion: item.question,
|
|
2481
|
-
textanswer: textAnswer,
|
|
2482
|
-
handleTextAnswer: handleTextAnswer,
|
|
2483
|
-
key: ind
|
|
2484
|
-
}));
|
|
2485
|
-
}
|
|
2486
|
-
});
|
|
2487
|
-
|
|
2488
|
-
return React__default.createElement(
|
|
2489
|
-
'div',
|
|
2490
|
-
{
|
|
2491
|
-
className: 'modalDiv',
|
|
2492
|
-
id: 'modalDiv'
|
|
2493
|
-
},
|
|
2494
|
-
React__default.createElement(
|
|
2495
|
-
Modal.Dialog,
|
|
2496
|
-
null,
|
|
2497
|
-
React__default.createElement(
|
|
2498
|
-
Modal.Body,
|
|
2499
|
-
null,
|
|
2500
|
-
React__default.createElement(
|
|
2501
|
-
Form,
|
|
2502
|
-
{
|
|
2503
|
-
onSubmit: handleSubmit,
|
|
2504
|
-
className: 'modalForm'
|
|
2505
|
-
},
|
|
2506
|
-
pollArray,
|
|
2507
|
-
textInputRender && !multiChoiceRender ? React__default.createElement(
|
|
2508
|
-
Button,
|
|
2509
|
-
{
|
|
2510
|
-
className: 'submitButton',
|
|
2511
|
-
type: 'submit',
|
|
2512
|
-
variant: 'success',
|
|
2513
|
-
disabled: !textAnswer
|
|
2514
|
-
},
|
|
2515
|
-
'Submit'
|
|
2516
|
-
) : React__default.createElement(
|
|
2517
|
-
Button,
|
|
2518
|
-
{
|
|
2519
|
-
className: 'submitButton',
|
|
2520
|
-
type: 'submit',
|
|
2521
|
-
variant: 'success',
|
|
2522
|
-
disabled: !pollAnswer
|
|
2523
|
-
},
|
|
2524
|
-
'Submit'
|
|
2525
|
-
)
|
|
2526
|
-
)
|
|
2527
|
-
)
|
|
2528
|
-
)
|
|
2529
|
-
);
|
|
2530
|
-
};
|
|
2531
|
-
|
|
2532
2315
|
var Video = function Video(_ref) {
|
|
2533
2316
|
var node = _ref.node,
|
|
2534
2317
|
accountIDs = _ref.accountIDs,
|
|
@@ -2545,52 +2328,14 @@ var Video = function Video(_ref) {
|
|
|
2545
2328
|
playlistID = node.playlistID,
|
|
2546
2329
|
experienceID = node.experienceID;
|
|
2547
2330
|
|
|
2548
|
-
var polls = void 0;
|
|
2549
|
-
if (node.polls) polls = node.polls;
|
|
2550
|
-
|
|
2551
2331
|
var _useState = useState(false),
|
|
2552
2332
|
_useState2 = _slicedToArray(_useState, 2),
|
|
2553
2333
|
videoLoaded = _useState2[0],
|
|
2554
2334
|
setVideoLoaded = _useState2[1];
|
|
2555
2335
|
|
|
2556
|
-
var _useState3 = useState(false),
|
|
2557
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
2558
|
-
isPollingTime = _useState4[0],
|
|
2559
|
-
setIsPollingTime = _useState4[1];
|
|
2560
|
-
|
|
2561
|
-
var _useState5 = useState([]),
|
|
2562
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
2563
|
-
pollItems = _useState6[0],
|
|
2564
|
-
setPollItems = _useState6[1];
|
|
2565
|
-
|
|
2566
|
-
var _useState7 = useState(''),
|
|
2567
|
-
_useState8 = _slicedToArray(_useState7, 2),
|
|
2568
|
-
pollUrl = _useState8[0],
|
|
2569
|
-
setPollUrl = _useState8[1];
|
|
2570
|
-
|
|
2571
|
-
var _useState9 = useState(),
|
|
2572
|
-
_useState10 = _slicedToArray(_useState9, 2),
|
|
2573
|
-
videoPlayer = _useState10[0],
|
|
2574
|
-
setVideoPlayer = _useState10[1];
|
|
2575
|
-
|
|
2576
|
-
var _useState11 = useState(false),
|
|
2577
|
-
_useState12 = _slicedToArray(_useState11, 2),
|
|
2578
|
-
multiChoiceRender = _useState12[0],
|
|
2579
|
-
setMultiChoiceRender = _useState12[1];
|
|
2580
|
-
|
|
2581
|
-
var _useState13 = useState(false),
|
|
2582
|
-
_useState14 = _slicedToArray(_useState13, 2),
|
|
2583
|
-
textInputRender = _useState14[0],
|
|
2584
|
-
setTextInputRender = _useState14[1];
|
|
2585
|
-
|
|
2586
|
-
var restartPlayer = function restartPlayer() {
|
|
2587
|
-
setIsPollingTime(false);
|
|
2588
|
-
videoPlayer.play();
|
|
2589
|
-
};
|
|
2590
|
-
|
|
2591
2336
|
useEffect(function () {
|
|
2592
2337
|
if (!videoLoaded && experienceID) {
|
|
2593
|
-
//
|
|
2338
|
+
//To load Experience Player JS
|
|
2594
2339
|
var experiencePlayerScript = document.createElement('script');
|
|
2595
2340
|
experiencePlayerScript.src = 'https://players.brightcove.net/' + accountIDs.brightcove.accountId + '/experience_' + experienceID + '/live.js';
|
|
2596
2341
|
document.body.appendChild(experiencePlayerScript);
|
|
@@ -2603,9 +2348,8 @@ var Video = function Video(_ref) {
|
|
|
2603
2348
|
};
|
|
2604
2349
|
|
|
2605
2350
|
var onVideoSuccess = function onVideoSuccess(success) {
|
|
2606
|
-
//
|
|
2351
|
+
//console.log('success:', success.ref)
|
|
2607
2352
|
var player = success.ref;
|
|
2608
|
-
setVideoPlayer(player);
|
|
2609
2353
|
if (_typeof$1(player.ima3) === 'object' && player.ima3.settings && player.ima3.settings.serverUrl && targeting !== null) {
|
|
2610
2354
|
player.ima3.settings.debug = true;
|
|
2611
2355
|
if (targeting.content_placement && targeting.document_url) {
|
|
@@ -2616,7 +2360,7 @@ var Video = function Video(_ref) {
|
|
|
2616
2360
|
player.on('loadedmetadata', function (evt) {
|
|
2617
2361
|
var _this = this;
|
|
2618
2362
|
|
|
2619
|
-
//
|
|
2363
|
+
//console.log('loadedmetadata:', evt)
|
|
2620
2364
|
console.log('mediainfo:', player.mediainfo); // get the duration from here
|
|
2621
2365
|
var duration = player.mediainfo.duration;
|
|
2622
2366
|
var current = player.currentTime();
|
|
@@ -2660,46 +2404,17 @@ var Video = function Video(_ref) {
|
|
|
2660
2404
|
autoPlayVideo();
|
|
2661
2405
|
}
|
|
2662
2406
|
|
|
2663
|
-
//
|
|
2407
|
+
//Beam.report_beam_video('Ready', deviceType, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID)
|
|
2664
2408
|
Segment.report_video_event('Video Ready', main_18, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID);
|
|
2665
2409
|
});
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
var minutes = parseInt(timeStr.slice(0, 2));
|
|
2669
|
-
var seconds = parseInt(timeStr.slice(3));
|
|
2670
|
-
return minutes * 60 + seconds;
|
|
2671
|
-
};
|
|
2672
|
-
var modalTimes = [];
|
|
2673
|
-
polls.forEach(function (pollObj) {
|
|
2674
|
-
return modalTimes.push(convertTime(pollObj.timestamp));
|
|
2675
|
-
});
|
|
2676
|
-
// console.log('last poll time', modalTimes[modalTimes.length - 1])
|
|
2410
|
+
|
|
2411
|
+
// play
|
|
2677
2412
|
player.on('play', function (evt) {
|
|
2678
2413
|
var duration = player.mediainfo.duration;
|
|
2679
2414
|
var current = player.currentTime();
|
|
2680
2415
|
var queue = Math.floor(duration / 10);
|
|
2681
2416
|
var segment = Math.floor(current / queue);
|
|
2682
|
-
|
|
2683
|
-
var vidPlayer = this;
|
|
2684
|
-
intId = setInterval(function () {
|
|
2685
|
-
var ct = player.currentTime();
|
|
2686
|
-
// if (intId) console.log(`interval ID is ${intId}`)
|
|
2687
|
-
// console.log('isPollingTime', isPollingTime)
|
|
2688
|
-
modalTimes.forEach(function (modalTime, ind) {
|
|
2689
|
-
if (Math.floor(ct) === modalTime) {
|
|
2690
|
-
setPollItems(polls[ind].pollItems);
|
|
2691
|
-
setPollUrl(targeting.document_url[0]);
|
|
2692
|
-
setIsPollingTime(true);
|
|
2693
|
-
polls[ind].pollItems.forEach(function (item) {
|
|
2694
|
-
if (item.format === 'multiChoice') setMultiChoiceRender(true);
|
|
2695
|
-
if (item.format === 'textInput') setTextInputRender(true);
|
|
2696
|
-
});
|
|
2697
|
-
vidPlayer.pause();
|
|
2698
|
-
}
|
|
2699
|
-
});
|
|
2700
|
-
}, 1000);
|
|
2701
|
-
}
|
|
2702
|
-
// Beam.report_beam_video('Play', deviceType, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID)
|
|
2417
|
+
//Beam.report_beam_video('Play', deviceType, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID)
|
|
2703
2418
|
Segment.report_video_event('Video Play', main_18, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID);
|
|
2704
2419
|
});
|
|
2705
2420
|
|
|
@@ -2709,9 +2424,7 @@ var Video = function Video(_ref) {
|
|
|
2709
2424
|
var current = player.currentTime();
|
|
2710
2425
|
var queue = Math.floor(duration / 10);
|
|
2711
2426
|
var segment = Math.floor(current / queue);
|
|
2712
|
-
|
|
2713
|
-
console.log('clearing interval ' + intId + ' in pause');
|
|
2714
|
-
// Beam.report_beam_video('Pause', deviceType, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID)
|
|
2427
|
+
//Beam.report_beam_video('Pause', deviceType, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID)
|
|
2715
2428
|
Segment.report_video_event('Video Pause', main_18, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID);
|
|
2716
2429
|
});
|
|
2717
2430
|
|
|
@@ -2721,10 +2434,9 @@ var Video = function Video(_ref) {
|
|
|
2721
2434
|
var current = player.currentTime();
|
|
2722
2435
|
var queue = Math.floor(duration / 10);
|
|
2723
2436
|
var segment = Math.floor(current / queue);
|
|
2724
|
-
|
|
2725
|
-
// Beam.report_beam_video('End', deviceType, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID)
|
|
2437
|
+
//Beam.report_beam_video('End', deviceType, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID)
|
|
2726
2438
|
Segment.report_video_event('Video End', main_18, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID);
|
|
2727
|
-
//
|
|
2439
|
+
//This is for old series format
|
|
2728
2440
|
autoplayNextVideo(evt);
|
|
2729
2441
|
if (nextVideo) {
|
|
2730
2442
|
window.location.href = '/view/' + nextVideo;
|
|
@@ -2738,7 +2450,7 @@ var Video = function Video(_ref) {
|
|
|
2738
2450
|
var queue = Math.floor(duration / 10);
|
|
2739
2451
|
var segment = Math.floor(current / queue);
|
|
2740
2452
|
if (!queueProgress.includes(segment)) {
|
|
2741
|
-
//
|
|
2453
|
+
//Beam.report_beam_video('Segment', deviceType, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID)
|
|
2742
2454
|
Segment.report_video_event('Video Segment', main_18, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID);
|
|
2743
2455
|
queueProgress.push(segment);
|
|
2744
2456
|
}
|
|
@@ -2747,19 +2459,19 @@ var Video = function Video(_ref) {
|
|
|
2747
2459
|
// ad impression
|
|
2748
2460
|
player.on('ads-ad-started', function (evt) {
|
|
2749
2461
|
var duration = player.ads.ad.duration;
|
|
2750
|
-
|
|
2462
|
+
player.ads.ad.id;
|
|
2751
2463
|
var adType = 'Bright Cove: ' + player.ads.ad.type;
|
|
2752
2464
|
|
|
2753
|
-
//
|
|
2465
|
+
//Beam.report_beam_ad('AD Started', deviceType, '', '', '', '', '', adType, duration, id)
|
|
2754
2466
|
Segment.report_ad_event('Video Ad Started', main_18, duration, adType, accountIDs.brightcove.playerId, accountIDs.brightcove.accountId);
|
|
2755
2467
|
});
|
|
2756
2468
|
|
|
2757
2469
|
// ad ended
|
|
2758
2470
|
player.on('ads-ad-ended', function (evt) {
|
|
2759
2471
|
var duration = player.ads.ad.duration;
|
|
2760
|
-
|
|
2472
|
+
player.ads.ad.id;
|
|
2761
2473
|
var adType = 'Bright Cove: ' + player.ads.ad.type;
|
|
2762
|
-
//
|
|
2474
|
+
//Beam.report_beam_ad('AD Ended', deviceType, '', '', '', '', '', adType, duration, id)
|
|
2763
2475
|
Segment.report_ad_event('Video Ad Ended', main_18, duration, adType, accountIDs.brightcove.playerId, accountIDs.brightcove.accountId);
|
|
2764
2476
|
});
|
|
2765
2477
|
};
|
|
@@ -2769,20 +2481,6 @@ var Video = function Video(_ref) {
|
|
|
2769
2481
|
return React__default.createElement(
|
|
2770
2482
|
'div',
|
|
2771
2483
|
null,
|
|
2772
|
-
isPollingTime ? React__default.createElement(PopupPollModal
|
|
2773
|
-
// eslint-disable-next-line react/jsx-indent-props
|
|
2774
|
-
, { pollItems: pollItems
|
|
2775
|
-
// eslint-disable-next-line react/jsx-indent-props
|
|
2776
|
-
, pollUrl: pollUrl
|
|
2777
|
-
// eslint-disable-next-line react/jsx-indent-props
|
|
2778
|
-
, isPollingTime: isPollingTime
|
|
2779
|
-
// eslint-disable-next-line react/jsx-indent-props
|
|
2780
|
-
, restartPlayer: restartPlayer
|
|
2781
|
-
// eslint-disable-next-line react/jsx-indent-props
|
|
2782
|
-
, textInputRender: textInputRender
|
|
2783
|
-
// eslint-disable-next-line react/jsx-indent-props
|
|
2784
|
-
, multiChoiceRender: multiChoiceRender
|
|
2785
|
-
}) : null,
|
|
2786
2484
|
React__default.createElement(ReactPlayerLoader, {
|
|
2787
2485
|
onSuccess: onVideoSuccess,
|
|
2788
2486
|
onFailure: onVideoFailure,
|
|
@@ -2824,7 +2522,6 @@ var Video = function Video(_ref) {
|
|
|
2824
2522
|
}
|
|
2825
2523
|
return null;
|
|
2826
2524
|
}
|
|
2827
|
-
|
|
2828
2525
|
if (source === 'mp4') {
|
|
2829
2526
|
return React__default.createElement(
|
|
2830
2527
|
'div',
|
|
@@ -7932,7 +7629,7 @@ var Poll$1 = function Poll(_ref) {
|
|
|
7932
7629
|
);
|
|
7933
7630
|
}),
|
|
7934
7631
|
React__default.createElement(
|
|
7935
|
-
Button
|
|
7632
|
+
Button,
|
|
7936
7633
|
{ disabled: !selectedChoice, type: 'submit' },
|
|
7937
7634
|
'Vote'
|
|
7938
7635
|
)
|
|
@@ -8109,7 +7806,7 @@ var Poll = function Poll(_ref) {
|
|
|
8109
7806
|
);
|
|
8110
7807
|
}),
|
|
8111
7808
|
React__default.createElement(
|
|
8112
|
-
Button
|
|
7809
|
+
Button,
|
|
8113
7810
|
{ disabled: !selectedChoice, type: 'submit' },
|
|
8114
7811
|
'Vote'
|
|
8115
7812
|
)
|
|
@@ -8422,7 +8119,7 @@ var Quiz = function Quiz(_ref) {
|
|
|
8422
8119
|
)
|
|
8423
8120
|
),
|
|
8424
8121
|
!showAnswer && React__default.createElement(
|
|
8425
|
-
Button,
|
|
8122
|
+
Button$1,
|
|
8426
8123
|
{ onClick: function onClick() {
|
|
8427
8124
|
return checkAnswers();
|
|
8428
8125
|
}, variant: 'info', block: true },
|
package/dist/esm/index.js
CHANGED
|
@@ -79,7 +79,7 @@ export { default as VerticalHero } from './VerticalHero.js';
|
|
|
79
79
|
export { default as YahooHero } from './YahooHero.js';
|
|
80
80
|
export { default as GridHero } from './GridHero.js';
|
|
81
81
|
export { default as ConferenceArticleCard } from './ConferenceArticleCard.js';
|
|
82
|
-
export { g as getSerializers } from './index-
|
|
82
|
+
export { g as getSerializers } from './index-4d8a8743.js';
|
|
83
83
|
export { default as Beam } from './Beam.js';
|
|
84
84
|
export { default as Segment } from './Segment.js';
|
|
85
85
|
export { default as KMTracker } from './KMTracker.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mjhls/mjh-framework",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.920",
|
|
4
4
|
"description": "Foundation Framework",
|
|
5
5
|
"author": "mjh-framework",
|
|
6
6
|
"license": "MIT",
|
|
@@ -99,7 +99,6 @@
|
|
|
99
99
|
"js-cookie": "^2.2.1",
|
|
100
100
|
"next-auth": "^3.2.0",
|
|
101
101
|
"next-cookies": "^2.0.3",
|
|
102
|
-
"node-fetch": "^2.6.1",
|
|
103
102
|
"nookies": "^2.4.0",
|
|
104
103
|
"react-cookies": "^0.1.1",
|
|
105
104
|
"react-facebook": "^8.1.4",
|