Commit graph

394 commits

Author SHA1 Message Date
David Négrier 5cf5e0ce2b Changing the way we focus a video element.
Now, only one video element can be important.
2021-06-17 10:07:27 +02:00
David Négrier ac7fa164b6 Adding importance handling 2021-06-17 10:07:27 +02:00
David Négrier e7b0f859a5 Migrating the video overlay in Svelte (WIP) 2021-06-17 10:07:27 +02:00
kharhamel a5779095f8 FIX: cowebsite resize now works on touchscreens 2021-06-15 10:55:18 +02:00
David Négrier ac911cff4b Properly escaping name in discussion manager 2021-06-07 10:42:08 +02:00
David Négrier 9f09dc9df2 Adding a special error message for non Safari browsers on iOS < 14.3 2021-06-04 16:19:41 +02:00
David Négrier 469cac9656 Making sure the "stopped screensharing" log is not displayed on startup 2021-06-04 16:08:02 +02:00
GRL a58d6353cd Merge branch 'develop' of github.com:thecodingmachine/workadventure into iphoneCompatibility 2021-06-04 16:02:46 +02:00
David Négrier fd4f09588e Adding "playsinline" tag in remote <video> tags for iPhone compatibility (test) 2021-06-04 14:16:21 +02:00
David Négrier a8b91561dc Merge branch 'master' of github.com:thecodingmachine/workadventure into develop 2021-06-04 10:07:57 +02:00
David Négrier b7ac3b8fad Generating HTML link using DOM manipulation rather that string manipulation 2021-06-04 10:07:12 +02:00
Gregoire Parant e190c3b8d6 Merge branch 'master' into develop
# Conflicts:
#	front/src/WebRtc/MediaManager.ts
2021-06-03 20:15:50 +02:00
grégoire parant eec15b38bb
Hot Fix open & close iframe (#1115) 2021-06-03 20:05:39 +02:00
David Négrier 50e994c674 Attempt to switch bubble sound playing into Phaser
In iOS, we cannot trigger a playing sound if it does not start from a user gesture.
This is a huge bummer for a notification sound!

This is an attempt to switch sound playing to Phaser, which is using under the hood the WebAudio API.
This might solve the issue.
2021-06-03 15:40:44 +02:00
David Négrier 80a698d891 Preventing crash on iOS
On iOS, audio elements must be triggered by a user gesture.
We are catching exceptions thrown in order not to crash.

In the future, we need to find another way to play sounds.
2021-06-03 14:53:58 +02:00
David Négrier 25f4adc7ad Fixing Safari on MacOS compatibility
The null safe operator is not recognized and was not encoded by Webpack in Svelte expressions (inside {})

+ The Notification API of Safari is old and broken and we need to account for that.
2021-06-03 10:17:38 +02:00
David Négrier 9d6b597552 Starting working towards migrating the help camera popup 2021-06-01 09:08:02 +02:00
David Négrier 11fb0aa1d8 Fixing typo 2021-05-31 17:53:27 +02:00
David Négrier 13d3227323 Migrating LoginScene to Svelte 2021-05-31 17:03:29 +02:00
GRL b8873d1277 selectCompanionScene work with svelte 2021-05-31 12:06:11 +02:00
David Négrier 90176da888 MediaManager cleanup
- Removing the last reference to the local video stream. Everything is now fetched from the store.
- Remvoing commented code
2021-05-29 22:34:38 +02:00
David Négrier b7f1461405 Removing listeners from MediaManager.
SimplePeer now reacts only to stores.
2021-05-29 22:04:08 +02:00
David Négrier b3aa8975e9 Switching the video feedback in Svelte 2021-05-28 16:20:02 +02:00
David Négrier 4b77e8c577 Switching Camera controls in Svelte
Moving Camera controls out of HTML + MediaManager and into Svelte components
2021-05-28 09:31:04 +02:00
GRL 5565ddd3f4 Merge branch 'develop' of github.com:thecodingmachine/workadventure into metadataScriptingApi 2021-05-26 17:22:37 +02:00
David Négrier 4c4f310b79 The share screen button is now displayed only when screen sharing makes sense.
Also, fixed the button not aligned bug
2021-05-26 12:12:47 +02:00
David Négrier dd428bc1e1 Migrating screen sharing to using a store 2021-05-26 12:12:47 +02:00
David Négrier d32df13f1b Camera now show up when someone is moving and hides 5 seconds after we stop moving.
Also, added an animation to show/hide the webcam.
2021-05-26 12:12:46 +02:00
David Négrier 8af8ccd54b Migrating MediaManager game part to Svelte store 2021-05-26 12:12:18 +02:00
David Négrier 28d78a7988 Switching MediaManager to using a Svelte store
This allows cleaner and more expressive code, especially regarding whether the webcam should be on or off.
2021-05-26 12:11:16 +02:00
GRL 201fcf6afa Merge branch 'gamestate-api-read' of github.com:jonnytest1/workadventure into metadataScriptingApi 2021-05-18 15:18:35 +02:00
kharhamel a23e72454d FEATURE: added the env variable DISABLE_DIRTY_CHECKS 2021-05-17 14:47:34 +02:00
David Négrier fe573893a1
Merge pull request #1039 from thecodingmachine/importsNotUsedAsValues
Setting "importsNotUsedAsValues": "error"
2021-05-13 19:43:34 +02:00
David Négrier 8c1e01566a Upgrading all dependencies in front
Upgrading to Webpack 5, Typescript 4, ...
2021-05-12 10:35:14 +02:00
David Négrier 4d4f845b9e Setting "importsNotUsedAsValues": "error"
Turning the "importsNotUsedAsValues" TS config value to "error".
This will require us to use `import type` instead of `import` when we are importing a value that is only used as a type (and therefore that is dropped by the Typescript compiler).

Why this change?
This is a requirement to be able to use Svelte in the future. See https://github.com/sveltejs/svelte-preprocess/issues/206#issuecomment-663193798
2021-05-12 09:13:25 +02:00
TabascoEye 2d8997c6d7 turning noise suppresion back on
turning AGC off was a good idea, disabling noise suppresion with it was not.
=> should all end up in the "settings" menu in the end
2021-05-11 18:14:42 +02:00
TabascoEye 627db30410
turning noise suppresion back on
turning AGC off was a good idea, disabling noise suppresion with it was not.
=> should all end up in the "settings" menu in the end
2021-05-11 17:38:28 +02:00
David Négrier 0c279750be Merge branch 'master' of github.com:thecodingmachine/workadventure into develop
# Conflicts:
#	front/src/Phaser/Game/GameScene.ts
2021-05-11 16:43:34 +02:00
David Négrier ad39b43df3 Closing game webcame in Jitsi
When stepping in Jitsi, the game webcam (from mediaManager) was not shut down.
And when enabling/disabling the webcam in Jitsi, the webcam in mediaManager was also
enabled/disabled. This PR fixes those issues.

It also fixes a race condition when closing a Jitsi where the mic/cam would be enabled at the same time.
2021-05-11 14:52:51 +02:00
David Négrier 23bf78a026 Refactoring code to use the "visibilitychange" event
Using the "visiblitychange" event instead of relying on a "trick" related to RAF being disabled when a window is not open allows us to have cleaner code.
Bonus: the recursive call to "setTimeout" is gone, so the stacktrace growing indefinitely is gone too.
This should make the application a bit more stable.
2021-05-11 10:56:50 +02:00
Gregoire Parant 52b1c6733b Notification & Camera
- Notification when user is first and not focus on the tab
- Camera focus when user is in discussion circle and back on tab with previous config camera settings
- Camera stay blur if user is in discussion circle and not back on the tab

# Conflicts:
#	front/src/WebRtc/MediaManager.ts
2021-05-11 10:13:38 +02:00
jonny 8cef4f6e90 Merge remote-tracking branch 'remotes/workadventure-main/develop' into gamestate-api-read
# Conflicts:
#	front/src/Api/IframeListener.ts
2021-05-10 21:48:11 +02:00
grégoire parant 0fd743bcac
HotFix sound meter (#1029) 2021-05-10 20:49:17 +02:00
David Négrier 6b4d064f19 Merge branch 'develop' of github.com:thecodingmachine/workadventure into skiprender2
# Conflicts:
#	front/src/Phaser/Game/GameScene.ts
#	front/src/index.ts
2021-05-06 16:25:13 +02:00
grégoire parant 71eb3f3b69
Improvement feature circle discussion (#977)
* Improvment circle discussion
 - Change to lissen start event of WebRTC connection

* Update help allow navigator and waring message
 - Show warning message.
 - Use help camera allow setting to show modal and help user.
 - Change feature to show the modal only when user have need the information on allow navigator access

* Create soud for video discussion
2021-05-05 01:49:04 +02:00
David Négrier 84bd5eff50 Bump Phaser version
This reverts commit f2c3d6f158.
Also, updates all dependencies to their latest allowed version.

# Conflicts:
#	front/package.json
#	front/yarn.lock
2021-04-21 10:35:38 +02:00
David Négrier 06f6b3153c
Merge pull request #913 from ClementVieilly75/FTUEPopup
Ftue popup
2021-04-19 16:24:02 +02:00
DESKTOP-FMM8UI0\CLV 7e6a8b477d Debug state of share Screen button 2021-04-19 15:16:56 +02:00
Kharhamel 3874b2bc2b
Merge pull request #688 from tabascoeye/patch-2
disable automatic gain control on microphone
2021-04-13 18:20:56 +02:00
kharhamel f82551016a FIX: in vertical mode, the coWebSite now open from the top 2021-04-13 11:34:14 +02:00
PizZaKatZe edd4e9e95d Add touch support for Jitsi and website triggers 2021-04-13 00:23:40 +02:00
Johannes Berthel 441416f312 use frame rate setting for initialization 2021-03-30 22:38:44 +02:00
David Négrier aaaa192b71 Merge branch 'develop' of github.com:thecodingmachine/workadventure into iframe_api
# Conflicts:
#	front/dist/.gitignore
#	front/dist/index.tmpl.html
#	front/src/Phaser/Game/GameScene.ts
#	front/src/WebRtc/CoWebsiteManager.ts
2021-03-28 16:53:15 +02:00
kharhamel 99e6743c01 FIX: resizing on wide screen on chrome now use the correct coordinates 2021-03-25 14:35:51 +01:00
kharhamel 43921e3fcc FIX: fixed a bug with fullscreen mode 2021-03-24 15:51:18 +01:00
Kharhamel 7765775df5
Merge pull request #825 from workadventure-xce/audio_player_improvements
Audio player improvements
2021-03-23 14:07:20 +01:00
PizZaKatZe 599fdd6ceb Fix group icons and audio attenuation 2021-03-22 20:09:11 +01:00
TabascoEye e6accd711d Store muted setting of audio player in local storage
This commit was originally authored by @TabascoEye, then rebased and
improved by @pizkaz:

* refactors local user storage, adding audio player settings
* stores "muted" state of audio player in local store
2021-03-22 20:09:11 +01:00
PizZaKatZe fdbcd98a9a Implement audio volume and loop properties 2021-03-22 20:09:11 +01:00
PizZaKatZe 132c6c9ad6 Fix volume auto-reduction in conversations 2021-03-22 20:09:09 +01:00
PizZaKatZe 5a7e67f5df Reflect volume change in audio control 2021-03-22 20:06:55 +01:00
David Négrier f9a2097bc9
Merge pull request #828 from thecodingmachine/develop
Deploy 2021-03-22
2021-03-22 16:42:28 +01:00
DESKTOP-FMM8UI0\CLV 3ef3561b57 no message 2021-03-22 16:10:21 +01:00
PizZaKatZe 318c63ab90 Fix Jitsi integration
Jitsi iframes are rendered directly in the cowebsite div next to the
cowebsite > main element. This patch fixes the situation.
2021-03-22 11:36:14 +01:00
kharhamel 32fdfaab35 edited CoWebsiteManager to manage vertical resizing 2021-03-18 16:11:22 +01:00
kharhamel f9c8b4131c added fullscreen 2021-03-17 18:57:00 +01:00
kharhamel 272be3eba0 improve the visual of the cowebsite 2021-03-17 18:35:19 +01:00
kharhamel 3f6c61633a FEATURE: complete control over the iframe size 2021-03-17 18:34:12 +01:00
David Négrier ffb5823b2a Adding the ability to specify a custom Jitsi URL directly in the map
This feature allows to add a "jitsiUrl" property in the map.
As a result, you can use for a given Jitsi room a custom instance of Jitsi.
Using "jitsiUrl" will only work with public Jitsi instances (authentication is not supported when "jitsiUrl" property is provided)

The Jitsi external_api.js script is now lazily loaded.
2021-03-16 20:37:12 +01:00
DESKTOP-FMM8UI0\CLV fa4d917729 Resolve conflit with GameScene.ts 2021-03-11 16:03:39 +01:00
Kharhamel 21cc842c33
Merge pull request #793 from thecodingmachine/adminWorldsLimit
FEATURE: the connexion error an user can get when a world is full is now correctly treated.
2021-03-09 17:45:43 +01:00
kharhamel 8abc34c631 FEATURE: the connexion error an user can get when a world is full is now correctly traited. Also remove a redundant adminApi call 2021-03-09 16:34:19 +01:00
David Négrier 1e002f93ed Implementation of openPopup script method (WIP) 2021-03-09 16:21:14 +01:00
David Négrier 7d67f55012 Improving security: only iframes opened with "openWebsiteAllowApi" property are now able to send/receive messages. 2021-03-06 16:00:07 +01:00
David Négrier e927e0fa16 Adding ability to listen to user types chat messages using WA.onChatMessage 2021-03-06 15:26:07 +01:00
David Négrier eb93a04341 Adding an API for inter-iframe communication
Adds a first version of an API to communicate between an iFrame opened by WorkAdventure and WorkAdventure itself.
The first API method is a method allowing to add messages in the chat, from the iFrame.

Comes with a test file.
2021-03-04 19:00:00 +01:00
David Négrier bf8e8bf777
Merge pull request #689 from znerol-forks/feature/cowebsite-load-map-relative-url
Allow URLs relative to map base in iframe / openWebsite
2021-03-04 18:21:48 +01:00
David Négrier 6e9c715980
Merge pull request #739 from t10r/fix/multi-user-videochat-mode
fix multi user videochat mode
2021-02-19 14:54:38 +01:00
David Négrier 6f06b92395
Merge pull request #760 from thecodingmachine/turncredentials
Fixing screensharing Coturn credentials
2021-02-18 14:09:33 +01:00
David Négrier 13a20a0ef0 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.
2021-02-18 11:52:30 +01:00
grégoire parant 3a1b2490ef
Merge pull request #758 from thecodingmachine/jitsiConfig
Jitsi config
2021-02-18 10:12:16 +01:00
Gregoire Parant 8a2954eab9 Fix new conf feature 2021-02-18 09:38:27 +01:00
grégoire parant 13078489c6
Merge pull request #757 from thecodingmachine/jitsiConfig
Merge Jitsi config
2021-02-17 20:34:31 +01:00
Gregoire Parant 5ddf909fe6 Remove unless export constante 2021-02-17 20:26:33 +01:00
Gregoire Parant fff0cbc3f6 Revert message exit 2021-02-17 19:40:00 +01:00
Gregoire Parant 83fc7d0cc0 Merge branch 'develop' into exitTriggerAction
# Conflicts:
#	front/src/Phaser/Game/GameScene.ts
2021-02-17 19:28:41 +01:00
Gregoire Parant baae1e8125 Update to restore previous config 2021-02-17 19:21:37 +01:00
Gregoire Parant e8b1b286a3 Merge Jitsi config 2021-02-17 18:49:55 +01:00
David Négrier ddcb5ede59
Merge pull request #742 from znerol-forks/fix/huge-jitsi-url
Fix jitsi URLs growing indefinitely in length
2021-02-16 19:52:56 +01:00
David Négrier 9affa36608
Merge pull request #746 from thecodingmachine/turncredentials
[Feature] Connect to a Coturn server using REST API
2021-02-16 19:32:21 +01:00
kharhamel e21868ed3b FIX: current audio and video status are overwriten by jitsi config 2021-02-16 18:25:23 +01:00
David Négrier 6b00355ea8 Fixing WebRtc user name / password when using TURN REST API 2021-02-16 18:13:30 +01:00
David Négrier 12ef2820bf Refactoring parameters passed to ScreenSharingPeer 2021-02-16 11:08:03 +01:00
David Négrier cdb3cfdc81 [Feature] Connect to a Coturn server using REST API
This allows connecting to a TURN server with temporary passwords.
The passwords are expiring after 4 hours.
2021-02-16 11:06:05 +01:00
znerol 9670f92a08 Allow URLs relative to map base in iframe / openWebsite 2021-02-16 10:53:50 +01:00
znerol 4fcdad1551 Fix jitsi URLs growing indefinitely in length 2021-02-15 10:36:56 +01:00
Tim Schlüter 05b829da70 fix multi user videochat mode 2021-02-13 21:19:45 +01:00
kharhamel 0c892e0243 FEATURE: implemented a client side blacklist 2021-02-12 19:15:24 +01:00
Gregoire Parant b92b7304b0 Fix to use clear All Keys 2021-02-11 21:48:24 +01:00
David Négrier 64cd07cc39
Merge pull request #726 from thecodingmachine/fixHtmlAnchorElement
Update to use Anchor type
2021-02-11 18:08:52 +01:00
David Négrier bc35ade8df Improving urlify 2021-02-11 18:03:14 +01:00
David Négrier 42aee9f5c8
Merge pull request #722 from thecodingmachine/jitsislugify
Slugifies the Jitsi room name
2021-02-11 17:17:58 +01:00
Gregoire Parant c5916e7b6d Fix ci 2021-02-11 15:06:12 +01:00
Gregoire Parant 0d104cb307 Update to use Anchor html 2021-02-11 14:49:32 +01:00
David Négrier 91fddd6893 Slugifies the Jitsi room name
This will avoid Jitsi breaking on unexpected characters and displaying a HTTP 404 error.
2021-02-10 13:51:17 +01:00
David Négrier 8389fad877 Disabling video background by default on Jitsi
(because it consumes a lot of CPU)
2021-02-10 11:20:05 +01:00
David Négrier e7ddeedb3e Disabling Join/Leave notifications by default 2021-02-10 11:13:47 +01:00
Mickael Chimansky 5cb9624b0b fixup! Jitsi config properties 2021-02-09 20:31:49 +01:00
Mickael Chimansky 9c4d0aa32f Jitsi config properties 2021-02-09 16:05:21 +01:00
Sebastian Wiesendahl b6807d274b Add STUN_SERVER env variable with fallback
default: "stun:stun.l.google.com:19302"

Make STUN_SERVER available for app config

Change also the STUN_SERVER for ScreenSharingPeer
2021-02-09 13:09:17 +01:00
grégoire parant c41c058fb0
Merge pull request #527 from oliverlorenz/feature/iframe-feature-policy
feat: adds property openWebsitePolicy property to set "allow" property in iframe
2021-02-03 17:38:35 +01:00
David Négrier 9c9f046b16
Merge pull request #668 from piitaya/fix_game_not_centered
Use canvas instead of div container for calculating the game size
2021-02-03 14:06:09 +01:00
grégoire parant f2b9f6c92a
Merge pull request #686 from thecodingmachine/publicReportedUser
Permit puiblic report
2021-02-02 18:09:25 +01:00
Gregoire Parant ac2bc76239 change style report button 2021-01-30 14:08:11 +01:00
TabascoEye 58b7d85bf3
bugfix and linting
* use 'const' on constraints which never change
* also re-enable constraints ater mic was re-enabled (after mute/unmute)
2021-01-30 02:24:36 +01:00
TabascoEye 31a0d08c76
disable automatic gain control on microphone
AGC really makes the soundqulity way worse than it could be.
Especially since it is so noticeable when entering a Jitsi where AGC is disabled (and suddenly some people sound much better).

In the long run, this should probably be configurable. On the other hand the setting changes the audio _going out_ from a user, so it might be hard for him to judge which settings are a good or a bad idea…
2021-01-30 02:13:03 +01:00
Gregoire Parant 7eb38fae83 Permit puiblic report
- Create report html
 - Add report flag
2021-01-29 21:09:10 +01:00
Paul Bottein a8b5e8599f use HTMLCanvasElement 2021-01-28 21:09:41 +01:00
Paul Bottein 608a9ad347 use type guard 2021-01-28 21:07:17 +01:00
Paul Bottein b52c546a8c Use canvas instead of div container for calculating the game size 2021-01-28 21:04:43 +01:00
Tony Amirault 72799d4f0e added end of line 2021-01-28 15:31:09 +01:00
Tony Amirault cdbae5fa43 use type guard on html element 2021-01-27 18:33:40 +01:00
Gregoire Parant beb53df364 Error problem open new map 2021-01-25 13:18:57 +01:00
Gregoire Parant 5f88a1a0b9 Exit trigger action
- [x] Add trigger message custom
- [x] Add trigger for exit map
- [x] Update documentation
2021-01-25 12:21:40 +01:00
kharhamel 4ad7f4d5a3 changed the color of the chat links and unit test 2021-01-22 15:06:41 +01:00
David Négrier 3d84a9c8cd Turning French 'Moi' into English 'Me' 2021-01-21 10:16:08 +01:00
David Négrier aa9a21ad4c
Merge pull request #581 from Informatic/fix/firefox-webcam
front: fix webrtc webcam feed on Firefox
2021-01-20 16:27:45 +01:00
grégoire parant 0f7f42b6f1
Merge pull request #566 from thecodingmachine/screanSharing
Fix screen sharing
2021-01-12 19:24:06 +01:00
Piotr Dobrowolski 7f8cc76eb7 front: fix webrtc webcam feed on Firefox
Seems like Firefox doesn't support specifing both exact and ideal
constraints...
2021-01-10 17:05:48 +01:00
Gregoire Parant e8f1b2d048 Add clear array peer connection sharing 2021-01-07 12:58:45 +01:00
Gregoire Parant a88ad3cf4d Dont delete PeerSharingConnection because it will be resuse
When user try to screen charing with same user, the event send is not a offer but renegociation. So could clear arry only when user out of circle.
2021-01-07 12:13:12 +01:00
Gregoire Parant 018f01e878 Increase stability camera and microphone permission 2021-01-07 11:02:00 +01:00
Gregoire Parant 8c89b5e0b1 Permit to change style when getCamera was ready and permission accorded 2021-01-07 10:30:28 +01:00
Gregoire Parant d4c7a20dfa Update feedback @moufmouf 2021-01-07 09:42:11 +01:00
Gregoire Parant 1659fa400f Increase stability to force stopped screen sharing 2021-01-06 17:09:17 +01:00
Gregoire Parant 73d7e798e9 Upgrade conversion
When user send multi message, scroll on last message
2021-01-06 17:08:13 +01:00
Gregoire Parant 4397ff7712 Update style and focus keyboard 2021-01-06 13:36:18 +01:00
Gregoire Parant 438469ae24 Verify URL in message 2021-01-06 12:20:02 +01:00
Piotr Dobrowolski 28d687e338 front: implement map sounds 2021-01-04 16:57:31 +01:00
Oliver Lorenz 7c89cf0e47 feat: adds property openWebsitePolicy to set allow property in iframe 2020-12-29 23:17:16 +01:00
Gregoire Parant ca1cd388e8 Fix lint 2020-12-17 16:39:11 +01:00
Gregoire Parant 08ce954f56 Add new click event to close co website 2020-12-17 16:36:01 +01:00
kharhamel 069f2f1cec FEAT: prototype game menu using html elements, better icon for text chat 2020-12-15 16:37:57 +01:00
kharhamel a1aedaa594 FEAT: now play a sound when a user quit the webrtc group 2020-12-11 16:01:31 +01:00
Kharhamel 95665a28d5
Merge pull request #456 from thecodingmachine/performance
Performance settings
2020-12-03 14:33:12 +01:00
kharhamel 28b0229c76 FIX: disabled pingCameraStatus and reduced the amount of errors thrown in console 2020-11-27 17:06:47 +01:00
Gregoire Parant 27634a61ee Create menu to set your quality video and game 2020-11-27 16:24:07 +01:00
grégoire parant c5af6df7fa
Merge pull request #448 from thecodingmachine/report-button
Report button discussion
2020-11-23 20:48:52 +01:00
Gregoire Parant 3d32fb90dc Add constant 2020-11-23 20:34:05 +01:00
Gregoire Parant 2812387650 Merge branch 'develop' into action-button 2020-11-23 20:08:19 +01:00