mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-12-22 18:16:28 +00:00
webrtc: livekit: Set connection earlier during setup
Otherwise it's not available yet when handling the initial participants that are already in the session when joining. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1794>
This commit is contained in:
parent
cd2b641321
commit
dcb072ee23
1 changed files with 10 additions and 13 deletions
|
@ -672,6 +672,16 @@ impl SignallableImpl for Signaller {
|
|||
}
|
||||
});
|
||||
|
||||
let connection = Connection {
|
||||
signal_client,
|
||||
signal_task,
|
||||
pending_tracks: Default::default(),
|
||||
early_candidates: Some(Vec::new()),
|
||||
channels: None,
|
||||
participants: HashMap::default(),
|
||||
};
|
||||
*imp.connection.lock().unwrap() = Some(connection);
|
||||
|
||||
if imp.is_subscriber() {
|
||||
imp.obj()
|
||||
.emit_by_name::<()>("session-started", &[&"unique", &"unique"]);
|
||||
|
@ -724,19 +734,6 @@ impl SignallableImpl for Signaller {
|
|||
),
|
||||
);
|
||||
|
||||
let connection = Connection {
|
||||
signal_client,
|
||||
signal_task,
|
||||
pending_tracks: Default::default(),
|
||||
early_candidates: Some(Vec::new()),
|
||||
channels: None,
|
||||
participants: HashMap::default(),
|
||||
};
|
||||
|
||||
if let Ok(mut sc) = imp.connection.lock() {
|
||||
*sc = Some(connection);
|
||||
}
|
||||
|
||||
imp.obj().emit_by_name::<()>(
|
||||
"session-requested",
|
||||
&[
|
||||
|
|
Loading…
Reference in a new issue