jibri icon indicating copy to clipboard operation
jibri copied to clipboard

feat: refactor, remove hardcoded youtube rtmp url

Open roanta2 opened this issue 2 years ago • 7 comments

Refactoring on livestream part to not treat youtube as a special case. So now you need to provide the entire rtmp url ( stream url + key).

roanta2 avatar Apr 24 '23 15:04 roanta2

Hi, thanks for your contribution! If you haven't already done so, could you please make sure you sign our CLA (https://jitsi.org/icla for individuals and https://jitsi.org/ccla for corporations)? We would unfortunately be unable to merge your patch unless we have that piece :(.

jitsi-jenkins avatar Apr 24 '23 15:04 jitsi-jenkins

Codecov Report

Merging #508 (24a0dcc) into master (c23529a) will increase coverage by 0.11%. The diff coverage is 5.55%.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #508      +/-   ##
============================================
+ Coverage     48.05%   48.17%   +0.11%     
  Complexity      174      174              
============================================
  Files            73       73              
  Lines          2110     2105       -5     
  Branches        202      199       -3     
============================================
  Hits           1014     1014              
+ Misses         1026     1021       -5     
  Partials         70       70              
Impacted Files Coverage Δ
...rc/main/kotlin/org/jitsi/jibri/api/xmpp/XmppApi.kt 51.72% <0.00%> (+3.07%) :arrow_up:
.../jitsi/jibri/service/impl/StreamingJibriService.kt 0.00% <0.00%> (ø)
...rc/main/kotlin/org/jitsi/jibri/api/http/HttpApi.kt 40.00% <25.00%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update c23529a...24a0dcc. Read the comment docs.

codecov[bot] avatar Apr 24 '23 15:04 codecov[bot]

Others probably have a better memory of this than I do, but there's actually existing code that I believe is trying to support exactly this. If you look at this chunk you removed in your PR:

                val rtmpUrl = if (startIq.streamId.isRtmpUrl()) {
                    startIq.streamId
                } else {
                    "$YOUTUBE_URL/${startIq.streamId}"
                }

That's allowing for the value passed as the streamId to be an entire RTMP url.

bbaldino avatar Apr 24 '23 15:04 bbaldino

Others probably have a better memory of this than I do, but there's actually existing code that I believe is trying to support exactly this. If you look at this chunk you removed in your PR:

                val rtmpUrl = if (startIq.streamId.isRtmpUrl()) {
                    startIq.streamId
                } else {
                    "$YOUTUBE_URL/${startIq.streamId}"
                }

That's allowing for the value passed as the streamId to be an entire RTMP url.

Yep, so I moved this part in StreamingJibriService.kt without the else branch. My first comment is kind of misleading so I didn't add the functionality for the streamId to be the entire RTMP url, as it was already there, I just removed the custom youtube stuff.

roanta2 avatar Apr 25 '23 07:04 roanta2

@roanta2 We'll need to modify Jitsi Meet too to use the full rtmp URL format.

saghul avatar Apr 25 '23 08:04 saghul

LGTM at a glance, but we need to wait to have Jitsi Meet ready before we can apply this. Can you start working on that @roanta2 ?

saghul avatar Apr 25 '23 08:04 saghul

@saghul Thanks. I'm mostly backend but it seems like a minor change in Jisti Meet, so I'll give it a try.

roanta2 avatar Apr 25 '23 10:04 roanta2