Fix media behavior management
This commit is contained in:
parent
f7caacc598
commit
657bf4d8d2
@ -226,6 +226,7 @@ export class GameScene extends DirtyScene {
|
|||||||
private jitsiDominantSpeaker: boolean = false;
|
private jitsiDominantSpeaker: boolean = false;
|
||||||
private jitsiParticipantsCount: number = 0;
|
private jitsiParticipantsCount: number = 0;
|
||||||
public readonly superLoad: SuperLoaderPlugin;
|
public readonly superLoad: SuperLoaderPlugin;
|
||||||
|
private allowProximityMeeting: boolean = true;
|
||||||
|
|
||||||
constructor(private room: Room, MapUrlFile: string, customKey?: string | undefined) {
|
constructor(private room: Room, MapUrlFile: string, customKey?: string | undefined) {
|
||||||
super({
|
super({
|
||||||
@ -1111,12 +1112,14 @@ ${escapedMessage}
|
|||||||
|
|
||||||
this.iframeSubscriptionList.push(
|
this.iframeSubscriptionList.push(
|
||||||
iframeListener.disablePlayerProximityMeetingStream.subscribe(() => {
|
iframeListener.disablePlayerProximityMeetingStream.subscribe(() => {
|
||||||
|
this.allowProximityMeeting = false;
|
||||||
this.disableMediaBehaviors();
|
this.disableMediaBehaviors();
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
this.iframeSubscriptionList.push(
|
this.iframeSubscriptionList.push(
|
||||||
iframeListener.enablePlayerProximityMeetingStream.subscribe(() => {
|
iframeListener.enablePlayerProximityMeetingStream.subscribe(() => {
|
||||||
|
this.allowProximityMeeting = true;
|
||||||
this.enableMediaBehaviors();
|
this.enableMediaBehaviors();
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
@ -2181,8 +2184,10 @@ ${escapedMessage}
|
|||||||
}
|
}
|
||||||
|
|
||||||
public enableMediaBehaviors() {
|
public enableMediaBehaviors() {
|
||||||
|
if (this.allowProximityMeeting) {
|
||||||
mediaManager.showMyCamera();
|
mediaManager.showMyCamera();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public disableMediaBehaviors() {
|
public disableMediaBehaviors() {
|
||||||
mediaManager.hideMyCamera();
|
mediaManager.hideMyCamera();
|
||||||
|
Loading…
Reference in New Issue
Block a user