mozilla / janus-plugin-sfu

Janus plugin to act as a kind of SFU for game networking data.
Mozilla Public License 2.0
135 stars 40 forks source link

Plugin no longer loads with latest libnice and janus-gateway #58

Closed jbaicoianu closed 3 years ago

jbaicoianu commented 4 years ago

Seems that janus-gateway > 0.9.5 no longer loads the janus-plugin-sfu module, complaining that API version 14 < 15:

[ERR] [janus.c:main:5053] The 'janus.plugin.sfu' plugin was compiled against an older version of the API (14 < 15), skipping it: update it to enable it again

I rolled back libnice and janus-gateway and was able to get it working again, but it seems some work may be needed to adapt it to the latest versions.

mqp commented 4 years ago

Looks like we need to accommodate these changes since API version 14:

https://github.com/meetecho/janus-gateway/pull/2060 https://github.com/meetecho/janus-gateway/pull/2157

Should be relatively straightforward. I will work on this soon.

kylebakerio commented 3 years ago

Was this ever done?

mqp commented 3 years ago

No, thanks for the reminder. I see there have been a few new Janus releases since then, but no further plugin updates. I'll do it this week unless there's some unforeseen complication.

arpu commented 3 years ago

this was the last plugin api change https://github.com/meetecho/janus-gateway/commit/2a98ec28f5f1caad2ce163f71c0123ec42e39d53#diff-7636c65155edc41607b079aadb5e3d45

kylebakerio commented 3 years ago

Ok. I'll pause my work on this then, was about to go through installing an older version just to accomodate this plugin.

conwayanderson commented 3 years ago

@mqp how's this looking?

vincentfretin commented 3 years ago

FYI, Janus 0.9.x (0.9.5 is the latest compatible) is not maintained anymore, Janus 0.10.x contains bugfixes for several CVEs, see https://github.com/meetecho/janus-gateway/pull/2214 and https://github.com/meetecho/janus-gateway/pull/2229

I don't know if it will be an issue with this plugin, but with Janus 0.10.5 and videoroom plugin, you need to specify the h264 profile now, profile id is "42e01f" (https://github.com/meetecho/janus-gateway/issues/2330). I see this is specified in the new dialog sfu https://github.com/mozilla/dialog/blob/dc4e59cc775f88949043c145595bd7b08fd6fcb6/config.js#L115 but I didn't find it in the rust code. Anyway we should test the video between Firefox and Chrome if you update the plugin.

A bit off topic, I had a conversation with @kylebakerio about janus-plugin-sfu integration in a naf project here https://github.com/mozilla/dialog/issues/8 If you have some more insights, you can add a comment there. You can follow the repo there too if you want to be alerted.

vincentfretin commented 3 years ago

Timofey Martynov @feymartynov seems to be using janus-gateway 1da5aa226fb932c87fe70b35551057bd30c3713d (2020-09-28 11:02, post version v0.10.5) in it's janus-conference plugin https://github.com/netology-group/janus-conference Both janus-conference and janus-plugin-sfu uses janus-plugin-rs that do the bridge between Rust a janus C api. He contributed https://github.com/mozilla/janus-plugin-rs/pull/24 to update it to API v15. Relevant changes to use this janus-plugin-rs PR, see his changes in janus-conference https://github.com/netology-group/janus-conference/commit/2ae630eaea91a63691492638a64398edc8394707

vincentfretin commented 3 years ago

Yes, I successfully made the changes in janus-plugins-rs and janus-plugin-sfu to work with ubuntu 18.04 janus-gateway 2021-01-21 13:02 46a6c71b0fb7e54cb9acfbec84391c75eb224c13 (post v0.10.9) libnice Jan 6, 2021 2b38ba23b726694293de53c90b59b28ca11746ab (post 0.1.18) usrsctp Jan 13, 2021 0.9.5.0 07f871bda23943c43c9e74cc54f25130459de830 libsrtp 2.3.0 libwebsockets 3.2.3

mqp commented 3 years ago

It's fully updated to be compatible with v0.10.9 now.