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")
self.client.set_user_name(self._bot_name)
self.client.join(self._room_url, self._token, completion=self.call_joined)
self._my_participant_id = self.client.participants()["local"]["id"]
self.client.update_inputs(
{
self.client.join(
self._room_url,
self._token,
completion=self.call_joined,
client_settings={
"inputs": {
"camera": {
"isEnabled": True,
"settings": {
@@ -171,11 +172,8 @@ class DailyTransportService(BaseTransportService, EventHandler):
},
},
},
}
)
self.client.update_publishing(
{
},
"publishing": {
"camera": {
"sendSettings": {
"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:
self.client.start_transcription(self.transcription_settings)