Add constant
This commit is contained in:
parent
2812387650
commit
3d32fb90dc
@ -31,7 +31,12 @@ import {Queue} from 'queue-typescript';
|
|||||||
import {SimplePeer, UserSimplePeerInterface} from "../../WebRtc/SimplePeer";
|
import {SimplePeer, UserSimplePeerInterface} from "../../WebRtc/SimplePeer";
|
||||||
import {ReconnectingSceneName} from "../Reconnecting/ReconnectingScene";
|
import {ReconnectingSceneName} from "../Reconnecting/ReconnectingScene";
|
||||||
import {loadAllLayers, loadObject, loadPlayerCharacters} from "../Entity/body_character";
|
import {loadAllLayers, loadObject, loadPlayerCharacters} from "../Entity/body_character";
|
||||||
import {CenterListener, layoutManager, LayoutMode} from "../../WebRtc/LayoutManager";
|
import {
|
||||||
|
CenterListener,
|
||||||
|
layoutManager,
|
||||||
|
LayoutMode,
|
||||||
|
ON_ACTION_TRIGGER_BUTTON, TRIGGER_JITSI_PROPERTIES, TRIGGER_WEBSITE_PROPERTIES
|
||||||
|
} from "../../WebRtc/LayoutManager";
|
||||||
import Texture = Phaser.Textures.Texture;
|
import Texture = Phaser.Textures.Texture;
|
||||||
import Sprite = Phaser.GameObjects.Sprite;
|
import Sprite = Phaser.GameObjects.Sprite;
|
||||||
import CanvasTexture = Phaser.Textures.CanvasTexture;
|
import CanvasTexture = Phaser.Textures.CanvasTexture;
|
||||||
@ -586,9 +591,9 @@ export class GameScene extends ResizableScene implements CenterListener {
|
|||||||
layoutManager.removeActionButton('openWebsite', this.userInputManager);
|
layoutManager.removeActionButton('openWebsite', this.userInputManager);
|
||||||
};
|
};
|
||||||
|
|
||||||
const openWebsiteTriggerValue = allProps.get('openWebsiteTrigger');
|
const openWebsiteTriggerValue = allProps.get(TRIGGER_WEBSITE_PROPERTIES);
|
||||||
if(openWebsiteTriggerValue && openWebsiteTriggerValue === 'onaction') {
|
if(openWebsiteTriggerValue && openWebsiteTriggerValue === ON_ACTION_TRIGGER_BUTTON) {
|
||||||
layoutManager.addActionButton('openWebsite', 'Click on SPACE to open web site', () => {
|
layoutManager.addActionButton('openWebsite', 'Click on SPACE to open the web site', () => {
|
||||||
openWebsiteFunction();
|
openWebsiteFunction();
|
||||||
}, this.userInputManager);
|
}, this.userInputManager);
|
||||||
}else{
|
}else{
|
||||||
@ -612,8 +617,8 @@ export class GameScene extends ResizableScene implements CenterListener {
|
|||||||
layoutManager.removeActionButton('jitsiRoom', this.userInputManager);
|
layoutManager.removeActionButton('jitsiRoom', this.userInputManager);
|
||||||
}
|
}
|
||||||
|
|
||||||
const jitsiTriggerValue = allProps.get('jitsiTrigger');
|
const jitsiTriggerValue = allProps.get(TRIGGER_JITSI_PROPERTIES);
|
||||||
if(jitsiTriggerValue && jitsiTriggerValue === 'onaction') {
|
if(jitsiTriggerValue && jitsiTriggerValue === ON_ACTION_TRIGGER_BUTTON) {
|
||||||
layoutManager.addActionButton('jitsiRoom', 'Click on SPACE to enter in jitsi meet room', () => {
|
layoutManager.addActionButton('jitsiRoom', 'Click on SPACE to enter in jitsi meet room', () => {
|
||||||
openJitsiRoomFunction();
|
openJitsiRoomFunction();
|
||||||
}, this.userInputManager);
|
}, this.userInputManager);
|
||||||
|
@ -23,6 +23,10 @@ export interface CenterListener {
|
|||||||
onCenterChange(): void;
|
onCenterChange(): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const ON_ACTION_TRIGGER_BUTTON = 'onaction';
|
||||||
|
export const TRIGGER_WEBSITE_PROPERTIES = 'openWebsiteTrigger';
|
||||||
|
export const TRIGGER_JITSI_PROPERTIES = 'jitsiTrigger';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class is in charge of the video-conference layout.
|
* This class is in charge of the video-conference layout.
|
||||||
* It receives positioning requests for videos and does its best to place them on the screen depending on the active layout mode.
|
* It receives positioning requests for videos and does its best to place them on the screen depending on the active layout mode.
|
||||||
|
Loading…
Reference in New Issue
Block a user