mediasoup-client 3.10.0 released with new and better browser detection

mediasoup-client 3.10.0 has been released and it comes with a new and much better browser detection system that makes it possible, for example, to use mediasoup-client in Safari on iPad in “desktop mode” with automatic detection (this failed in previous mediasoup-client versions).

In order to use the new detection API, the application should migrate some API calls to new ones:

  1. Instead of using mediasoupClient.detectDevice(), use the new mediasoupClient.detectDeviceAsync().
  2. Instead of creating a mediasoupClient.Device using the Device constructor, use the new async Device.factory() class method.

Obviously, due the async nature of the new APIs, some changes maybe needed in your application. You can no longer create the mediasoup-client Device instance within the constructor of your classes but instead need to do it within async methods or factory functions. Or if you have some async connect() or similar method in your class, you can create there the Device instance by using:

this.mediasoupClientDevice = await mediasoupClient.Device.factory();

More info

3 Likes