-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HOWTO / Feature Request: Dynamic Room Creation #2
Comments
That's definitely planned! The plugins that are available now are mostly proof of concepts, and so there's definitely room for improvement. Adding a further message to create rooms, for instance, would be quite trivial. A dynamic approach is what we're aiming at for all plugins. The idea I have of the streaming plugin, for instance, is something like icecast where you can dynamically allocate a mountpoint and stream to it. I'll keep you posted on updates in that direction. |
Hi Damon, I just commited a change that adds a new "create" request to the API of both the Audio Bridge and Video MCU plugins. There are no hooks in the demo examples yet, but I did a quick test and they behave as expected. The syntax of the plugin messages is quite simple and mirrors what can be configured in the INI: Audio Bridge Video Room: The only mandatory field in both messages is the request: if the other ones are missing, defaults are used. The response messages in both cases contain a "room" field with the newly created numeric ID. Let me know if they work for you. |
Awesome - thanks mate. Will check it out tomorrow :) |
@meetecho Works fantastically. I've added some tests (for the audiobridge plugin at least) to in the https://github.com/rtc-io/rtc-janus/blob/master/test/audiobridge.js |
@DamonOehlman that's amazing! I'm looking forward to your efforts myself as soon as I can! |
@DamonOehlman you beat me to this question. @meetecho Thank you. This will make testing a proof of concept for audio recording quite easy. Looking forward to working with you both on this. Warren |
Hi Warren, just FYI, the Audio Bridge plugin already has a rough recording mechanism in place. Right now, if enabled (record=yes in the configuration, record=true in the API create request), the mixed audio for each room is saved as an uncompressed WAV in /tmp. The VoiceMail plugin also has a way to record the incoming audio stream to an .opus file instead, something that we'll extend to video and add to the Video MCIU plugin as well in the future. Hope that helps! |
is there any "destroy" associated command we can use ? |
yes, you can reference the video room and destroy it through a synchronous command. |
Can I able to create a room with a specific name like "room 1" ? What is the latest status of dynamic room creation and destroying? No mentions in the docs? |
@Ajmal1990 The videoroom plugin API requests are mentioned here; https://janus.conf.meetecho.com/docs/janus__videoroom_8c.html#sfuapi |
mom-informative stack unwind if leak detected in so-module ====================================================================================== default: Indirect leak of 128 byte(s) in 1 object(s) allocated from: #0 0x7f36052b0b50 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdeb50) meetecho#1 0x7f3603af545c (/usr/lib/x86_64-linux-gnu/libjansson.so.4+0x345c) meetecho#2 0x7f3602808b96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96) Indirect leak of 72 byte(s) in 1 object(s) allocated from: #0 0x7f36052b0b50 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdeb50) meetecho#1 0x7f3603afa61a in json_object (/usr/lib/x86_64-linux-gnu/libjansson.so.4+0x861a) meetecho#2 0x7f3602808b96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96) SUMMARY: AddressSanitizer: 200 byte(s) leaked in 2 allocation(s). ====================================================================================== no_fast_unwind: Indirect leak of 128 byte(s) in 1 object(s) allocated from: #0 0x7f3554f8fb50 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdeb50) meetecho#1 0x7f35537d445c (/usr/lib/x86_64-linux-gnu/libjansson.so.4+0x345c) meetecho#2 0x7f35537d9646 in json_object (/usr/lib/x86_64-linux-gnu/libjansson.so.4+0x8646) meetecho#3 0x55928c01143a in main /home/dima/work/janus.github/src/janus.c:3269 meetecho#4 0x7f35524e7b96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96) meetecho#5 0x55928bfc74c9 in _start (/home/dima/work/janus.github/cmake-gcc/janus+0x1364c9) Indirect leak of 72 byte(s) in 1 object(s) allocated from: #0 0x7f3554f8fb50 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdeb50) meetecho#1 0x7f35537d961a in json_object (/usr/lib/x86_64-linux-gnu/libjansson.so.4+0x861a) meetecho#2 0x55928c01143a in main /home/dima/work/janus.github/src/janus.c:3269 meetecho#3 0x7f35524e7b96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96) meetecho#4 0x55928bfc74c9 in _start (/home/dima/work/janus.github/cmake-gcc/janus+0x1364c9) SUMMARY: AddressSanitizer: 200 byte(s) leaked in 2 allocation(s).
I can see that for the plugins that have a concept of rooms that rooms are configured in relevant plugin configuration file, with the room id being identified in an INI file section.
Is there any plans to support dynamic room creation through the API. Or alternatively something similar to the way nginx uses the
HUP
signal to trigger a reload of configuration files?I'm fine with either way :)
The text was updated successfully, but these errors were encountered: