@openeventkit/event-site 2.0.133 → 2.0.135

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-node.js CHANGED
@@ -94,14 +94,41 @@ const SSR_getEvents = async (baseUrl, summitId, accessToken) => {
94
94
 
95
95
  const speakers_fields = ['id', 'first_name', 'last_name', 'title', 'bio','member_id','pic', 'big_pic', 'company'];
96
96
  const current_attendance_fields = ['member_first_name', 'member_last_name', 'member_pic'];
97
-
97
+ const first_level_fields = [
98
+ "id",
99
+ "created",
100
+ "last_edited",
101
+ "title",
102
+ "description",
103
+ "social_description",
104
+ "start_date",
105
+ "end_date",
106
+ "location_id",
107
+ "class_name",
108
+ "allow_feedback",
109
+ "avg_feedback_rate",
110
+ "published_date",
111
+ "head_count",
112
+ "attendance_count",
113
+ "current_attendance_count",
114
+ "image",
115
+ "level" ,
116
+ "show_sponsors",
117
+ "duration",
118
+ "moderator_speaker_id",
119
+ "problem_addressed",
120
+ "attendees_expected_learnt",
121
+ "to_record",
122
+ "attending_media",
123
+ ];
124
+ const fields = `${first_level_fields.join(",")},speakers.${speakers_fields.join(",speakers.")},current_attendance.${current_attendance_fields.join(',current_attendance.')}`;
98
125
  const params = {
99
126
  access_token: accessToken,
100
127
  per_page: 50,
101
128
  page: 1,
102
129
  expand: 'slides,links,videos,media_uploads,type,track,track.subtracks,track.allowed_access_levels,location,location.venue,location.floor,speakers,moderator,sponsors,groups,rsvp_template,tags,current_attendance',
103
130
  relations: 'speakers.badge_features,speakers.affiliations,speakers.languages,speakers.other_presentation_links,speakers.areas_of_expertise,speakers.travel_preferences,speakers.organizational_roles,speakers.all_presentations,speakers.all_moderated_presentations',
104
- fields: `speakers.${speakers_fields.join(",speakers.")},current_attendance.${current_attendance_fields.join(',current_attendance.')}`,
131
+ fields: fields,
105
132
  }
106
133
 
107
134
  return await axios.get(endpoint, { params }).then(async ({data}) => {
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.133",
4
+ "version": "2.0.135",
5
5
  "author": "Tipit LLC",
6
6
  "dependencies": {
7
7
  "@fortawesome/fontawesome-svg-core": "^6.5.2",
@@ -2,4 +2,4 @@ export const GET_EVENT_DATA = 'GET_EVENT_DATA';
2
2
  export const GET_EVENT_DATA_ERROR = 'GET_EVENT_DATA_ERROR';
3
3
  export const SET_EVENT_LAST_UPDATE = 'SET_EVENT_LAST_UPDATE';
4
4
  export const RELOAD_EVENT_STATE = 'RELOAD_EVENT_STATE';
5
- export const GET_EVENT_TOKENS='GET_EVENT_TOKENS';
5
+ export const GET_EVENT_STREAMING_INFO='GET_EVENT_STREAMING_INFO';
@@ -15,7 +15,7 @@ import {LOGOUT_USER} from "openstack-uicore-foundation/lib/security/actions";
15
15
  import {
16
16
  GET_EVENT_DATA,
17
17
  GET_EVENT_DATA_ERROR,
18
- GET_EVENT_TOKENS,
18
+ GET_EVENT_STREAMING_INFO,
19
19
  SET_EVENT_LAST_UPDATE,
20
20
  } from './event-actions-definitions';
21
21
 
@@ -86,7 +86,7 @@ export const getEventById = (
86
86
  * @param checkLocal
87
87
  * @returns {(function(*, *): Promise<*>)|*}
88
88
  */
89
- export const getEventTokensById = (
89
+ export const getEventStreamingInfoById = (
90
90
  eventId
91
91
  ) => async (dispatch) => {
92
92
 
@@ -104,8 +104,8 @@ export const getEventTokensById = (
104
104
 
105
105
  return getRequest(
106
106
  null,
107
- createAction(GET_EVENT_TOKENS),
108
- `${window.SUMMIT_API_BASE_URL}/api/v1/summits/${window.SUMMIT_ID}/events/${eventId}/published/tokens`,
107
+ createAction(GET_EVENT_STREAMING_INFO),
108
+ `${window.SUMMIT_API_BASE_URL}/api/v1/summits/${window.SUMMIT_ID}/events/${eventId}/published/streaming-info`,
109
109
  customErrorHandler,
110
110
  {},
111
111
  true)
@@ -6,7 +6,6 @@ import URI from "urijs";
6
6
  * @param accessToken
7
7
  * @returns {Promise<Response>}
8
8
  */
9
-
10
9
  export const fetchEventById = async (summitId, eventId, accessToken = null) => {
11
10
 
12
11
  let apiUrl = URI(`${process.env.GATSBY_SUMMIT_API_BASE_URL}/api/public/v1/summits/${summitId}/events/${eventId}/published`);
@@ -17,11 +16,55 @@ export const fetchEventById = async (summitId, eventId, accessToken = null) => {
17
16
 
18
17
  const speakers_fields = ['id', 'first_name', 'last_name', 'title', 'bio','member_id','pic', 'big_pic', 'company'];
19
18
  const current_attendance_fields = ['member_first_name', 'member_last_name', 'member_pic'];
20
-
19
+ const first_level_fields = [
20
+ "id",
21
+ "created",
22
+ "last_edited",
23
+ "title",
24
+ "description",
25
+ "social_description",
26
+ "start_date",
27
+ "end_date",
28
+ "location_id",
29
+ "class_name",
30
+ "allow_feedback",
31
+ "avg_feedback_rate",
32
+ "published_date",
33
+ "head_count",
34
+ "attendance_count",
35
+ "current_attendance_count",
36
+ "image",
37
+ "level" ,
38
+ "show_sponsors",
39
+ "duration",
40
+ "moderator_speaker_id",
41
+ "problem_addressed",
42
+ "attendees_expected_learnt",
43
+ "to_record",
44
+ "attending_media",
45
+ ];
21
46
  apiUrl.addQuery('expand', 'slides, links, videos, media_uploads, type, track, track.allowed_access_levels, location, location.venue, location.floor, speakers, moderator, sponsors, current_attendance, groups, rsvp_template, tags');
22
- apiUrl.addQuery('evict_cache', 1);
23
47
  apiUrl.addQuery('relations', "speakers.badge_features,speakers.affiliations,speakers.languages,speakers.other_presentation_links,speakers.areas_of_expertise,speakers.travel_preferences,speakers.organizational_roles,speakers.all_presentations,speakers.all_moderated_presentations");
24
- apiUrl.addQuery('fields', `speakers.${speakers_fields.join(",speakers.")},current_attendance.${current_attendance_fields.join(',current_attendance.')}`);
48
+ apiUrl.addQuery('fields', `${first_level_fields.join(",")},speakers.${speakers_fields.join(",speakers.")},current_attendance.${current_attendance_fields.join(',current_attendance.')}`);
49
+ return fetch(apiUrl.toString(), {
50
+ method: 'GET'
51
+ }).then(async (response) => {
52
+ if (response.status === 200) {
53
+ return await response.json();
54
+ }
55
+ return null;
56
+ });
57
+ }
58
+
59
+ /**
60
+ * @param summitId
61
+ * @param eventId
62
+ * @param accessToken
63
+ * @returns {Promise<Response>}
64
+ */
65
+ export const fetchStreamingInfoByEventId = async (summitId, eventId, accessToken) => {
66
+ const apiUrl = URI(`${process.env.GATSBY_SUMMIT_API_BASE_URL}/api/v1/summits/${summitId}/events/${eventId}/published/streaming-info`);
67
+ apiUrl.addQuery('access_token', accessToken);
25
68
  return fetch(apiUrl.toString(), {
26
69
  method: 'GET'
27
70
  }).then(async (response) => {
@@ -46,7 +89,6 @@ export const fetchEventTypeById = async (summitId, eventTypeId, accessToken = nu
46
89
  apiUrl.addQuery('access_token', accessToken);
47
90
  }
48
91
 
49
- apiUrl.addQuery('evict_cache', 1);
50
92
  return fetch(apiUrl.toString(), {
51
93
  method: 'GET'
52
94
  }).then(async (response) => {
@@ -76,8 +118,6 @@ export const fetchLocationById = async(summitId, locationId, expand, accessToken
76
118
  if(expand)
77
119
  apiUrl.addQuery('expand', expand);
78
120
 
79
- apiUrl.addQuery('evict_cache', 1);
80
-
81
121
  return fetch(apiUrl.toString(), {
82
122
  method: 'GET'
83
123
  }).then(async (response) => {
@@ -119,7 +159,6 @@ export const fetchSpeakerById = async(summitId, speakerId, accessToken = null) =
119
159
  const speakers_fields =
120
160
  ['id', 'first_name', 'last_name', 'title', 'bio','member_id','pic', 'big_pic', 'company'];
121
161
 
122
- apiUrl.addQuery('evict_cache', 1);
123
162
  apiUrl.addQuery('relations', speakers_relations.join(','));
124
163
  apiUrl.addQuery('fields', speakers_fields.join(','));
125
164
 
@@ -27,7 +27,7 @@ const FullSchedule = ({
27
27
  ...rest
28
28
  }) => {
29
29
  const { getSettingByKey } = useMarketingSettings();
30
- const defaultImage = getSettingByKey(MARKETING_SETTINGS_KEYS.schedultDefaultImage);
30
+ const defaultImage = getSettingByKey(MARKETING_SETTINGS_KEYS.scheduleDefaultImage);
31
31
  const summitLogoPrint = getSettingByKey(MARKETING_SETTINGS_KEYS.fullScheduleSummitLogoPrint);
32
32
  const componentProps = {
33
33
  title: "Schedule",
@@ -5,7 +5,7 @@ import {connect} from "react-redux";
5
5
  // these two libraries are client-side only
6
6
  import LiteSchedule from "lite-schedule-widget/dist";
7
7
  import "lite-schedule-widget/dist/index.css";
8
- // awesome-bootstrap-checkbox css dependency
8
+ // awesome-bootstrap-checkbox css dependency
9
9
  // https://cdnjs.cloudflare.com/ajax/libs/awesome-bootstrap-checkbox/1.0.2/awesome-bootstrap-checkbox.min.css
10
10
  // injected through HeadComponents
11
11
 
@@ -26,7 +26,7 @@ const LiteScheduleComponent = ({
26
26
  ...rest
27
27
  }) => {
28
28
  const { getSettingByKey } = useMarketingSettings();
29
- const defaultImage = getSettingByKey(MARKETING_SETTINGS_KEYS.schedultDefaultImage);
29
+ const defaultImage = getSettingByKey(MARKETING_SETTINGS_KEYS.scheduleDefaultImage);
30
30
  const scheduleState = schedules?.find( s => s.key === schedKey);
31
31
 
32
32
  const componentProps = {
@@ -5,7 +5,7 @@ import {connect} from "react-redux";
5
5
  // these two libraries are client-side only
6
6
  import LiveEventWidget from 'live-event-widget/dist/index.js';
7
7
  import 'live-event-widget/dist/index.css';
8
- // awesome-bootstrap-checkbox css dependency
8
+ // awesome-bootstrap-checkbox css dependency
9
9
  // https://cdnjs.cloudflare.com/ajax/libs/awesome-bootstrap-checkbox/1.0.2/awesome-bootstrap-checkbox.min.css
10
10
  // injected through HeadComponents
11
11
 
@@ -20,9 +20,8 @@ const LiveEventWidgetComponent = ({
20
20
  ...rest
21
21
  }) => {
22
22
  const { getSettingByKey } = useMarketingSettings();
23
- const defaultImage = getSettingByKey(MARKETING_SETTINGS_KEYS.schedultDefaultImage);
23
+ const defaultImage = getSettingByKey(MARKETING_SETTINGS_KEYS.scheduleDefaultImage);
24
24
  const scheduleState = schedules?.find( s => s.key === 'schedule-main');
25
-
26
25
  const widgetProps = {
27
26
  title: "",
28
27
  defaultImage: defaultImage,
@@ -5,7 +5,7 @@ import { connect } from "react-redux";
5
5
  // these two libraries are client-side only
6
6
  import UpcomingEvents from "upcoming-events-widget/dist";
7
7
  import "upcoming-events-widget/dist/index.css";
8
- // awesome-bootstrap-checkbox css dependency
8
+ // awesome-bootstrap-checkbox css dependency
9
9
  // https://cdnjs.cloudflare.com/ajax/libs/awesome-bootstrap-checkbox/1.0.2/awesome-bootstrap-checkbox.min.css
10
10
  // injected through HeadComponents
11
11
 
@@ -27,7 +27,7 @@ const UpcomingEventsComponent = ({
27
27
  }) => {
28
28
  const wrapperClass = page === "marketing-site" ? "schedule-container-marketing" : "schedule-container";
29
29
  const { getSettingByKey } = useMarketingSettings();
30
- const defaultImage = getSettingByKey(MARKETING_SETTINGS_KEYS.schedultDefaultImage);
30
+ const defaultImage = getSettingByKey(MARKETING_SETTINGS_KEYS.scheduleDefaultImage);
31
31
  const scheduleState = schedules?.find( s => s.key === 'schedule-main');
32
32
 
33
33
  const componentProps = {
@@ -1,50 +1 @@
1
- {
2
- "favicon": {
3
- "asset": "icon.png"
4
- },
5
- "widgets": {
6
- "chat": {
7
- "enabled": true,
8
- "showQA": false,
9
- "showHelp": false,
10
- "defaultScope": "page"
11
- },
12
- "schedule": {
13
- "allowClick": true
14
- }
15
- },
16
- "identityProviderButtons": [
17
- {
18
- "buttonColor": "#082238",
19
- "providerLabel": "Continue with FNid",
20
- "providerLogo": "logo_fn.svg",
21
- "providerLogoSize": 27
22
- },
23
- {
24
- "buttonColor": "#0A66C2",
25
- "providerLabel": "Sign in with LinkedIn",
26
- "providerParam": "linkedin",
27
- "providerLogo": "logo_linkedin.svg",
28
- "providerLogoSize": 18
29
- },
30
- {
31
- "buttonColor": "#000000",
32
- "providerLabel": "Sign in with Apple",
33
- "providerParam": "apple",
34
- "providerLogoSize": 17,
35
- "providerLogo": "logo_apple.svg"
36
- },
37
- {
38
- "buttonColor": "#1877F2",
39
- "providerLabel": "Login with Facebook",
40
- "providerParam": "facebook",
41
- "providerLogo": "logo_facebook.svg",
42
- "providerLogoSize": 20
43
- }
44
- ],
45
- "maintenanceMode": {
46
- "enabled": false,
47
- "title": "Site under maintenance",
48
- "subtitle": "Please reload page shortly"
49
- }
50
- }
1
+ {"favicon":{"asset":"icon.png"},"widgets":{"chat":{"enabled":true,"showQA":false,"showHelp":false,"defaultScope":"page"},"schedule":{"allowClick":true}},"identityProviderButtons":[{"buttonColor":"#082238","providerLabel":"Continue with FNid","providerLogo":"logo_fn.svg","providerLogoSize":27},{"buttonColor":"#0A66C2","providerLabel":"Sign in with LinkedIn","providerParam":"linkedin","providerLogo":"logo_linkedin.svg","providerLogoSize":18},{"buttonColor":"#000000","providerLabel":"Sign in with Apple","providerParam":"apple","providerLogoSize":17,"providerLogo":"logo_apple.svg"},{"buttonColor":"#1877F2","providerLabel":"Login with Facebook","providerParam":"facebook","providerLogo":"logo_facebook.svg","providerLogoSize":20}],"maintenanceMode":{"enabled":false,"title":"Site under maintenance","subtitle":"Please reload page shortly"},"staticJsonFilesBuildTime":[{"file":"src/data/summit.json","build_time":1728406685093},{"file":"src/data/events.json","build_time":1728406730917},{"file":"src/data/events.idx.json","build_time":1728406730973},{"file":"src/data/speakers.json","build_time":1728406741640},{"file":"src/data/speakers.idx.json","build_time":1728406741648},{"file":"src/content/sponsors.json","build_time":1728406744085},{"file":"src/data/voteable-presentations.json","build_time":1728406746669}],"lastBuild":1728406746670}
@@ -1,6 +1,6 @@
1
1
  import { START_LOADING, STOP_LOADING } from "openstack-uicore-foundation/lib/utils/actions";
2
2
  import { LOGOUT_USER } from "openstack-uicore-foundation/lib/security/actions";
3
- import {GET_EVENT_DATA, GET_EVENT_DATA_ERROR, RELOAD_EVENT_STATE, SET_EVENT_LAST_UPDATE, GET_EVENT_TOKENS} from "../actions/event-actions-definitions";
3
+ import {GET_EVENT_DATA, GET_EVENT_DATA_ERROR, RELOAD_EVENT_STATE, SET_EVENT_LAST_UPDATE, GET_EVENT_STREAMING_INFO} from "../actions/event-actions-definitions";
4
4
  import {RESET_STATE} from "../actions/base-actions-definitions";
5
5
 
6
6
  const DEFAULT_STATE = {
@@ -37,15 +37,17 @@ const eventReducer = (state = DEFAULT_STATE, action) => {
37
37
  }
38
38
  // reload event state
39
39
  case RELOAD_EVENT_STATE:{
40
- return {...state, loading:false, event: payload};
40
+ const { tokens: newTokens, ...rest } = payload;
41
+ const formerTokens = state.tokens;
42
+ return {...state, loading:false, event: {...rest}, tokens: newTokens || formerTokens};
41
43
  }
42
- case GET_EVENT_TOKENS:{
43
- const { tokens } = payload.response
44
- return {...state, tokens: tokens};
44
+ case GET_EVENT_STREAMING_INFO:{
45
+ const { tokens, ...rest } = payload.response
46
+ return {...state, tokens: tokens, event: { ...state.event, ...rest}};
45
47
  }
46
48
  default:
47
49
  return state;
48
50
  }
49
51
  };
50
52
 
51
- export default eventReducer;
53
+ export default eventReducer;
@@ -2,11 +2,11 @@ import React, {useEffect} from "react";
2
2
  import { connect } from "react-redux";
3
3
  import { isAuthorizedBadge } from "../utils/authorizedGroups";
4
4
  import HeroComponent from "../components/HeroComponent";
5
- import {getEventById, getEventTokensById} from "../actions/event-actions";
5
+ import {getEventById, getEventStreamingInfoById} from "../actions/event-actions";
6
6
  import { isMuxVideo } from "../utils/videoUtils";
7
7
  import {navigate} from "gatsby";
8
8
 
9
- const WithBadgeRoute = ({ children, location, eventId, event, loading, userProfile, hasTicket, isAuthorized, getEventById, getEventTokensById }) => {
9
+ const WithBadgeRoute = ({ children, location, eventId, event, loading, userProfile, hasTicket, isAuthorized, getEventById, getEventStreamingInfoById }) => {
10
10
  // if user is Authorized then bypass the badge checking
11
11
  const hasBadgeForEvent = isAuthorized || (eventId && userProfile && isAuthorizedBadge(event, userProfile.summit_tickets));
12
12
  const userIsAuthz = hasTicket || isAuthorized;
@@ -24,19 +24,17 @@ const WithBadgeRoute = ({ children, location, eventId, event, loading, userProfi
24
24
  useEffect(() => {
25
25
  if (event === null || parseInt(eventId) !== parseInt(event.id)) {
26
26
  getEventById(eventId).then((res) => {
27
- const { response, err } = res;
27
+ const { err } = res;
28
28
  // check error
29
29
  if(err && err?.status === 404){
30
30
  navigate('/a/schedule');
31
- }
32
- if(response && response?.stream_is_secure && isMuxVideo(response?.streaming_url)){
33
- getEventTokensById(eventId)
34
- }
31
+ }
32
+ getEventStreamingInfoById(eventId)
35
33
  }).catch(err => {
36
34
  console.log(err);
37
35
  });
38
36
  }
39
- }, [eventId, getEventById, event, getEventTokensById]);
37
+ }, [eventId, getEventById, event, getEventStreamingInfoById]);
40
38
 
41
39
  if (loading || needsToLoadEvent) {
42
40
  return <HeroComponent title="Loading event" />;
@@ -57,4 +55,4 @@ const mapStateToProps = ({ userState, eventState }) => ({
57
55
  loading: eventState.loading,
58
56
  });
59
57
 
60
- export default connect(mapStateToProps, {getEventById, getEventTokensById})(WithBadgeRoute);
58
+ export default connect(mapStateToProps, {getEventById, getEventStreamingInfoById})(WithBadgeRoute);
@@ -1,19 +1,13 @@
1
- /**
2
- * Warning:
3
- * Dont edit this file by hand, has been generated by colors scss util
4
- * Uses default colors as base and then overriden by colors set via marketing
5
- **/
6
-
7
- $color_accent: #ff5e32;
1
+ $color_accent: #00A2FF;
8
2
  $color_alerts: #ff0000;
9
3
  $color_background_light: #ffffff;
10
4
  $color_background_dark: #000000;
11
5
  $color_button_background_color: #ffffff;
12
6
  $color_button_color: #000000;
13
- $color_gray_lighter: #F2F2F2;
14
- $color_gray_light: #DFDFDF;
7
+ $color_gray_lighter: #f2f2f2;
8
+ $color_gray_light: #dfdfdf;
15
9
  $color_gray_dark: #999999;
16
- $color_gray_darker: #4A4A4A;
10
+ $color_gray_darker: #4a4a4a;
17
11
  $color_horizontal_rule_light: #e5e5e5;
18
12
  $color_horizontal_rule_dark: #7b7b7b;
19
13
  $color_icon_light: #ffffff;
@@ -25,16 +19,16 @@ $color_input_text_color_light: #363636;
25
19
  $color_input_text_color_dark: #ffffff;
26
20
  $color_input_text_color_disabled_light: #ffffff;
27
21
  $color_input_text_color_disabled_dark: #ffffff;
28
- $color_primary: #6d6e71;
29
- $color_primary_contrast: #f1f2f2;
30
- $color_secondary: #00CEC4;
31
- $color_secondary_contrast: #ff5e32;
22
+ $color_primary: #000000;
23
+ $color_primary_contrast: #FFFFFF;
24
+ $color_secondary: #00A2FF;
25
+ $color_secondary_contrast: #181818;
32
26
  $color_text_light: #ffffff;
33
27
  $color_text_med: #828282;
34
- $color_text_dark: #333333;
28
+ $color_text_dark: #000000;
35
29
  $color_text_input_hints_light: #7b7b7b;
36
30
  $color_text_input_hints_dark: #7b7b7b;
37
- $color_text_input_hints: #c4c4c4;
31
+ $color_text_input_hints: #131313;
38
32
 
39
33
  :root {
40
34
  --color_primary: #{$color_primary};
@@ -19,7 +19,7 @@ import AccessTracker, {AttendeesWidget} from "../components/AttendeeToAttendeeWi
19
19
  import AttendanceTrackerComponent from "../components/AttendanceTrackerComponent";
20
20
  import EventFeedbackComponent from "../components/EventFeedbackComponent"
21
21
  import {PHASES} from "../utils/phasesUtils";
22
- import { getEventById, getEventTokensById } from "../actions/event-actions";
22
+ import { getEventById, getEventStreamingInfoById } from "../actions/event-actions";
23
23
  import URI from "urijs";
24
24
  import useMarketingSettings, { MARKETING_SETTINGS_KEYS } from "@utils/useMarketingSettings";
25
25
  import { checkMuxTokens, isMuxVideo } from "../utils/videoUtils";
@@ -61,30 +61,20 @@ export const EventPageTemplate = class extends React.Component {
61
61
  const {eventId: prevEventId} = prevProps;
62
62
  // event id could come as param at uri
63
63
  if (parseInt(eventId) !== parseInt(prevEventId) || parseInt(event?.id) !== parseInt(eventId)) {
64
- this.props.getEventById(eventId).then((res) => {
65
- const { response } = res;
66
- if(response && response?.stream_is_secure && isMuxVideo(response?.streaming_url)) // todo check
67
- this.props.getEventTokensById(eventId)
68
- });
64
+ this.props.getEventById(eventId).then(() => this.props.getEventStreamingInfoById(eventId));
69
65
  }
70
66
  }
71
67
 
72
68
  componentDidMount() {
73
69
  const {eventId, event } = this.props;
74
70
  if (parseInt(event?.id) !== parseInt(eventId)) {
75
- this.props.getEventById(eventId).then((res) => {
76
- const { response } = res;
77
- if(response && response?.stream_is_secure && isMuxVideo(response?.streaming_url))
78
- this.props.getEventTokensById(eventId)
79
- });
71
+ this.props.getEventById(eventId).then(() => this.props.getEventStreamingInfoById(eventId));
80
72
  }
81
73
  }
82
74
 
83
75
  onError(err){
84
- const { event, getEventTokensById } = this.props;
85
- if(event?.stream_is_secure && isMuxVideo(event?.streaming_url) ){
86
- getEventTokensById(event.id)
87
- }
76
+ const { event, getEventStreamingInfoById } = this.props;
77
+ getEventStreamingInfoById(event.id)
88
78
  }
89
79
 
90
80
  render() {
@@ -232,7 +222,7 @@ const EventPage = ({
232
222
  eventsPhases,
233
223
  nowUtc,
234
224
  getEventById,
235
- getEventTokensById,
225
+ getEventStreamingInfoById,
236
226
  lastUpdate,
237
227
  lastDataSync
238
228
  }) => {
@@ -260,7 +250,7 @@ const EventPage = ({
260
250
  nowUtc={nowUtc}
261
251
  location={location}
262
252
  getEventById={getEventById}
263
- getEventTokensById={getEventTokensById}
253
+ getEventStreamingInfoById={getEventStreamingInfoById}
264
254
  lastUpdate={lastUpdate}
265
255
  activityCtaText={activityCtaText}
266
256
  lastDataSync={lastDataSync}
@@ -278,7 +268,7 @@ EventPage.propTypes = {
278
268
  user: PropTypes.object,
279
269
  eventsPhases: PropTypes.array,
280
270
  getEventById: PropTypes.func,
281
- getEventTokensById: PropTypes.func,
271
+ getEventStreamingInfoById: PropTypes.func,
282
272
  };
283
273
 
284
274
  EventPageTemplate.propTypes = {
@@ -290,7 +280,7 @@ EventPageTemplate.propTypes = {
290
280
  user: PropTypes.object,
291
281
  eventsPhases: PropTypes.array,
292
282
  getEventById: PropTypes.func,
293
- getEventTokensById: PropTypes.func,
283
+ getEventStreamingInfoById: PropTypes.func,
294
284
  activityCtaText: PropTypes.string,
295
285
  };
296
286
 
@@ -314,5 +304,5 @@ const mapStateToProps = ({
314
304
 
315
305
  export default connect(mapStateToProps, {
316
306
  getEventById,
317
- getEventTokensById,
307
+ getEventStreamingInfoById,
318
308
  })(EventPage);
@@ -1,5 +1,5 @@
1
1
  import AbstractSynchStrategy from "./abstract_synch_strategy";
2
- import {fetchEventById} from "../../actions/fetch-entities-actions";
2
+ import {fetchEventById, fetchStreamingInfoByEventId} from "../../actions/fetch-entities-actions";
3
3
  import {insertSorted, intCheck} from "../../utils/arrayUtils";
4
4
  import {
5
5
  BUCKET_EVENTS_DATA_KEY,
@@ -19,7 +19,12 @@ class ActivitySynchStrategy extends AbstractSynchStrategy{
19
19
 
20
20
  const {entity_operator, entity_id} = payload;
21
21
 
22
- const entity = await fetchEventById(this.summit.id, entity_id, this.accessToken);
22
+ let entity = await fetchEventById(this.summit.id, entity_id, this.accessToken);
23
+ if(this.accessToken) {
24
+ const streaming_info = await fetchStreamingInfoByEventId(this.summit.id, entity_id, this.accessToken);
25
+ if(streaming_info) entity = {...entity, ...streaming_info};
26
+ }
27
+
23
28
  let eventsData = [...this.allEvents];
24
29
 
25
30
  if (entity_operator === 'UPDATE') {
@@ -187,4 +192,4 @@ class ActivitySynchStrategy extends AbstractSynchStrategy{
187
192
  }
188
193
  }
189
194
 
190
- export default ActivitySynchStrategy;
195
+ export default ActivitySynchStrategy;