From 5f88a1a0b9d1d6faac9eb71e971b9f52b5553cfa Mon Sep 17 00:00:00 2001 From: Gregoire Parant Date: Mon, 25 Jan 2021 12:21:40 +0100 Subject: [PATCH 01/12] Exit trigger action - [x] Add trigger message custom - [x] Add trigger for exit map - [x] Update documentation --- front/src/Phaser/Game/GameScene.ts | 44 ++++++++++++++++++++++++------ front/src/WebRtc/LayoutManager.ts | 5 ++++ 2 files changed, 41 insertions(+), 8 deletions(-) diff --git a/front/src/Phaser/Game/GameScene.ts b/front/src/Phaser/Game/GameScene.ts index d5460420..7caa224e 100644 --- a/front/src/Phaser/Game/GameScene.ts +++ b/front/src/Phaser/Game/GameScene.ts @@ -33,9 +33,14 @@ import {ReconnectingSceneName} from "../Reconnecting/ReconnectingScene"; import {lazyLoadPlayerCharacterTextures} from "../Entity/PlayerTexturesLoadingManager"; import { CenterListener, + EXIT_MESSAGE_PROPERTIES, JITSI_MESSAGE_PROPERTIES, layoutManager, LayoutMode, - ON_ACTION_TRIGGER_BUTTON, TRIGGER_JITSI_PROPERTIES, TRIGGER_WEBSITE_PROPERTIES + ON_ACTION_TRIGGER_BUTTON, + TRIGGER_EXIT_PROPERTIES, + TRIGGER_JITSI_PROPERTIES, + TRIGGER_WEBSITE_PROPERTIES, + WEBSITE_MESSAGE_PROPERTIES } from "../../WebRtc/LayoutManager"; import Texture = Phaser.Textures.Texture; import Sprite = Phaser.GameObjects.Sprite; @@ -621,11 +626,27 @@ export class GameScene extends ResizableScene implements CenterListener { } private triggerOnMapLayerPropertyChange(){ + /* @deprecated this.gameMap.onPropertyChange('exitSceneUrl', (newValue, oldValue) => { if (newValue) this.onMapExit(newValue as string); - }); - this.gameMap.onPropertyChange('exitUrl', (newValue, oldValue) => { - if (newValue) this.onMapExit(newValue as string); + });*/ + this.gameMap.onPropertyChange('exitUrl', (newValue, oldValue, allProps) => { + if (newValue === undefined) { + layoutManager.removeActionButton('exitUrl', this.userInputManager); + } else { + const exitTriggerValue = allProps.get(TRIGGER_EXIT_PROPERTIES); + if (exitTriggerValue && exitTriggerValue === ON_ACTION_TRIGGER_BUTTON) { + let message = allProps.get(EXIT_MESSAGE_PROPERTIES); + if(message === undefined){ + message = 'Click on SPACE to entrer in next map'; + } + layoutManager.addActionButton('exitUrl', message.toString(), () => { + this.onMapExit(newValue as string); + }, this.userInputManager); + } else { + this.onMapExit(newValue as string); + } + } }); this.gameMap.onPropertyChange('openWebsite', (newValue, oldValue, allProps) => { if (newValue === undefined) { @@ -639,7 +660,11 @@ export class GameScene extends ResizableScene implements CenterListener { const openWebsiteTriggerValue = allProps.get(TRIGGER_WEBSITE_PROPERTIES); if(openWebsiteTriggerValue && openWebsiteTriggerValue === ON_ACTION_TRIGGER_BUTTON) { - layoutManager.addActionButton('openWebsite', 'Click on SPACE to open the web site', () => { + let message = allProps.get(WEBSITE_MESSAGE_PROPERTIES); + if(message === undefined){ + message = 'Click on SPACE to open the web site'; + } + layoutManager.addActionButton('openWebsite', message.toString(), () => { openWebsiteFunction(); }, this.userInputManager); }else{ @@ -655,7 +680,6 @@ export class GameScene extends ResizableScene implements CenterListener { const openJitsiRoomFunction = () => { if (JITSI_PRIVATE_MODE) { const adminTag = allProps.get("jitsiRoomAdminTag") as string|undefined; - this.connection.emitQueryJitsiJwtMessage(this.instance.replace('/', '-') + "-" + newValue, adminTag); } else { this.startJitsi(newValue as string); @@ -665,14 +689,18 @@ export class GameScene extends ResizableScene implements CenterListener { const jitsiTriggerValue = allProps.get(TRIGGER_JITSI_PROPERTIES); if(jitsiTriggerValue && jitsiTriggerValue === ON_ACTION_TRIGGER_BUTTON) { - layoutManager.addActionButton('jitsiRoom', 'Click on SPACE to enter in jitsi meet room', () => { + let message = allProps.get(JITSI_MESSAGE_PROPERTIES); + if (message === undefined) { + message = 'Click on SPACE to enter in jitsi meet room'; + } + layoutManager.addActionButton('jitsiRoom', message.toString(), () => { openJitsiRoomFunction(); }, this.userInputManager); }else{ openJitsiRoomFunction(); } } - }) + }); this.gameMap.onPropertyChange('silent', (newValue, oldValue) => { if (newValue === undefined || newValue === false || newValue === '') { this.connection.setSilent(false); diff --git a/front/src/WebRtc/LayoutManager.ts b/front/src/WebRtc/LayoutManager.ts index a6b9fa27..db9d0a95 100644 --- a/front/src/WebRtc/LayoutManager.ts +++ b/front/src/WebRtc/LayoutManager.ts @@ -26,6 +26,11 @@ export interface CenterListener { export const ON_ACTION_TRIGGER_BUTTON = 'onaction'; export const TRIGGER_WEBSITE_PROPERTIES = 'openWebsiteTrigger'; export const TRIGGER_JITSI_PROPERTIES = 'jitsiTrigger'; +export const TRIGGER_EXIT_PROPERTIES = 'exitTrigger'; + +export const WEBSITE_MESSAGE_PROPERTIES = 'openWebsiteTriggerMessage'; +export const JITSI_MESSAGE_PROPERTIES = 'jitsiTriggerMessage'; +export const EXIT_MESSAGE_PROPERTIES = 'exitTriggerMessage'; /** * This class is in charge of the video-conference layout. From beb53df3646318d99c730d261ec863410ada59b3 Mon Sep 17 00:00:00 2001 From: Gregoire Parant Date: Mon, 25 Jan 2021 13:18:57 +0100 Subject: [PATCH 02/12] Error problem open new map --- front/src/Phaser/Game/GameScene.ts | 10 +++-- front/src/WebRtc/LayoutManager.ts | 1 + maps/Floor0/floor0.json | 64 ++++++++++++++++++++++++++---- 3 files changed, 64 insertions(+), 11 deletions(-) diff --git a/front/src/Phaser/Game/GameScene.ts b/front/src/Phaser/Game/GameScene.ts index 7caa224e..51126013 100644 --- a/front/src/Phaser/Game/GameScene.ts +++ b/front/src/Phaser/Game/GameScene.ts @@ -631,22 +631,24 @@ export class GameScene extends ResizableScene implements CenterListener { if (newValue) this.onMapExit(newValue as string); });*/ this.gameMap.onPropertyChange('exitUrl', (newValue, oldValue, allProps) => { - if (newValue === undefined) { + if (newValue) this.onMapExit(newValue as string); + /*if (newValue === undefined) { layoutManager.removeActionButton('exitUrl', this.userInputManager); } else { const exitTriggerValue = allProps.get(TRIGGER_EXIT_PROPERTIES); if (exitTriggerValue && exitTriggerValue === ON_ACTION_TRIGGER_BUTTON) { let message = allProps.get(EXIT_MESSAGE_PROPERTIES); - if(message === undefined){ - message = 'Click on SPACE to entrer in next map'; + if (message === undefined) { + message = 'Click on SPACE to enter in next map'; } layoutManager.addActionButton('exitUrl', message.toString(), () => { + layoutManager.removeActionButton('exitUrl', this.userInputManager); this.onMapExit(newValue as string); }, this.userInputManager); } else { this.onMapExit(newValue as string); } - } + }*/ }); this.gameMap.onPropertyChange('openWebsite', (newValue, oldValue, allProps) => { if (newValue === undefined) { diff --git a/front/src/WebRtc/LayoutManager.ts b/front/src/WebRtc/LayoutManager.ts index db9d0a95..ee7e47fe 100644 --- a/front/src/WebRtc/LayoutManager.ts +++ b/front/src/WebRtc/LayoutManager.ts @@ -24,6 +24,7 @@ export interface CenterListener { } export const ON_ACTION_TRIGGER_BUTTON = 'onaction'; + export const TRIGGER_WEBSITE_PROPERTIES = 'openWebsiteTrigger'; export const TRIGGER_JITSI_PROPERTIES = 'jitsiTrigger'; export const TRIGGER_EXIT_PROPERTIES = 'exitTrigger'; diff --git a/maps/Floor0/floor0.json b/maps/Floor0/floor0.json index 3bbd67cd..f5239941 100644 --- a/maps/Floor0/floor0.json +++ b/maps/Floor0/floor0.json @@ -49,6 +49,11 @@ "name":"jitsiTrigger", "type":"string", "value":"onaction" + }, + { + "name":"jitsiTriggerMessage", + "type":"string", + "value":"Test trigger message" }], "type":"tilelayer", "visible":true, @@ -225,6 +230,11 @@ "name":"openWebsiteTrigger", "type":"string", "value":"onaction" + }, + { + "name":"openWebsiteTriggerMessage", + "type":"string", + "value":"Test d'envoi d'un message" }], "type":"tilelayer", "visible":true, @@ -275,6 +285,16 @@ "name":"exit_stairs", "opacity":1, "properties":[ + { + "name":"exitTrigger", + "type":"string", + "value":"onaction" + }, + { + "name":"exitTriggerMessage", + "type":"string", + "value":"Test d'envoi d'un message" + }, { "name":"exitUrl", "type":"string", @@ -293,10 +313,20 @@ "name":"exit_lyon", "opacity":1, "properties":[ + { + "name":"exitTrigger", + "type":"string", + "value":"onaction" + }, + { + "name":"exitTriggerMessage", + "type":"string", + "value":"Test d'envoi d'un message" + }, { "name":"exitUrl", "type":"string", - "value":"..\/..\/..\/fjhzfiunzedoazmnj\/aurelgit.github.io\/wokalys\/map.json" + "value":"\/@\/tcm\/workadventure\/lyon" }], "type":"tilelayer", "visible":true, @@ -312,9 +342,19 @@ "opacity":1, "properties":[ { - "name":"exitSceneUrl", + "name":"exitTrigger", "type":"string", - "value":"https:\/\/npeguin.github.io\/coders-map\/map.json" + "value":"onaction" + }, + { + "name":"exitTriggerMessage", + "type":"string", + "value":"Test d'envoi d'un message" + }, + { + "name":"exitUrl", + "type":"string", + "value":"\/@\/tcm\/workadventure\/coder" }], "type":"tilelayer", "visible":true, @@ -330,9 +370,19 @@ "opacity":1, "properties":[ { - "name":"exitSceneUrl", + "name":"exitTrigger", "type":"string", - "value":"https:\/\/npeguin.github.io\/corridor-map\/map.json" + "value":"onaction" + }, + { + "name":"exitTriggerMessage", + "type":"string", + "value":"Test d'envoi d'un message" + }, + { + "name":"exitUrl", + "type":"string", + "value":"\/@\/tcm\/workadventure\/corridor" }], "type":"tilelayer", "visible":true, @@ -433,7 +483,7 @@ "nextobjectid":2, "orientation":"orthogonal", "renderorder":"right-down", - "tiledversion":"1.3.3", + "tiledversion":"1.4.3", "tileheight":32, "tilesets":[ { @@ -2379,6 +2429,6 @@ }], "tilewidth":32, "type":"map", - "version":1.2, + "version":1.4, "width":46 } \ No newline at end of file From e8b1b286a3ddb80dfd5620f368dcf1583b093f43 Mon Sep 17 00:00:00 2001 From: Gregoire Parant Date: Wed, 17 Feb 2021 18:49:55 +0100 Subject: [PATCH 03/12] Merge Jitsi config --- front/src/WebRtc/JitsiFactory.ts | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/front/src/WebRtc/JitsiFactory.ts b/front/src/WebRtc/JitsiFactory.ts index 41a5c388..860c2919 100644 --- a/front/src/WebRtc/JitsiFactory.ts +++ b/front/src/WebRtc/JitsiFactory.ts @@ -1,9 +1,16 @@ import {JITSI_URL} from "../Enum/EnvironmentVariable"; import {mediaManager} from "./MediaManager"; import {coWebsiteManager} from "./CoWebsiteManager"; +import {AddPlayerInterface} from "../Phaser/Game/AddPlayerInterface"; declare const window:any; // eslint-disable-line @typescript-eslint/no-explicit-any -const getDefaultConfig = () => { +interface jitsiConfigInterface { + startWithAudioMuted: boolean + startWithVideoMuted: boolean + prejoinPageEnabled: boolean +} + +const getDefaultConfig = () : jitsiConfigInterface => { return { startWithAudioMuted: !mediaManager.constraintsMedia.audio, startWithVideoMuted: mediaManager.constraintsMedia.video === false, @@ -11,6 +18,18 @@ const getDefaultConfig = () => { } } +const mergeConfig = (config?: object) => { + const currentDefaultConfig = getDefaultConfig(); + if(!config){ + return currentDefaultConfig; + } + return { + startWithAudioMuted: (config as jitsiConfigInterface).startWithAudioMuted ? true : currentDefaultConfig.startWithAudioMuted, + startWithVideoMuted: (config as jitsiConfigInterface).startWithVideoMuted ? true : currentDefaultConfig.startWithVideoMuted, + prejoinPageEnabled: (config as jitsiConfigInterface).prejoinPageEnabled ? true : currentDefaultConfig.prejoinPageEnabled + } +} + const defaultInterfaceConfig = { SHOW_CHROME_EXTENSION_BANNER: false, MOBILE_APP_PROMO: false, @@ -76,7 +95,7 @@ class JitsiFactory { width: "100%", height: "100%", parentNode: cowebsiteDiv, - configOverwrite: {...config, ...getDefaultConfig()}, + configOverwrite: mergeConfig(config), interfaceConfigOverwrite: {...defaultInterfaceConfig, ...interfaceConfig} }; if (!options.jwt) { From baae1e81251a645ff952fe89c67c3b4a6aca5bbb Mon Sep 17 00:00:00 2001 From: Gregoire Parant Date: Wed, 17 Feb 2021 19:21:37 +0100 Subject: [PATCH 04/12] Update to restore previous config --- front/src/WebRtc/JitsiFactory.ts | 17 +++++++++++++++++ maps/Floor0/floor0.json | 9 +++++++-- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/front/src/WebRtc/JitsiFactory.ts b/front/src/WebRtc/JitsiFactory.ts index 860c2919..35bc2c22 100644 --- a/front/src/WebRtc/JitsiFactory.ts +++ b/front/src/WebRtc/JitsiFactory.ts @@ -70,6 +70,7 @@ class JitsiFactory { private jitsiApi: any; // eslint-disable-line @typescript-eslint/no-explicit-any private audioCallback = this.onAudioChange.bind(this); private videoCallback = this.onVideoChange.bind(this); + private previousConfigMeet? : jitsiConfigInterface; /** * Slugifies the room name and prepends the room name with the instance @@ -79,6 +80,9 @@ class JitsiFactory { } public start(roomName: string, playerName:string, jwt?: string, config?: object, interfaceConfig?: object): void { + //save previous config + this.previousConfigMeet = getDefaultConfig(); + coWebsiteManager.insertCoWebsite((cowebsiteDiv => { // Jitsi meet external API maintains some data in local storage // which is sent via the appData URL parameter when joining a @@ -122,6 +126,19 @@ class JitsiFactory { this.jitsiApi.removeListener('audioMuteStatusChanged', this.audioCallback); this.jitsiApi.removeListener('videoMuteStatusChanged', this.videoCallback); this.jitsiApi?.dispose(); + + //restore previous config + if(this.previousConfigMeet?.startWithAudioMuted){ + mediaManager.disableMicrophone(); + }else{ + mediaManager.enableMicrophone(); + } + + if(this.previousConfigMeet?.startWithVideoMuted){ + mediaManager.disableCamera(); + }else{ + mediaManager.enableCamera(); + } } private onAudioChange({muted}: {muted: boolean}): void { diff --git a/maps/Floor0/floor0.json b/maps/Floor0/floor0.json index 6a88f78d..f5f2ee12 100644 --- a/maps/Floor0/floor0.json +++ b/maps/Floor0/floor0.json @@ -40,6 +40,11 @@ "name":"chillzone-2", "opacity":1, "properties":[ + { + "name":"jitsiConfig", + "type":"string", + "value":"{ \"startWithAudioMuted\": true, \"startWithVideoMuted\": true } " + }, { "name":"jitsiRoom", "type":"string", @@ -433,7 +438,7 @@ "nextobjectid":2, "orientation":"orthogonal", "renderorder":"right-down", - "tiledversion":"1.3.3", + "tiledversion":"1.4.3", "tileheight":32, "tilesets":[ { @@ -2379,6 +2384,6 @@ }], "tilewidth":32, "type":"map", - "version":1.2, + "version":1.4, "width":46 } \ No newline at end of file From ce423c9fec2deb337eb25f4158e105678f9ea3aa Mon Sep 17 00:00:00 2001 From: Gregoire Parant Date: Wed, 17 Feb 2021 19:29:59 +0100 Subject: [PATCH 05/12] Remove exit trigger action --- front/src/Phaser/Game/GameScene.ts | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/front/src/Phaser/Game/GameScene.ts b/front/src/Phaser/Game/GameScene.ts index d6dc7dbb..713c458a 100644 --- a/front/src/Phaser/Game/GameScene.ts +++ b/front/src/Phaser/Game/GameScene.ts @@ -647,29 +647,11 @@ export class GameScene extends ResizableScene implements CenterListener { } private triggerOnMapLayerPropertyChange(){ - /* @deprecated this.gameMap.onPropertyChange('exitSceneUrl', (newValue, oldValue) => { if (newValue) this.onMapExit(newValue as string); - });*/ - this.gameMap.onPropertyChange('exitUrl', (newValue, oldValue, allProps) => { + }); + this.gameMap.onPropertyChange('exitUrl', (newValue, oldValue) => { if (newValue) this.onMapExit(newValue as string); - /*if (newValue === undefined) { - layoutManager.removeActionButton('exitUrl', this.userInputManager); - } else { - const exitTriggerValue = allProps.get(TRIGGER_EXIT_PROPERTIES); - if (exitTriggerValue && exitTriggerValue === ON_ACTION_TRIGGER_BUTTON) { - let message = allProps.get(EXIT_MESSAGE_PROPERTIES); - if (message === undefined) { - message = 'Click on SPACE to enter in next map'; - } - layoutManager.addActionButton('exitUrl', message.toString(), () => { - layoutManager.removeActionButton('exitUrl', this.userInputManager); - this.onMapExit(newValue as string); - }, this.userInputManager); - } else { - this.onMapExit(newValue as string); - } - }*/ }); this.gameMap.onPropertyChange('openWebsite', (newValue, oldValue, allProps) => { if (newValue === undefined) { From 9b7b3eb140f8039f66b68e37e74c0e47f33a09dc Mon Sep 17 00:00:00 2001 From: Gregoire Parant Date: Wed, 17 Feb 2021 19:31:05 +0100 Subject: [PATCH 06/12] Update feedback @tabascoeye --- front/src/Phaser/Game/GameScene.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/front/src/Phaser/Game/GameScene.ts b/front/src/Phaser/Game/GameScene.ts index 713c458a..0127d790 100644 --- a/front/src/Phaser/Game/GameScene.ts +++ b/front/src/Phaser/Game/GameScene.ts @@ -667,7 +667,7 @@ export class GameScene extends ResizableScene implements CenterListener { if(openWebsiteTriggerValue && openWebsiteTriggerValue === ON_ACTION_TRIGGER_BUTTON) { let message = allProps.get(WEBSITE_MESSAGE_PROPERTIES); if(message === undefined){ - message = 'Click on SPACE to open the web site'; + message = 'Press on SPACE to open the web site'; } layoutManager.addActionButton('openWebsite', message.toString(), () => { openWebsiteFunction(); @@ -698,7 +698,7 @@ export class GameScene extends ResizableScene implements CenterListener { if(jitsiTriggerValue && jitsiTriggerValue === ON_ACTION_TRIGGER_BUTTON) { let message = allProps.get(JITSI_MESSAGE_PROPERTIES); if (message === undefined) { - message = 'Click on SPACE to enter in jitsi meet room'; + message = 'Press on SPACE to enter in jitsi meet room'; } layoutManager.addActionButton('jitsiRoom', message.toString(), () => { openJitsiRoomFunction(); From fff0cbc3f6d277a02af32a2f66eca59d73261d6a Mon Sep 17 00:00:00 2001 From: Gregoire Parant Date: Wed, 17 Feb 2021 19:40:00 +0100 Subject: [PATCH 07/12] Revert message exit --- front/src/Phaser/Game/GameScene.ts | 2 -- front/src/WebRtc/LayoutManager.ts | 2 -- 2 files changed, 4 deletions(-) diff --git a/front/src/Phaser/Game/GameScene.ts b/front/src/Phaser/Game/GameScene.ts index 0127d790..a90cb6b1 100644 --- a/front/src/Phaser/Game/GameScene.ts +++ b/front/src/Phaser/Game/GameScene.ts @@ -33,12 +33,10 @@ import {ReconnectingSceneName} from "../Reconnecting/ReconnectingScene"; import {lazyLoadPlayerCharacterTextures, loadCustomTexture} from "../Entity/PlayerTexturesLoadingManager"; import { CenterListener, - EXIT_MESSAGE_PROPERTIES, JITSI_MESSAGE_PROPERTIES, layoutManager, LayoutMode, ON_ACTION_TRIGGER_BUTTON, - TRIGGER_EXIT_PROPERTIES, TRIGGER_JITSI_PROPERTIES, TRIGGER_WEBSITE_PROPERTIES, WEBSITE_MESSAGE_PROPERTIES diff --git a/front/src/WebRtc/LayoutManager.ts b/front/src/WebRtc/LayoutManager.ts index d0be5e90..f0a88a98 100644 --- a/front/src/WebRtc/LayoutManager.ts +++ b/front/src/WebRtc/LayoutManager.ts @@ -27,11 +27,9 @@ export const ON_ACTION_TRIGGER_BUTTON = 'onaction'; export const TRIGGER_WEBSITE_PROPERTIES = 'openWebsiteTrigger'; export const TRIGGER_JITSI_PROPERTIES = 'jitsiTrigger'; -export const TRIGGER_EXIT_PROPERTIES = 'exitTrigger'; export const WEBSITE_MESSAGE_PROPERTIES = 'openWebsiteTriggerMessage'; export const JITSI_MESSAGE_PROPERTIES = 'jitsiTriggerMessage'; -export const EXIT_MESSAGE_PROPERTIES = 'exitTriggerMessage'; /** * This class is in charge of the video-conference layout. From 5ddf909fe62c26aacdf4e67733c4bd38dcbc82db Mon Sep 17 00:00:00 2001 From: Gregoire Parant Date: Wed, 17 Feb 2021 20:26:33 +0100 Subject: [PATCH 08/12] Remove unless export constante --- front/src/WebRtc/JitsiFactory.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/front/src/WebRtc/JitsiFactory.ts b/front/src/WebRtc/JitsiFactory.ts index 35bc2c22..c06da18a 100644 --- a/front/src/WebRtc/JitsiFactory.ts +++ b/front/src/WebRtc/JitsiFactory.ts @@ -1,7 +1,6 @@ import {JITSI_URL} from "../Enum/EnvironmentVariable"; import {mediaManager} from "./MediaManager"; import {coWebsiteManager} from "./CoWebsiteManager"; -import {AddPlayerInterface} from "../Phaser/Game/AddPlayerInterface"; declare const window:any; // eslint-disable-line @typescript-eslint/no-explicit-any interface jitsiConfigInterface { From 8a2954eab9f3941cac6afc74d8b413f349ac97e5 Mon Sep 17 00:00:00 2001 From: Gregoire Parant Date: Thu, 18 Feb 2021 09:38:27 +0100 Subject: [PATCH 09/12] Fix new conf feature --- front/src/WebRtc/JitsiFactory.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/front/src/WebRtc/JitsiFactory.ts b/front/src/WebRtc/JitsiFactory.ts index c06da18a..70ee66bf 100644 --- a/front/src/WebRtc/JitsiFactory.ts +++ b/front/src/WebRtc/JitsiFactory.ts @@ -23,6 +23,8 @@ const mergeConfig = (config?: object) => { return currentDefaultConfig; } return { + ...currentDefaultConfig, + ...config, startWithAudioMuted: (config as jitsiConfigInterface).startWithAudioMuted ? true : currentDefaultConfig.startWithAudioMuted, startWithVideoMuted: (config as jitsiConfigInterface).startWithVideoMuted ? true : currentDefaultConfig.startWithVideoMuted, prejoinPageEnabled: (config as jitsiConfigInterface).prejoinPageEnabled ? true : currentDefaultConfig.prejoinPageEnabled From 80449e9a963e369913fcd00e156f9c786e104db4 Mon Sep 17 00:00:00 2001 From: Gregoire Parant Date: Thu, 18 Feb 2021 10:00:13 +0100 Subject: [PATCH 10/12] Change json map test --- maps/Floor0/floor0.json | 25 ++++++++++++++++++++++++- maps/tests/jitsi_config.json | 21 +++++++++++++-------- 2 files changed, 37 insertions(+), 9 deletions(-) diff --git a/maps/Floor0/floor0.json b/maps/Floor0/floor0.json index f5f2ee12..62084eb8 100644 --- a/maps/Floor0/floor0.json +++ b/maps/Floor0/floor0.json @@ -45,6 +45,11 @@ "type":"string", "value":"{ \"startWithAudioMuted\": true, \"startWithVideoMuted\": true } " }, + { + "name":"jitsiInterfaceConfig", + "type":"string", + "value":"{\"DEFAULT_BACKGROUND\":\"#77ee77\"}" + }, { "name":"jitsiRoom", "type":"string", @@ -61,6 +66,18 @@ "x":0, "y":0 }, + { + "data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], "height":51, @@ -434,9 +451,15 @@ "x":0, "y":0 }], - "nextlayerid":31, + "nextlayerid":32, "nextobjectid":2, "orientation":"orthogonal", + "properties":[ + { + "name":"silent", + "type":"bool", + "value":true + }], "renderorder":"right-down", "tiledversion":"1.4.3", "tileheight":32, diff --git a/maps/tests/jitsi_config.json b/maps/tests/jitsi_config.json index 1a831d97..d806b751 100644 --- a/maps/tests/jitsi_config.json +++ b/maps/tests/jitsi_config.json @@ -34,26 +34,31 @@ "y":0 }, { - "data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34, 34, 34, 34, 34, 0, 0, 0, 0, 0, 34, 34, 34, 34, 34, 0, 0, 0, 0, 0, 34, 34, 34, 34, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + "data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34, 34, 34, 34, 34, 0, 0, 0, 0, 0, 34, 34, 34, 34, 34, 0, 0, 0, 0, 0, 34, 34, 34, 34, 34, 0, 0, 0, 0, 0, 34, 34, 34, 34, 34, 0, 0, 0, 0, 0, 34, 34, 34, 34, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], "height":10, - "id":4, - "name":"jitsi", + "id":5, + "name":"jitsiConf", "opacity":1, "properties":[ { "name":"jitsiConfig", "type":"string", - "value":"{ \"startWithAudioMuted\": true }" + "value":"{ \"startWithAudioMuted\": true, \"startWithVideoMuted\": true } " }, { "name":"jitsiInterfaceConfig", "type":"string", - "value":"{ \"DEFAULT_BACKGROUND\": \"#77ee77\" }" + "value":"{\"DEFAULT_BACKGROUND\":\"#77ee77\"}" }, { "name":"jitsiRoom", "type":"string", "value":"myRoom avec espace \u00e9\u00e0$&'\"_ \ud83d\ude00" + }, + { + "name":"jitsiTrigger", + "type":"string", + "value":"onaction" }], "type":"tilelayer", "visible":true, @@ -72,11 +77,11 @@ "x":0, "y":0 }], - "nextlayerid":5, + "nextlayerid":6, "nextobjectid":1, "orientation":"orthogonal", "renderorder":"right-down", - "tiledversion":"1.3.3", + "tiledversion":"1.4.3", "tileheight":32, "tilesets":[ { @@ -94,6 +99,6 @@ }], "tilewidth":32, "type":"map", - "version":1.2, + "version":1.4, "width":10 } \ No newline at end of file From 772c3174be649ea2e5e977926d5562acdbbf6005 Mon Sep 17 00:00:00 2001 From: Gregoire Parant Date: Thu, 18 Feb 2021 11:32:37 +0100 Subject: [PATCH 11/12] Fix last properties changed after trigger change position --- front/src/Phaser/Game/GameMap.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/front/src/Phaser/Game/GameMap.ts b/front/src/Phaser/Game/GameMap.ts index 12da0514..110a29d6 100644 --- a/front/src/Phaser/Game/GameMap.ts +++ b/front/src/Phaser/Game/GameMap.ts @@ -29,6 +29,7 @@ export class GameMap { const newProps = this.getProperties(key); const oldProps = this.lastProperties; + this.lastProperties = newProps; // Let's compare the 2 maps: // First new properties vs oldProperties @@ -45,8 +46,6 @@ export class GameMap { this.trigger(oldPropName, oldPropValue, undefined, newProps); } } - - this.lastProperties = newProps; } public getCurrentProperties(): Map { From 13a20a0ef06719b823958520420481b8a54d3a8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Thu, 18 Feb 2021 11:52:30 +0100 Subject: [PATCH 12/12] Fixing screensharing Coturn credentials When screensharing is initiated by the user, we previously did not send the correct Coturn credentials. We now send the last credentials received from the Video stream. --- front/src/WebRtc/SimplePeer.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/front/src/WebRtc/SimplePeer.ts b/front/src/WebRtc/SimplePeer.ts index 34e4b3f8..2baeef11 100644 --- a/front/src/WebRtc/SimplePeer.ts +++ b/front/src/WebRtc/SimplePeer.ts @@ -42,6 +42,8 @@ export class SimplePeer { private readonly stopLocalScreenSharingStreamCallback: StopScreenSharingCallback; private readonly peerConnectionListeners: Array = new Array(); private readonly userId: number; + private lastWebrtcUserName: string|undefined; + private lastWebrtcPassword: string|undefined; constructor(private Connection: RoomConnection, private enableReporting: boolean, private myName: string) { // We need to go through this weird bound function pointer in order to be able to "free" this reference later. @@ -142,6 +144,9 @@ export class SimplePeer { mediaManager.addActiveVideo(user, name); + this.lastWebrtcUserName = user.webRtcUser; + this.lastWebrtcPassword = user.webRtcPassword; + const peer = new VideoPeer(user, user.initiator ? user.initiator : false, this.Connection); //permit to send message @@ -191,6 +196,12 @@ export class SimplePeer { mediaManager.addScreenSharingActiveVideo("" + user.userId); } + // Enrich the user with last known credentials (if they are not set in the user object, which happens when a user triggers the screen sharing) + if (user.webRtcUser === undefined) { + user.webRtcUser = this.lastWebrtcUserName; + user.webRtcPassword = this.lastWebrtcPassword; + } + const peer = new ScreenSharingPeer(user, user.initiator ? user.initiator : false, this.Connection); this.PeerScreenSharingConnectionArray.set(user.userId, peer);