Skip to content
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

VideoRoom V2 , How can i track when a publisher turns off his video ? #34

Closed
wpzag opened this issue May 2, 2021 · 7 comments
Closed

Comments

@wpzag
Copy link

wpzag commented May 2, 2021

when i toggle video off from one of the publishers the RTCVideoView() freezes his video , how can i track when some1 turns off his video so i can update the ui accordingly ?

@wpzag wpzag changed the title VideoRoom V2 no sound from publishers VideoRoom V2 , How can i track when a publisher turns off his video ? May 8, 2021
@kzawadi
Copy link
Member

kzawadi commented May 9, 2021

i have no good experience on video room but this is a Janus server event ....so if Janus does not receive video feed it will notify all the through server events ...within a time you specify in Janus config file (default is 1 second)

@shivanshtalwar0
Copy link
Collaborator

@Osamaegy Janus server emits unpublished events you can use that event to set null for that particular remoterender and update the ui accordingly

@shivanshtalwar0
Copy link
Collaborator

I am working on video room example optimization to illustrate all possible functionality with v2 api stay tuned

@CoMatu
Copy link

CoMatu commented Aug 22, 2022

I have some question: how can I track, when some turns off his video/audio ?

@kzawadi
Copy link
Member

kzawadi commented Aug 23, 2022

@CoMatu janus server emit different event according to the state of webrtc of the device ... listen these event either by HTTP, websockets or MQTT (https://janus.conf.meetecho.com/docs/eventhandlers.html)
here is a good article from the main developers of the Janus webrtc server on events https://www.meetecho.com/blog/event-handlers-a-practical-example/

@CoMatu
Copy link

CoMatu commented Aug 24, 2022

@kzawadi Thanks for the answer! Have yoy some expamles for mute/unmute microphone?

@kzawadi
Copy link
Member

kzawadi commented Aug 24, 2022

Hello, @CoMatu ... muting and unmuting the mic is flutter side and you have to handle it I mean it's not Janus related or even webrtc related directly.... those are just media controllers ...The following is my ideal implementation... I have a button on flutter is has two states e.g mute and unmuting... when this button is used it creates an event that can be listened to by all devices on that audio session here am using a pubsub server (PubNub or google pubsub) as you can see up to this point no webrtc related stuff so far ... and so all devices on that conference call when they get a certain notification from that pubsub server they know what it means e.g the sender of this message we just got has muted his/her mic ... and other stuff like kicking a misbehaving user from the session... an admin can send a pubsub notification to all devices on that session and the client when getting the notification it executes a required function like leaving the session. another use case a user raises a hand ..what happens logically is they send a pubsub notification and an admin side gets a notification that a user has raised his/her hand and if an admin is okay letting you talk he will just click allow but logical again it's a pubsub notification transmitted with an allow notifications... So what about Janus Server ...Janus server automatically measures decibel levels and emit events according to the decibel level of the devices... events here are "talking" and "stop talking"... and you can adjust the level of the session when starting the client on creating a session/room or joining.
{"audio_level_average": <average value of audio level (127=muted, 0='too loud', default=25)>, "audiolevel_event" : <true|false (whether to emit event to other users or not)>,}

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants