From 3a754afa1bd13d038b1023520ec8a5296ad2669e Mon Sep 17 00:00:00 2001 From: Matvei Andrienko Date: Wed, 2 Oct 2024 16:04:51 +0200 Subject: [PATCH] feat: manual video quality selection (#1486) Adds APIs to manually override incoming video quality: ## Client ### `call.setPreferredIncomingVideoResolution(resolution?: VideoDimension, sessionIds?: string[])` Specify preference for incoming video resolution. The preference will be matched as close as possible, but actual resolution will depend on the video source quality and client network conditions. Will enable incoming video, if previously disabled. Passing `undefined` resolution clears previously set preferences. Optionally specify session ids of the participants this preference has effect on. Affects all participants by default. ### `call.setIncomingVideoEnabled(enabled: boolean)` Enables or disables incoming video from all remote call participants, and clears any preference for preferred resolution. ## React SDK New call state hook added: ### `useIncomingVideoSettings()` Returns incoming video settings for the current call, including global and per-participant manual video quality overrides. ## Demo App Video quality selector added to the settings modal in `react-dogfood`. On Pronto, it's also visible in call controls: ![](https://github.com/user-attachments/assets/8cf111d5-2924-4067-9aca-59f51dfb1a8e) ![](https://github.com/user-attachments/assets/eac779c0-d120-402d-b7b9-ef3033b56d1e) ## Internal APIs updated ### `callState.updateParticipantTracks` Call class no longer has a slightly incorrectly named `updateSubscriptionsPartial` method. We want to avoid the Call class dealing with subscriptions at all - this is a domain of the DynascaleManager. Instead, the new `updateParticipantTracks` should be used on the CallState object. ### Disabling