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:
- Instead of using mediasoupClient.detectDevice(), use the new mediasoupClient.detectDeviceAsync().
- 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
- Here the issue report from which these changes come from: Detect embedded webview on iPadOS. by bclark-videra · Pull Request #280 · versatica/mediasoup-client · GitHub
- And here the PR introducing these new API additions: Improve device detection by ibc · Pull Request #324 · versatica/mediasoup-client · GitHub