Another v3 sample code project: daily-co/mediasoup-sandbox

We’ve been experimenting with v3, which is fantastic! Thank you for all the hard work that went into this release.

In case it’s useful to other people, here is our “sandbox” code for testing both cross-browser quirks, and our understanding of v3 code structure.

https://github.com/daily-co/mediasoup-sandbox/tree/master/single-page

Currently the sample code includes:

  • setting up transports, producers, and consumers
  • switching to a different input device and replacing a track
  • screen sharing
  • subscribing to and unsubscribing from tracks
  • pausing tracks for sender and receiver independently
  • simulcast
  • setting maximum simulcast layer when sending
  • setting maximum simulcast layer when receiving
  • display of stats
  • display of “active speaker”

Just a tip: Ensure you use await in all async calls of the mediasoup APi. For example consumer.pause(), consumer.setPreferredLayers(), etc. All them can throw if, for example, the consumer is closed (which can happen at the time you call those methods if the associated producer was closed before).

Thank you!

This topic was automatically closed after 2 days. New replies are no longer allowed.