@3dsource/angular-unreal-module 0.0.80 → 0.0.81-dev.1
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.
|
@@ -593,6 +593,7 @@ const BITRATE_MONITOR = new DataFlowMonitor(FilterModel.yellowFlag, FilterModel.
|
|
|
593
593
|
class VideoService extends SubService {
|
|
594
594
|
constructor() {
|
|
595
595
|
super();
|
|
596
|
+
this.container = null;
|
|
596
597
|
this.latencyTestTimings = new LatencyTimings();
|
|
597
598
|
this.videoTrack$ = new Subject();
|
|
598
599
|
this.VideoEncoderQP = 0;
|
|
@@ -615,7 +616,7 @@ class VideoService extends SubService {
|
|
|
615
616
|
BITRATE_MONITOR.config(data);
|
|
616
617
|
});
|
|
617
618
|
}
|
|
618
|
-
setContainer(container) {
|
|
619
|
+
setContainer(container = null) {
|
|
619
620
|
this.container = container;
|
|
620
621
|
}
|
|
621
622
|
setLatencyTimings(latencyTimings) {
|
|
@@ -3481,7 +3482,8 @@ const unrealReducer = createReducer(initialState, on(changeLowBandwidth, (state,
|
|
|
3481
3482
|
},
|
|
3482
3483
|
};
|
|
3483
3484
|
}), on(disconnectStream, (state, errorMessage) => {
|
|
3484
|
-
if (state.dataChannelConnected
|
|
3485
|
+
if (state.dataChannelConnected ||
|
|
3486
|
+
state.disconnectReason === DisconnectReason.Destroy) {
|
|
3485
3487
|
return state;
|
|
3486
3488
|
}
|
|
3487
3489
|
return {
|
|
@@ -3529,6 +3531,9 @@ const unrealReducer = createReducer(initialState, on(changeLowBandwidth, (state,
|
|
|
3529
3531
|
: state.disconnectReason,
|
|
3530
3532
|
};
|
|
3531
3533
|
}), on(destroyRemoteConnections, (state, { reason }) => {
|
|
3534
|
+
if (state.disconnectReason === DisconnectReason.Destroy) {
|
|
3535
|
+
return state;
|
|
3536
|
+
}
|
|
3532
3537
|
return { ...state, disconnectReason: reason };
|
|
3533
3538
|
}), on(setSignalingName, (state, { instanceName }) => {
|
|
3534
3539
|
return { ...state, awsInstance: { ...state.awsInstance, instanceName } };
|
|
@@ -3689,9 +3694,10 @@ class UnrealEffects {
|
|
|
3689
3694
|
}), map(({ reason }) => destroyRemoteConnections({ reason })));
|
|
3690
3695
|
});
|
|
3691
3696
|
this.destroyConnections$ = createEffect(() => {
|
|
3692
|
-
return this.actions$.pipe(ofType(destroyUnrealScene), tap(() =>
|
|
3693
|
-
|
|
3694
|
-
|
|
3697
|
+
return this.actions$.pipe(ofType(destroyUnrealScene), tap(() => {
|
|
3698
|
+
this.videoService.setContainer(null);
|
|
3699
|
+
this.commandsSender.destroy();
|
|
3700
|
+
}), map(() => destroyRemoteConnections({ reason: DisconnectReason.Destroy })));
|
|
3695
3701
|
});
|
|
3696
3702
|
this.destroyRemoteConnections$ = createEffect(() => {
|
|
3697
3703
|
return this.actions$.pipe(ofType(destroyRemoteConnections), tap(({ reason }) => {
|