anear-js-api 0.4.28 → 0.4.30
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.
|
@@ -180,7 +180,7 @@ const ActiveEventStatesConfig = {
|
|
|
180
180
|
],
|
|
181
181
|
on: {
|
|
182
182
|
RENDER_DISPLAY: {
|
|
183
|
-
target: '
|
|
183
|
+
target: '.rendering'
|
|
184
184
|
}
|
|
185
185
|
},
|
|
186
186
|
states: {
|
|
@@ -196,7 +196,6 @@ const ActiveEventStatesConfig = {
|
|
|
196
196
|
}
|
|
197
197
|
},
|
|
198
198
|
rendering: {
|
|
199
|
-
id: 'rendering',
|
|
200
199
|
deferred: DeferredStatesPlus('ANNOUNCE', 'START'),
|
|
201
200
|
invoke: {
|
|
202
201
|
src: 'renderDisplay',
|
|
@@ -220,7 +219,7 @@ const ActiveEventStatesConfig = {
|
|
|
220
219
|
initial: 'transitioning',
|
|
221
220
|
on: {
|
|
222
221
|
RENDER_DISPLAY: {
|
|
223
|
-
target: '
|
|
222
|
+
target: '.rendering'
|
|
224
223
|
},
|
|
225
224
|
PARTICIPANT_LEAVE: {
|
|
226
225
|
// creator browser refresh or MIA. Send disconnect events
|
|
@@ -273,7 +272,6 @@ const ActiveEventStatesConfig = {
|
|
|
273
272
|
}
|
|
274
273
|
},
|
|
275
274
|
rendering: {
|
|
276
|
-
id: 'rendering',
|
|
277
275
|
deferred: DeferredStatesPlus('START'),
|
|
278
276
|
invoke: {
|
|
279
277
|
src: 'renderDisplay',
|
|
@@ -793,7 +791,7 @@ const AnearEventMachineFunctions = ({
|
|
|
793
791
|
},
|
|
794
792
|
services: {
|
|
795
793
|
renderDisplay: async (context, event) => {
|
|
796
|
-
const processDisplayEvent =
|
|
794
|
+
const processDisplayEvent = displayEvent => {
|
|
797
795
|
const { displayType, viewPath, timeout, appExecutionContext } = displayEvent
|
|
798
796
|
|
|
799
797
|
logger.debug("processDisplayEvent - displayType: ", displayType, ", viewPath: ", viewPath)
|
|
@@ -848,15 +846,16 @@ const AnearEventMachineFunctions = ({
|
|
|
848
846
|
return RealtimeMessaging.publish(
|
|
849
847
|
context.participantsDisplayChannel,
|
|
850
848
|
'PARTICIPANTS_DISPLAY',
|
|
851
|
-
displayMessage
|
|
849
|
+
displayMessage.content
|
|
852
850
|
)
|
|
853
851
|
break
|
|
854
852
|
case 'spectators':
|
|
855
853
|
displayMessage = renderedDisplayContent(template, {})
|
|
854
|
+
|
|
856
855
|
return RealtimeMessaging.publish(
|
|
857
856
|
context.spectatorsDisplayChannel,
|
|
858
857
|
'SPECTATORS_DISPLAY',
|
|
859
|
-
displayMessage
|
|
858
|
+
displayMessage.content
|
|
860
859
|
)
|
|
861
860
|
break
|
|
862
861
|
case 'participant':
|
|
@@ -870,7 +869,7 @@ const AnearEventMachineFunctions = ({
|
|
|
870
869
|
}
|
|
871
870
|
|
|
872
871
|
const publishPromises = event.displayEvents.map(
|
|
873
|
-
displayEvent => processDisplayEvent(
|
|
872
|
+
displayEvent => processDisplayEvent(displayEvent)
|
|
874
873
|
)
|
|
875
874
|
return Promise.all(publishPromises)
|
|
876
875
|
},
|
|
@@ -937,7 +936,7 @@ const AnearEventMachineFunctions = ({
|
|
|
937
936
|
}
|
|
938
937
|
},
|
|
939
938
|
guards: {
|
|
940
|
-
participantExists: (context, event) => !!context.participants[event.id],
|
|
939
|
+
participantExists: (context, event) => !!context.participants[event.data.id],
|
|
941
940
|
eventCreatorIsHost: (context, event) => context.anearEvent.hosted
|
|
942
941
|
}
|
|
943
942
|
})
|