@openeventkit/event-site 2.0.122 → 2.0.123
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/package.json +2 -2
- package/src/actions/event-actions.js +1 -10
- package/src/components/SyncWordsPlayer.js +58 -0
- package/src/components/VideoComponent.js +12 -3
- package/src/components/summit-my-orders-tickets/components/TicketPopup/TicketPopupEditDetailsForm/TicketPopupEditDetailsForm.js +5 -0
- package/src/styles/full-profile.module.scss +3 -0
- package/src/styles/video.module.scss +21 -1
- package/src/templates/full-profile-page.js +16 -8
- package/src/utils/videoUtils.js +18 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openeventkit/event-site",
|
|
3
3
|
"description": "Event Site",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.123",
|
|
5
5
|
"author": "Tipit LLC",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@fortawesome/fontawesome-svg-core": "^6.5.2",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"@vimeo/player": "^2.16.3",
|
|
29
29
|
"ably": "^1.2.34",
|
|
30
30
|
"assert": "^2.1.0",
|
|
31
|
-
"attendee-to-attendee-widget": "3.1.1-beta.
|
|
31
|
+
"attendee-to-attendee-widget": "3.1.1-beta.32",
|
|
32
32
|
"autoprefixer": "10.4.14",
|
|
33
33
|
"awesome-bootstrap-checkbox": "^1.0.1",
|
|
34
34
|
"axios": "^0.19.2",
|
|
@@ -29,23 +29,14 @@ export const setEventLastUpdate = (lastUpdate) => (dispatch) => {
|
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
31
|
* @param eventId
|
|
32
|
-
* @param checkLocal
|
|
33
32
|
* @returns {(function(*, *): Promise<*>)|*}
|
|
34
33
|
*/
|
|
35
34
|
export const getEventById = (
|
|
36
35
|
eventId
|
|
37
|
-
) => async (dispatch
|
|
36
|
+
) => async (dispatch) => {
|
|
38
37
|
|
|
39
38
|
dispatch(startLoading());
|
|
40
|
-
// if we have it on the reducer , provide that first
|
|
41
|
-
let {allSchedulesState: {allEvents}} = getState();
|
|
42
|
-
const event = allEvents.find(ev => ev.id === parseInt(eventId));
|
|
43
|
-
|
|
44
|
-
if (event) {
|
|
45
|
-
dispatch(createAction(GET_EVENT_DATA)({event}));
|
|
46
|
-
}
|
|
47
39
|
|
|
48
|
-
// then refresh from api
|
|
49
40
|
let accessToken;
|
|
50
41
|
try {
|
|
51
42
|
accessToken = await getAccessToken();
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import {getSynchWordsVideoFrameDdFromSrc} from "../utils/videoUtils";
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class SynchWordsPlayer extends React.Component {
|
|
7
|
+
|
|
8
|
+
constructor(props) {
|
|
9
|
+
super(props);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
componentDidMount() {
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
componentWillUnmount() {
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
render() {
|
|
19
|
+
const { video, className, autoplay } = this.props;
|
|
20
|
+
const id = getSynchWordsVideoFrameDdFromSrc(video);
|
|
21
|
+
console.log(`SynchWordsPlayer::render with id ${id}`);
|
|
22
|
+
let allow = "encrypted-media";
|
|
23
|
+
if(autoplay) allow = allow +';autoplay'
|
|
24
|
+
return (
|
|
25
|
+
<div className={className}>
|
|
26
|
+
<iframe id={id}
|
|
27
|
+
src={video}
|
|
28
|
+
frameBorder="0"
|
|
29
|
+
scrolling="no"
|
|
30
|
+
allow={allow}
|
|
31
|
+
allowFullScreen webkitallowfullscreen mozallowfullscreen oallowfullscreen msallowfullscreen
|
|
32
|
+
>
|
|
33
|
+
</iframe>
|
|
34
|
+
</div>
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
SynchWordsPlayer.propTypes = {
|
|
40
|
+
/**
|
|
41
|
+
* a video URL.
|
|
42
|
+
*/
|
|
43
|
+
video: PropTypes.oneOfType([
|
|
44
|
+
PropTypes.number,
|
|
45
|
+
PropTypes.string,
|
|
46
|
+
]),
|
|
47
|
+
/**
|
|
48
|
+
* CSS className for the player element.
|
|
49
|
+
*/
|
|
50
|
+
className: PropTypes.string,
|
|
51
|
+
/**
|
|
52
|
+
* Automatically start playback of the video. Note that this won’t work on
|
|
53
|
+
* some devices.
|
|
54
|
+
*/
|
|
55
|
+
autoplay: PropTypes.bool,
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
export default SynchWordsPlayer;
|
|
@@ -4,7 +4,8 @@ import VideoJSPlayer from './VideoJSPlayer';
|
|
|
4
4
|
import VimeoPlayer from "./VimeoPlayer";
|
|
5
5
|
import VideoMUXPlayer from './VideoMUXPlayer';
|
|
6
6
|
import styles from '../styles/video.module.scss';
|
|
7
|
-
import { isMuxVideo, isVimeoVideo, isYouTubeVideo } from '../utils/videoUtils';
|
|
7
|
+
import { isMuxVideo, isVimeoVideo, isYouTubeVideo, isSynchWordsVideo } from '../utils/videoUtils';
|
|
8
|
+
import SynchWordsPlayer from "./SyncWordsPlayer";
|
|
8
9
|
|
|
9
10
|
/**
|
|
10
11
|
* @param url
|
|
@@ -48,6 +49,14 @@ const VideoComponent = ({ url, title, namespace, isLive, firstHalf, autoPlay, st
|
|
|
48
49
|
/>
|
|
49
50
|
);
|
|
50
51
|
};
|
|
52
|
+
// synch words player
|
|
53
|
+
if(isSynchWordsVideo(url)){
|
|
54
|
+
return (<SynchWordsPlayer
|
|
55
|
+
video={url}
|
|
56
|
+
autoplay={autoPlay}
|
|
57
|
+
className={styles.synchWordsPlayer}
|
|
58
|
+
/>);
|
|
59
|
+
}
|
|
51
60
|
|
|
52
61
|
const defaultVideoJsOptions = isYouTubeVideo(url) ? {
|
|
53
62
|
techOrder: ["youtube"],
|
|
@@ -99,7 +108,7 @@ VideoComponent.propTypes = {
|
|
|
99
108
|
isLive: PropTypes.bool,
|
|
100
109
|
firstHalf: PropTypes.bool,
|
|
101
110
|
autoPlay: PropTypes.bool,
|
|
102
|
-
start: PropTypes.number,
|
|
111
|
+
start: PropTypes.number,
|
|
103
112
|
tokens: PropTypes.object,
|
|
104
113
|
onError: PropTypes.func,
|
|
105
114
|
};
|
|
@@ -108,7 +117,7 @@ VideoComponent.defaultProps = {
|
|
|
108
117
|
title: '',
|
|
109
118
|
namespace: '',
|
|
110
119
|
firstHalf: true,
|
|
111
|
-
autoPlay: false,
|
|
120
|
+
autoPlay: false,
|
|
112
121
|
tokens: null,
|
|
113
122
|
};
|
|
114
123
|
|
|
@@ -319,6 +319,11 @@ export const TicketPopupEditDetailsForm = ({
|
|
|
319
319
|
onBlur={formik.handleBlur}
|
|
320
320
|
onChange={!!initialValues[TicketKeys.company].name ? noop : formik.handleChange}
|
|
321
321
|
disabled={!!initialValues[TicketKeys.company].name}
|
|
322
|
+
menuPortalTarget={document.body}
|
|
323
|
+
menuPosition="fixed"
|
|
324
|
+
styles={{
|
|
325
|
+
menuPortal: (base) => ({ ...base, zIndex: 9999 }),
|
|
326
|
+
}}
|
|
322
327
|
tabSelectsValue={false}
|
|
323
328
|
/>
|
|
324
329
|
{(formik.touched[TicketKeys.company] || triedSubmitting) && formik.errors[TicketKeys.company] &&
|
|
@@ -16,4 +16,24 @@
|
|
|
16
16
|
width: 100%;
|
|
17
17
|
height: 100%;
|
|
18
18
|
}
|
|
19
|
-
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.synchWordsPlayer{
|
|
22
|
+
/* 16:9 */
|
|
23
|
+
--video--width: 960;
|
|
24
|
+
--video--height: 540;
|
|
25
|
+
|
|
26
|
+
position: relative;
|
|
27
|
+
padding-bottom: calc(var(--video--height) / var(--video--width) * 100%); /* 56.25% */
|
|
28
|
+
overflow: hidden;
|
|
29
|
+
max-width: 100%;
|
|
30
|
+
background: black;
|
|
31
|
+
|
|
32
|
+
iframe, object, embed{
|
|
33
|
+
position: absolute;
|
|
34
|
+
top: 0;
|
|
35
|
+
left: 0;
|
|
36
|
+
width: 100%;
|
|
37
|
+
height: 100%;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -440,42 +440,50 @@ export const FullProfilePageTemplate = ({ user, getIDPProfile, updateProfile, up
|
|
|
440
440
|
</div>
|
|
441
441
|
</div>
|
|
442
442
|
</div>
|
|
443
|
+
<div className={`columns is-mobile`}>
|
|
444
|
+
<div className={`column is-full`}>
|
|
445
|
+
<span>
|
|
446
|
+
By electing to show your information you are indicating that other attendees at the
|
|
447
|
+
event(s) you are registered for will be able to see this information.
|
|
448
|
+
</span>
|
|
449
|
+
</div>
|
|
450
|
+
</div>
|
|
443
451
|
<div className={`columns is-mobile`}>
|
|
444
452
|
<div className={`column is-half`}>
|
|
445
453
|
<label className={styles.checkbox}>
|
|
446
454
|
<input type="checkbox" checked={showFullName} onChange={e => setShowFullName(e.target.checked)} />
|
|
447
|
-
Show full name
|
|
455
|
+
Show full name (first name is always shown)
|
|
448
456
|
</label>
|
|
449
457
|
<br />
|
|
450
458
|
<label className={styles.checkbox}>
|
|
451
459
|
<input type="checkbox" checked={showEmail} onChange={e => setShowEmail(e.target.checked)} />
|
|
452
|
-
Show email
|
|
460
|
+
Show email
|
|
453
461
|
</label>
|
|
454
462
|
<br />
|
|
455
463
|
<label className={styles.checkbox}>
|
|
456
464
|
<input type="checkbox" checked={showTelephone} onChange={e => setShowTelephone(e.target.checked)} />
|
|
457
|
-
Show telephone number
|
|
465
|
+
Show telephone number
|
|
458
466
|
</label>
|
|
459
467
|
<br />
|
|
460
468
|
<label className={styles.checkbox}>
|
|
461
469
|
<input type="checkbox" checked={allowChatWithMe} onChange={e => setAllowChatWithMe(e.target.checked)} />
|
|
462
|
-
Allow people to chat with me
|
|
470
|
+
Allow people to chat with me
|
|
463
471
|
</label>
|
|
464
472
|
</div>
|
|
465
473
|
<div className={`column is-half`}>
|
|
466
474
|
<label className={styles.checkbox}>
|
|
467
475
|
<input type="checkbox" checked={showPicture} onChange={e => setShowPicture(e.target.checked)} />
|
|
468
|
-
Show picture
|
|
476
|
+
Show picture
|
|
469
477
|
</label>
|
|
470
478
|
<br />
|
|
471
479
|
<label className={styles.checkbox}>
|
|
472
480
|
<input type="checkbox" checked={showBio} onChange={e => setShowBio(e.target.checked)} />
|
|
473
|
-
Show bio
|
|
481
|
+
Show bio
|
|
474
482
|
</label>
|
|
475
483
|
<br />
|
|
476
484
|
<label className={styles.checkbox}>
|
|
477
485
|
<input type="checkbox" checked={showSocialMedia} onChange={e => setShowSocialMedia(e.target.checked)} />
|
|
478
|
-
Show social media info
|
|
486
|
+
Show social media info
|
|
479
487
|
</label>
|
|
480
488
|
</div>
|
|
481
489
|
</div>
|
|
@@ -644,7 +652,7 @@ export const FullProfilePageTemplate = ({ user, getIDPProfile, updateProfile, up
|
|
|
644
652
|
closePopup={() => handleTogglePopup(!showProfile)}
|
|
645
653
|
/>
|
|
646
654
|
}
|
|
647
|
-
<AccessTracker/>
|
|
655
|
+
<AccessTracker />
|
|
648
656
|
</React.Fragment>
|
|
649
657
|
)
|
|
650
658
|
};
|
package/src/utils/videoUtils.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
const IS_MUX_VIDEO_REGEX = /https:\/\/stream.mux.com\/(.*).m3u8/;
|
|
2
|
+
const IS_SYNC_WORDS_VIDEO_REGEX = /https:\/\/player.syncwords.com\/iframe\/live\/(.*)\/(.*)/g;
|
|
2
3
|
|
|
3
4
|
export const getMUXPlaybackId = (url) => {
|
|
4
5
|
if(!url) return null;
|
|
@@ -25,3 +26,20 @@ export const isMuxVideo = (url) => {
|
|
|
25
26
|
if(!url) return false;
|
|
26
27
|
return url.match(IS_MUX_VIDEO_REGEX)
|
|
27
28
|
}
|
|
29
|
+
|
|
30
|
+
export const isSynchWordsVideo = (url) => {
|
|
31
|
+
if(!url) return false;
|
|
32
|
+
return url.match(IS_SYNC_WORDS_VIDEO_REGEX);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* @param src
|
|
37
|
+
* @returns {string|null}
|
|
38
|
+
*/
|
|
39
|
+
export const getSynchWordsVideoFrameDdFromSrc = (src) => {
|
|
40
|
+
const m = [...src.matchAll(IS_SYNC_WORDS_VIDEO_REGEX)];
|
|
41
|
+
if(!m?.length) return null;
|
|
42
|
+
const parts = m[0];
|
|
43
|
+
if(parts.length < 3) return null;
|
|
44
|
+
return `${parts[1]}-live-${parts[2]}`;
|
|
45
|
+
}
|