@3dsource/angular-unreal-module 0.0.21 → 0.0.22

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.
@@ -1953,7 +1953,7 @@ class AggregatorService extends SubService {
1953
1953
  if (!deepEqual(json, previousJson)) {
1954
1954
  if (json?.error) {
1955
1955
  Logger.colored(...COLOR_CODES.FROM_UNREAL_ERROR, `${json.error}`, data);
1956
- this.store.dispatch(showUnrealErrorMessage({ code: json.code }));
1956
+ this.store.dispatch(showUnrealErrorMessage({ code: json.code, error: json?.error }));
1957
1957
  }
1958
1958
  else {
1959
1959
  this.showMessageFromUnreal(json);
@@ -3143,7 +3143,11 @@ class UnrealEffects {
3143
3143
  });
3144
3144
  this.sendLbmStat$ = this.store
3145
3145
  .select(unrealFeature.selectViewportReady)
3146
- .pipe(distinctUntilChanged(), filter(Truthy), exhaustMap(() => this.actions$.pipe(ofType(changeLowBandwidth), filter(({ lowBandwidth }) => lowBandwidth), withLatestFrom(this.store.select(unrealFeature.selectAwsInstance), this.store.select(unrealFeature.selectStreamClientCompanyId), this.store.select(unrealFeature.selectStreamViewId)), first(), exhaustMap(([, instance, companyId, viewId]) => this.http
3146
+ .pipe(distinctUntilChanged(), filter(Truthy), exhaustMap(() => this.actions$.pipe(ofType(changeLowBandwidth), filter(({ lowBandwidth }) => lowBandwidth), concatLatestFrom(() => [
3147
+ this.store.select(unrealFeature.selectAwsInstance),
3148
+ this.store.select(unrealFeature.selectStreamClientCompanyId),
3149
+ this.store.select(unrealFeature.selectStreamViewId),
3150
+ ]), first(), exhaustMap(([, instance, companyId, viewId]) => this.http
3147
3151
  .post(this.unrealInitialConfig?.customErrorsEndpoint || '', {
3148
3152
  message: {
3149
3153
  type: 'front',
@@ -3206,10 +3210,31 @@ class UnrealEffects {
3206
3210
  return this.actions$.pipe(ofType(destroyRemoteConnections), filter(({ disconnectReason }) => disconnectReason === DisconnectReason.dataChannelTimeout), switchMap(() => this.actions$.pipe(ofType(resetUnrealState), first())), map$1(() => initSignalling()));
3207
3211
  });
3208
3212
  this.showUnrealError$ = createEffect(() => {
3209
- return this.actions$.pipe(ofType(showUnrealErrorMessage), map$1(({ code }) => getRtcErrorMessage(code)), distinctUntilChanged(), filter(Truthy), switchMap((content) => this.dialog.open(UnrealErrorModalComponent, {
3210
- scrollStrategy: this.scrollStrategy,
3211
- data: { content },
3212
- }).closed), map$1(() => showUnrealErrorMessage({ code: null })));
3213
+ return this.actions$.pipe(ofType(showUnrealErrorMessage), map$1(({ error, code }) => ({
3214
+ message: getRtcErrorMessage(code),
3215
+ data: { error, code },
3216
+ })), distinctUntilChanged(), filter(({ message }) => Truthy(message)), concatLatestFrom(() => [
3217
+ this.store.select(unrealFeature.selectAwsInstance),
3218
+ this.store.select(unrealFeature.selectStreamClientCompanyId),
3219
+ this.store.select(unrealFeature.selectStreamViewId),
3220
+ ]), switchMap(([data, instance, companyId, viewId]) => {
3221
+ if (data?.data && data?.data.code === 404) {
3222
+ this.http.post(this.unrealInitialConfig?.customErrorsEndpoint || '', {
3223
+ client: instance.pollingUrl,
3224
+ session_uuid: companyId,
3225
+ session_uuid2: viewId,
3226
+ message: {
3227
+ type: 'front',
3228
+ error: `pak_not_found::${data.data?.error ?? ''}`,
3229
+ signalling: instance.pollingUrl,
3230
+ },
3231
+ });
3232
+ }
3233
+ return this.dialog.open(UnrealErrorModalComponent, {
3234
+ scrollStrategy: this.scrollStrategy,
3235
+ data: { content: data.message },
3236
+ }).closed;
3237
+ }), map$1(() => showUnrealErrorMessage({ code: null })));
3213
3238
  });
3214
3239
  this.initAppBySetDataChannelConnected$ = createEffect(() => {
3215
3240
  return this.actions$.pipe(ofType(setDataChannelConnected), tap(() => {