@@ -56,19 +56,18 @@ def _on_room_token_refreshed(self) -> None:
5656 if room is None or room ._token is None or room ._server_url is None :
5757 return
5858 for stream in self ._audio_streams :
59- stream ._on_processor_credentials_updated (token = room ._token , url = room ._server_url )
59+ if not stream ._processor :
60+ continue
61+ stream ._processor ._on_credentials_updated (token = room ._token , url = room ._server_url )
6062
6163 def _push_processor_metadata_to_stream (self , stream : AudioStream , room : Optional [Room ]) -> None :
64+ if not stream ._processor :
65+ return
66+
6267 if room is None :
6368 # track left a room — clear processor's room context
64- # FIXME: This isn't really good, and I can't figure out what should happen here
65- # Closing the processor doesn't work (the track could get added to another room later)
66- # Empty values like this don't work, because it causes a drm::Error in the plugin
67- # Talk to lukas about this in a 1:1 and see if he can think of anything better
68- stream ._on_processor_stream_info_updated (
69- room_name = "" , participant_identity = "" , publication_sid = ""
70- )
71- # stream._on_processor_credentials_updated(token="", url="")
69+ stream ._processor ._on_stream_info_cleared ()
70+ stream ._processor ._on_credentials_cleared ()
7271 return
7372
7473 identity = ""
@@ -88,13 +87,13 @@ def _push_processor_metadata_to_stream(self, stream: AudioStream, room: Optional
8887 identity , pub_sid = local .identity , local_publication .sid
8988 break
9089
91- stream ._on_processor_stream_info_updated (
90+ stream ._processor . _on_stream_info_updated (
9291 room_name = room .name ,
9392 participant_identity = identity ,
9493 publication_sid = pub_sid ,
9594 )
9695 if room ._token is not None and room ._server_url is not None :
97- stream ._on_processor_credentials_updated (token = room ._token , url = room ._server_url )
96+ stream ._processor . _on_credentials_updated (token = room ._token , url = room ._server_url )
9897
9998 def _register_audio_stream (self , stream : AudioStream ) -> None :
10099 self ._audio_streams .add (stream )
0 commit comments