@openeventkit/event-site 2.0.59 → 2.0.60
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/gatsby-ssr.js
CHANGED
|
@@ -31,4 +31,6 @@ global.window.matchMedia = () => ({
|
|
|
31
31
|
addListener: () => {},
|
|
32
32
|
removeListener: () => {}
|
|
33
33
|
});
|
|
34
|
-
global.
|
|
34
|
+
global.window.window.requestAnimationFrame = () => {};
|
|
35
|
+
global.window.window.cancelAnimationFrame = () => {};
|
|
36
|
+
global.XMLHttpRequest = XMLHttpRequest;
|
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React, { useState, useRef } from 'react'
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import MuxPlayer from '@mux/mux-player-react';
|
|
4
|
-
import Swal from 'sweetalert2';
|
|
5
|
-
|
|
6
3
|
import { getEnvVariable, MUX_ENV_KEY } from '../utils/envVariables'
|
|
7
4
|
import { getMUXPlaybackId } from '../utils/videoUtils';
|
|
5
|
+
import Swal from 'sweetalert2';
|
|
6
|
+
// lazy load bc otherwise SSR breaks
|
|
7
|
+
// @see https://www.gatsbyjs.com/docs/using-client-side-only-packages/
|
|
8
|
+
const MuxPlayer = React.lazy(() => import('@mux/mux-player-react'));
|
|
8
9
|
|
|
9
10
|
const VideoMUXPlayer = ({ title, namespace, videoSrc, streamType, tokens, autoPlay, ...muxOptions }) => {
|
|
10
11
|
|
|
@@ -23,27 +24,35 @@ const VideoMUXPlayer = ({ title, namespace, videoSrc, streamType, tokens, autoPl
|
|
|
23
24
|
storyboard: tokens?.storyboard_token,
|
|
24
25
|
}} : {}
|
|
25
26
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
27
|
+
const isSSR = typeof window === "undefined"
|
|
28
|
+
return (
|
|
29
|
+
<>
|
|
30
|
+
{!isSSR && (
|
|
31
|
+
<React.Suspense fallback={<></>}>
|
|
32
|
+
<MuxPlayer
|
|
33
|
+
ref={playerRef}
|
|
34
|
+
streamType={streamType}
|
|
35
|
+
envKey={getEnvVariable(MUX_ENV_KEY)}
|
|
36
|
+
playbackId={getMUXPlaybackId(videoSrc)}
|
|
37
|
+
onError={(err) => {
|
|
38
|
+
Swal.fire('Error', 'This video stream will begin momentarily. Please standby.', "warning");
|
|
39
|
+
console.log(err);
|
|
40
|
+
}}
|
|
41
|
+
onEnded={handleVideoEnded}
|
|
42
|
+
autoPlay={isPlaying}
|
|
43
|
+
metadata={{
|
|
44
|
+
video_title: {title},
|
|
45
|
+
sub_property_id: {namespace},
|
|
46
|
+
}}
|
|
47
|
+
style={{aspectRatio: 16 / 9}}
|
|
48
|
+
{...secureProps}
|
|
49
|
+
{...muxOptions}
|
|
50
|
+
/>
|
|
51
|
+
</React.Suspense>
|
|
52
|
+
)}
|
|
53
|
+
</>
|
|
54
|
+
);
|
|
55
|
+
|
|
47
56
|
}
|
|
48
57
|
|
|
49
58
|
VideoMUXPlayer.propTypes = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"widgets":{"chat":{"enabled":
|
|
1
|
+
{"widgets":{"chat":{"enabled":true,"showQA":false,"showHelp":false,"defaultScope":"page"},"schedule":{"allowClick":true}},"favicons":{"favicon180":"/img/favicon.png","favicon32":"/img/favicon.png","favicon16":"/img/favicon.png"},"staticJsonFilesBuildTime":[{"file":"src/data/summit.json","build_time":1694051984256},{"file":"src/data/events.json","build_time":1694051986915},{"file":"src/data/events.idx.json","build_time":1694051986920},{"file":"src/data/speakers.json","build_time":1694051987917},{"file":"src/data/speakers.idx.json","build_time":1694051987917},{"file":"src/content/sponsors.json","build_time":1694051991031},{"file":"src/data/voteable-presentations.json","build_time":1694051992928}],"lastBuild":1694051992929}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"id":228,"created":1691602669,"last_edited":1691602669,"order":1,"summit_id":49,"is_published":
|
|
1
|
+
[{"id":228,"created":1691602669,"last_edited":1691602669,"order":1,"summit_id":49,"is_published":true,"side_image":null,"header_image":null,"header_image_mobile":null,"carousel_advertise_image":null,"marquee":"","intro":"","external_link":"","video_link":"","chat_link":"","featured_event_id":0,"header_image_alt_text":"","side_image_alt_text":"","header_image_mobile_alt_text":"","carousel_advertise_image_alt_text":"","show_logo_in_event_page":true,"members":[90654,90670],"company":{"id":3,"created":1580138376,"last_edited":1580138376,"name":"Tipit , LLC","url":null,"display_on_site":false,"featured":false,"city":null,"state":null,"country":null,"description":null,"industry":null,"contributions":null,"contact_email":null,"member_level":"None","admin_email":null,"overview":null,"products":null,"commitment":null,"commitment_author":null,"logo":null,"big_logo":null,"color":"#f0f0ee","sponsorships":[616],"project_sponsorships":[]},"sponsorship":{"id":2048,"widget_title":"","lobby_template":null,"expo_hall_template":null,"sponsor_page_template":null,"event_page_template":null,"sponsor_page_use_disqus_widget":false,"sponsor_page_use_live_event_widget":false,"sponsor_page_use_schedule_widget":false,"sponsor_page_use_banner_widget":false,"badge_image":null,"badge_image_alt_text":"","summit_id":49,"order":1,"should_display_on_expo_hall_page":false,"should_display_on_lobby_page":false,"type":{"id":3,"created":1579890943,"last_edited":1579890943,"name":"Gold","label":"not sure??","order":3,"size":"Medium"}},"ads":[],"materials":[],"social_networks":[{"id":2,"created":1694011600,"last_edited":1694011600,"sponsor_id":228,"link":"https://twhitter.com","icon_css_class":"new-icon","is_enabled":true}]}]
|