Merge pull request #30 from daily-co/unsub-video

cleanup client properties and unsubscribe from camera
This commit is contained in:
Moishe Lettvin
2024-02-27 13:16:20 -05:00
committed by GitHub

View File

@@ -149,11 +149,12 @@ class DailyTransportService(BaseTransportService, EventHandler):
Daily.select_speaker_device("speaker") Daily.select_speaker_device("speaker")
self.client.set_user_name(self._bot_name) self.client.set_user_name(self._bot_name)
self.client.join(self._room_url, self._token, completion=self.call_joined) self.client.join(
self._my_participant_id = self.client.participants()["local"]["id"] self._room_url,
self._token,
self.client.update_inputs( completion=self.call_joined,
{ client_settings={
"inputs": {
"camera": { "camera": {
"isEnabled": True, "isEnabled": True,
"settings": { "settings": {
@@ -171,11 +172,8 @@ class DailyTransportService(BaseTransportService, EventHandler):
}, },
}, },
}, },
} },
) "publishing": {
self.client.update_publishing(
{
"camera": { "camera": {
"sendSettings": { "sendSettings": {
"maxQuality": "low", "maxQuality": "low",
@@ -188,8 +186,16 @@ class DailyTransportService(BaseTransportService, EventHandler):
}, },
} }
} }
} },
},
) )
self._my_participant_id = self.client.participants()["local"]["id"]
self.client.update_subscription_profiles({
"base": {
"camera": "unsubscribed",
}
})
if self._token and self._start_transcription: if self._token and self._start_transcription:
self.client.start_transcription(self.transcription_settings) self.client.start_transcription(self.transcription_settings)