Comments (9)
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
Let me explain what j.connect do
It just takes your passed server details along with credentials create a session id and initialize keep alive timer
At this point you might think you have room and you can interact with room but in real you can't unless you attach the plugin like videoroom videocall or any other this is achieved by method j.attach(Plugin(.... Now when you successfully attached the plugin only then you can use listparticipants or any other operation because attach function creates handle id for that plugin also you need to join the room as publisher/subscriber before issuing listparticipants hope that explains your doubt
from flutter_janus_client.
About streaming you definitely need to attach a new streaming plugin but that should happen on recieving side
from flutter_janus_client.
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 var op = await plugin.send(....)
but op prints as null. I also tried plugin.send( message: ... , onSuccess : (op){ print("$op"); } )
, still getting null. I couldn't get the user id from msg in onMessage either.
from flutter_janus_client.
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
from flutter_janus_client.
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 :
I/flutter ( 9957): {janus: success, session_id: 6008204003696953, transaction: da2d7246-ffd7-40b5-b78e-24e1bb05d8ba, sender: 3435438303399251, plugindata: {plugin: janus.plugin.videor
oom, data: {videoroom: participants, room: 1234, participants: [{id: 1825063680612332, display: miladmin, publisher: false}]}}}
Where as both onMessages have print statement as print("publisheronmsg msg: $msg");
. The above print as you can see is not being printed from inside onMessage for some reason. There are other things getting printed from within onMessage such as response for room joined or room configured.
I/flutter ( 9957): publisheronmsg : {videoroom: joined, room: 1234, description: Demo Room, id: 7052290495258748, private_id: 1485829053, publishers: []}
I/flutter ( 9957): publisheronmsg : {videoroom: event, room: 1234, configured: ok, audio_codec: opus, video_codec: vp8}
Unless the response for listparticipant appears in onMessage, I assume there is no other way to parse the json and get user id ?
from flutter_janus_client.
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
from flutter_janus_client.
Ahh don't bother i got the bug fixing as i am writing this 😃
from flutter_janus_client.
fixed now you should be able to get response of all participants , make sure to update pubspec yaml file like this
janus_client:
git: https://github.com/shivanshtalwar0/flutter_janus_client.git
and run flutter pub get
and flutter pub upgrade
from flutter_janus_client.
@alsiPanda new version out 0.0.4 with streaming support, all fixes, and improvements
from flutter_janus_client.
Related Issues (20)
- if network refresh/reset/reconnect then how to reconnect janus videoroom publisher and subscriber again? HOT 1
- hard decoding HOT 3
- Failing to build for web HOT 4
- Problem with microphone HOT 2
- In Android call directly run on a Speaker mode. HOT 1
- Bump http version to 1.0.0 HOT 2
- android exception HOT 10
- How to check session's status in text room plugin HOT 2
- Switch audio Route HOT 2
- Re-joining a call not working for videoroom plugin HOT 15
- Can't mute or use speaker HOT 7
- Audio Output on IOS HOT 2
- RTCVideoRenderer Video rendering and steaming issue HOT 3
- Cannot capture screen whith no media devices HOT 3
- isUnifiedPlan = true is not working HOT 7
- Error When try to create an answer HOT 16
- IOS device not publishing their own video in video room HOT 11
- [Linux] Error when disposing VideoRoomPlugin HOT 2
- join google meet only as audience not publishing anything HOT 9
- Cant use RTCIceServer without credential/password HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutter_janus_client.