-
-
Notifications
You must be signed in to change notification settings - Fork 75
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
Trying to create live stream using video_room #7
Comments
Reason why you getting that error is because you are trying to list down participants without attaching to any plugin handle and you are right about the issue listparticipants should be called only after you have attached plugin |
About streaming you definitely need to attach a new streaming plugin but that should happen on recieving side |
Thanks @shivanshtalwar0 , that helped a lot, since I was pretty confused on how it worked exactly. I can now see the output from listparticipants in the terminal. But how do i get the output in a variable ? I tried |
Reason why that happens is because send doesn't return anything and also in onSuccess you get nothing also because all this is supposed to work with both websocket and it is asynchronous in nature we cannot have future as janus_client is port of janusjs, all messages from the plugin can only be listened in onMessage handler where you attach plugin |
Hi @shivanshtalwar0 , I tried adding a print statement to onMessage everywhere and also added some marker text at the start of print to see if the response from listparticipant was being printed from within onMessage. But its not, the output from listparticipant is beung printed as :
Where as both onMessages have print statement as
Unless the response for listparticipant appears in onMessage, I assume there is no other way to parse the json and get user id ? |
I am afraid I can't assist you without going through your code, if you can share a sample repository of your code then only I can be sure what is going wrong and if there exists a legitimate bug in the code |
Ahh don't bother i got the bug fixing as i am writing this 😃 |
fixed now you should be able to get response of all participants , make sure to update pubspec yaml file like this
and run |
@alsiPanda new version out 0.0.4 with streaming support, all fixes, and improvements |
Hi @shivanshtalwar0 , So i took your advice on rtp forwarding the video room for live streaming. But I hit a snag. I am probably not using the flutter_janus_client properly. But here's what I am trying to do. Setting up the RTP forwarding needs room id and user id as seen here https://ans.disi.unitn.it/redmine/projects/peerstreamer-ng/wiki/Few_notes_on_Janus_and_its_streaming_plugin , Now the room id is already known, since i created the room with id 5555, but user id is proving problematic. I tried this piece of code
But I keep getting this error at backend saying
Invalid request on unconfigured participant
. After some searching I think i am placing the above code in the wrong place. I have tried placing it inside different 'onSuccess(){}' but keep getting same error.So where should I place the above code, so that it runs after I have joined the room as publisher ? Also where should I place the code for streaming ? I am currently placing it inside the
j.connect
after the j.plugin(videoroom) ends. Do I need a new j.connect for j.plugin(streaming) ? Thanks in advance.The text was updated successfully, but these errors were encountered: