();
- constructor(private Connection: RoomConnection, private enableReporting: boolean) {
+ 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.
this.sendLocalVideoStreamCallback = this.sendLocalVideoStream.bind(this);
this.sendLocalScreenSharingStreamCallback = this.sendLocalScreenSharingStream.bind(this);
@@ -145,6 +145,12 @@ export class SimplePeer {
mediaManager.addActiveVideo("" + user.userId, reportCallback, name);
const peer = new VideoPeer(user.userId, user.initiator ? user.initiator : false, this.Connection);
+
+ //permit to send message
+ mediaManager.addSendMessageCallback(user.userId,(message: string) => {
+ peer.write(new Buffer(JSON.stringify({type: MESSAGE_TYPE_MESSAGE, name: this.myName.toUpperCase(), message: message})));
+ });
+
peer.toClose = false;
// When a connection is established to a video stream, and if a screen sharing is taking place,
// the user sharing screen should also initiate a connection to the remote user!
@@ -318,7 +324,7 @@ export class SimplePeer {
throw new Error('While adding media, cannot find user with ID ' + userId);
}
const localStream: MediaStream | null = mediaManager.localStream;
- PeerConnection.write(new Buffer(JSON.stringify(mediaManager.constraintsMedia)));
+ PeerConnection.write(new Buffer(JSON.stringify({type: MESSAGE_TYPE_CONSTRAINT, ...mediaManager.constraintsMedia})));
if(!localStream){
return;
diff --git a/front/src/WebRtc/VideoPeer.ts b/front/src/WebRtc/VideoPeer.ts
index fb34f29e..f8bfa3f9 100644
--- a/front/src/WebRtc/VideoPeer.ts
+++ b/front/src/WebRtc/VideoPeer.ts
@@ -5,6 +5,8 @@ import {RoomConnection} from "../Connexion/RoomConnection";
const Peer: SimplePeerNamespace.SimplePeer = require('simple-peer');
+export const MESSAGE_TYPE_CONSTRAINT = 'constraint';
+export const MESSAGE_TYPE_MESSAGE = 'message';
/**
* A peer connection used to transmit video / audio signals between 2 peers.
*/
@@ -78,19 +80,27 @@ export class VideoPeer extends Peer {
});
this.on('data', (chunk: Buffer) => {
- const constraint = JSON.parse(chunk.toString('utf8'));
- console.log("data", constraint);
- if (constraint.audio) {
- mediaManager.enabledMicrophoneByUserId(this.userId);
- } else {
- mediaManager.disabledMicrophoneByUserId(this.userId);
+ const message = JSON.parse(chunk.toString('utf8'));
+ console.log("data", message);
+
+ if(message.type === MESSAGE_TYPE_CONSTRAINT) {
+ const constraint = message;
+ if (constraint.audio) {
+ mediaManager.enabledMicrophoneByUserId(this.userId);
+ } else {
+ mediaManager.disabledMicrophoneByUserId(this.userId);
+ }
+
+ if (constraint.video || constraint.screen) {
+ mediaManager.enabledVideoByUserId(this.userId);
+ } else {
+ this.stream(undefined);
+ mediaManager.disabledVideoByUserId(this.userId);
+ }
}
- if (constraint.video || constraint.screen) {
- mediaManager.enabledVideoByUserId(this.userId);
- } else {
- this.stream(undefined);
- mediaManager.disabledVideoByUserId(this.userId);
+ if(message.type === 'message') {
+ mediaManager.addNewMessage(message.name, message.message);
}
});
@@ -163,7 +173,7 @@ export class VideoPeer extends Peer {
private pushVideoToRemoteUser() {
try {
const localStream: MediaStream | null = mediaManager.localStream;
- this.write(new Buffer(JSON.stringify(mediaManager.constraintsMedia)));
+ this.write(new Buffer(JSON.stringify({type: MESSAGE_TYPE_CONSTRAINT, ...mediaManager.constraintsMedia})));
if(!localStream){
return;
diff --git a/front/webpack.config.js b/front/webpack.config.js
index 218b7374..f03c4fbc 100644
--- a/front/webpack.config.js
+++ b/front/webpack.config.js
@@ -45,7 +45,7 @@ module.exports = {
new webpack.ProvidePlugin({
Phaser: 'phaser'
}),
- new webpack.EnvironmentPlugin(['API_URL', 'DEBUG_MODE', 'TURN_SERVER', 'TURN_USER', 'TURN_PASSWORD', 'JITSI_URL', 'JITSI_PRIVATE_MODE'])
+ new webpack.EnvironmentPlugin(['API_URL', 'ADMIN_URL', 'DEBUG_MODE', 'TURN_SERVER', 'TURN_USER', 'TURN_PASSWORD', 'JITSI_URL', 'JITSI_PRIVATE_MODE'])
],
};
diff --git a/maps/characters/tenue_sg_1.png b/maps/characters/tenue_sg_1.png
new file mode 100644
index 00000000..e334340e
Binary files /dev/null and b/maps/characters/tenue_sg_1.png differ
diff --git a/maps/characters/tenue_sg_2.png b/maps/characters/tenue_sg_2.png
new file mode 100644
index 00000000..fe717a46
Binary files /dev/null and b/maps/characters/tenue_sg_2.png differ
diff --git a/website/dist/index.html b/website/dist/index.html
index 1e06204a..df76814d 100644
--- a/website/dist/index.html
+++ b/website/dist/index.html
@@ -10,6 +10,9 @@
gtag('js', new Date());
gtag('config', 'UA-10196481-11');
+ if (window.location.host.endsWith("localhost")){
+ window['ga-disable-UA-10196481-11'] = true;
+ }
@@ -82,22 +85,32 @@
-
Your workplace but better
- You are impatient to discover this new world? Click on "Work online" and meet new people or share this adventure with your colleagues and friends by clicking on "Work in private"
+ Meet your teammates
+
+ WorkAdventure preserves your social interaction while COVID is still out there.
+
+
+ Stay connected with your teamworkers, by creating your own online workspace to work remotely.
+
+
+ Stay connected with your clients by providing a dedicated digital place to organize meetings, workshops.
+
+
+ Stay connected with your future collaborators by organizing online event.
+
@@ -158,7 +171,7 @@
Click the button below to come and say hi!
- START IN PUBLIC MODE
+ TRY IT NOW !
@@ -166,10 +179,11 @@