voxeet / voxeet-sdk-web

The Dolby.io Communications SDK for Web.
https://www.npmjs.com/package/@voxeet/voxeet-web-sdk
Other
4 stars 2 forks source link

Timeout if camera and microphone user authorization is too slow #21

Closed Schaeri closed 1 year ago

Schaeri commented 1 year ago

If a user has too long to confirm the authorization of camera and microphone when entering a video call, VoxeetSDK aborts the join command after 5 seconds. An error is displayed in the browser console: ExecutionTimeoutError: ''' execution timeout, limit:5000[ms]. Although the user has set the rights after the timeout.

After analyzing the problem, we found out that this problem occurs several times in our system. The users are simply too slow until they confirm the permission dialogs.

In general, the question is whether it really makes sense to timeout a browser operation that is controlled by the user (browser API call has no timeout).

Would it be possible to extend the SDK in such a way that no timeout occurs for the authorization of camera/microphone by the user or that we can pass this timeout via configuration?

FabienLavocat commented 1 year ago

Hi @Schaeri, I apologize for the delay. Yes, there is a 5 second timeout to prevent long running actions, but this seems a bit short so I am going to request our team to increase that number or maybe removing this timeout completely if that makes sense.

Schaeri commented 1 year ago

Thanks a lot for your answer. To increase, remove or make the timeout configurable would help a lot in our scenario.

FabienLavocat commented 1 year ago

@Schaeri we actually delivered this improvement yesterday as I was writing this answer in SDK 3.11.0 Beta 2, could you please give it a try and let me know if this new behavior is better.

christianzingg commented 1 year ago

We've tested the behaviour with "voxeet-web-sdk-3.11.0-beta.2". There is an improvement but we discovered other exceptions when waiting for a longer time.

When waiting for about 40 secounds until allowing camera/microphone the communication works. Nevertheless the Dev-Tools console output shows errors/warnings as below: image

When waiting for a longer time the communication cannot be establised. The Dev-Tools console output shows errors as below: image

FabienLavocat commented 1 year ago

In this 3.11.0 Beta 2 version of the Web SDK, we have added some extra dependencies that need to be copied over to your environment, please add the following files:

audio_dnr.bin
dapm_impl.wasm
dvdnr.wasm

The problem that you are seeing when you wait over 40 seconds, is because the conference has a TTL (Time To Live). If nobody arrives in the conference (after being created) within that TTL (default is 0 but minimum will be about 30 seconds), then the conference will be destroyed. So when the end user grants the permissions, the conference had already been destroyed. You could increase that value when creating the conference.

I am closing this ticket since the original ask is being delivered in SDK 3.11.0.

christianzingg commented 1 year ago

In this 3.11.0 Beta 2 version of the Web SDK, we have added some extra dependencies

@FabienLavocat are these extra dependencies only part of the beta version or will they be included in all upcoming versions? These extra dependencies have an additional payload size of more than 5 MB - that's a lot for a mobile application! Why are they needed?

FabienLavocat commented 1 year ago

Those new dependencies have been introduced in the first bet of 3.11.0, it will be part of the GA release (and upcoming versions). Since the mobile browsers do not support WASM, those files will not be loaded on mobile. And those are used for our enhanced version of the noise reduction technology.