Git Product home page Git Product logo

Comments (4)

jbg avatar jbg commented on August 26, 2024 1

Thanks for the patches. I noticed that lib-jitsi-meet has some special handling for the fact that JaaS returns more than one web-socket, but instead of taking the first they are filtering them out based on the domain. I'm going to copy that behaviour here to improve compatibility with JaaS.

from gst-meet.

rodarima avatar rodarima commented on August 26, 2024

I was able to work around it by using these two patches:

First it seems there is a missing argument in gstmeet_connection_new():

From f775b23102f50bb9a776e9001c3c103d02447f32 Mon Sep 17 00:00:00 2001
From: Rodrigo Arias Mallo <[email protected]>
Date: Sat, 24 Jun 2023 11:34:37 +0200
Subject: [PATCH 1/2] Add room name argument in gstmeet_connection_new()

---
 lib-gst-meet-c/src/lib.rs | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib-gst-meet-c/src/lib.rs b/lib-gst-meet-c/src/lib.rs
index 9d4be2d..2eb4f65 100644
--- a/lib-gst-meet-c/src/lib.rs
+++ b/lib-gst-meet-c/src/lib.rs
@@ -80,16 +80,19 @@ pub unsafe extern "C" fn gstmeet_connection_new(
   context: *mut Context,
   websocket_url: *const c_char,
   xmpp_domain: *const c_char,
+  room_name: *const c_char,
   tls_insecure: bool,
 ) -> *mut Connection {
   let websocket_url = CStr::from_ptr(websocket_url);
   let xmpp_domain = CStr::from_ptr(xmpp_domain);
+  let room_name = CStr::from_ptr(room_name);
   (*context)
     .runtime
     .block_on(Connection::new(
       &websocket_url.to_string_lossy(),
       &xmpp_domain.to_string_lossy(),
       Authentication::Anonymous,
+      &room_name.to_string_lossy(),
       tls_insecure,
     ))
     .map(|(connection, background)| {
-- 
2.41.0

And here I just parse it as a vector and then take the first element.

From fe38d5f87173595848f1a5e1f442bb0822093f59 Mon Sep 17 00:00:00 2001
From: Rodrigo Arias Mallo <[email protected]>
Date: Sat, 24 Jun 2023 11:33:18 +0200
Subject: [PATCH 2/2] Parse web-socket as a list

For now only the first element is considered.
---
 jitsi-xmpp-parsers/src/jingle_ice_udp.rs | 2 +-
 lib-gst-meet/src/jingle.rs               | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/jitsi-xmpp-parsers/src/jingle_ice_udp.rs b/jitsi-xmpp-parsers/src/jingle_ice_udp.rs
index 39fc660..fb1a48a 100644
--- a/jitsi-xmpp-parsers/src/jingle_ice_udp.rs
+++ b/jitsi-xmpp-parsers/src/jingle_ice_udp.rs
@@ -24,7 +24,7 @@ generate_element!(
     fingerprint: Option<Fingerprint> = ("fingerprint", JINGLE_DTLS) => Fingerprint,
 
     /// Details of the Colibri WebSocket
-    web_socket: Option<WebSocket> = ("web-socket", JITSI_COLIBRI) => WebSocket
+    web_socket: Vec<WebSocket> = ("web-socket", JITSI_COLIBRI) => WebSocket
   ]
 );
 
diff --git a/lib-gst-meet/src/jingle.rs b/lib-gst-meet/src/jingle.rs
index 27479ca..0b94982 100644
--- a/lib-gst-meet/src/jingle.rs
+++ b/lib-gst-meet/src/jingle.rs
@@ -1466,7 +1466,7 @@ impl JingleSession {
       remote_ssrc_map,
       _ice_agent: ice_agent,
       accept_iq_id: Some(accept_iq_id),
-      colibri_url: ice_transport.web_socket.clone().map(|ws| ws.url),
+      colibri_url: ice_transport.web_socket.first().map(|ws| ws.url.clone()),
       colibri_channel: None,
       stats_handler_task: None,
       pipeline_state_null_rx,
-- 
2.41.0

However I don't listen anything from the browser, although at least the "robot" participant appears unmuted and with the opus codec for audio. Maybe I'm messing something up with the gst pipeline. I attached the whole log with:

% GST_DEBUG=2 target/debug/gst-meet -v --nick=robot --web-socket-url=wss://meet.jit.si/xmpp-websocket --room-name=testing-gst  --send-pipeline="audiotestsrc wave=sine is-live=true ! audioconvert ! audioresample ! opusenc name=audio" >log.txt 2>&1

log.txt

from gst-meet.

rodarima avatar rodarima commented on August 26, 2024

Nevermind, the audio was a problem of Firefox. In Chromium and on my phone is working fine with the above patches!

from gst-meet.

daimoc avatar daimoc commented on August 26, 2024

Hi @jbg , do you have any update on this patch integration ?
The last gst-met still have this error when I test it with meet.jit.si.

from gst-meet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.