Похожие чаты

Hey guys !! how do we can detect incoming track is

webcam or screen share in webrtc ?

8 ответов

21 просмотр

Sounds not possible

Masoud- Автор вопроса
Masoud- Автор вопроса
Thomas
How?

First I'm writing a SFU and I need to know which type of stream is coming (webcam or screen share) and only property that will share between local and remote peer without any changes is stream id and the rest including track id will changes so I don't need them. In broadcaster client side I have a streamType variable and when user clicks on EnableWebcam button I will change value of that var to "webcam" and then add the track to peer connection when negotiation needed event triggers I will modify the sdp because there is a attribute in sdp with the key "extmap" and value of some url that won't be used by browser so I will replace that url with my streamType :)) and complete the renegotiation then in server in ontrack event function I will find the track by stream id and get that streamType from sdp and again set that streamType as stream id for the new track that I want to add to viewers peer connection and finally in viewer client side ontrack event function : streams[0].id === "webcam" ? console.log('webcam') : console.log('screenShare') (sorry for detailed explaining)

Masoud
First I'm writing a SFU and I need to know which t...

Jeez that's a lot, but basically you know because the user selected. So it's not possible to detect

Masoud- Автор вопроса
Thomas
Jeez that's a lot, but basically you know because ...

I was looking for a way to understand that incoming track is webcam or screen share in server and viewers browser and now I have it 🤷🏻‍♂

Thomas
Yea because the user tells you

So that I can select real cam option and just stream my obs virtual cam 🌚

Похожие вопросы

Обсуждают сегодня

Господа, а что сейчас вообще с рынком труда на делфи происходит? Какова ситуация?
Rꙮman Yankꙮvsky
29
А вообще, что может смущать в самой Julia - бы сказал, что нет единого стандартного подхода по многим моментам, поэтому многое выглядит как "хаки" и произвол. Короче говоря, с...
Viktor G.
2
@Benzenoid can you tell me the easiest, and safest way to bu.y HEX now?
Živa Žena
20
This is a question from my wife who make a fortune with memes 😂😂 About the Migration and Tokens: 1. How will the old tokens be migrated to the new $LGCYX network? What is th...
🍿 °anton°
2
30500 за редактор? )
Владимир
47
а через ESC-код ?
Alexey Kulakov
29
What is the Dex situation? Agora team started with the Pnetwork for their dex which helped them both with integration. It’s completed but as you can see from the Pnetwork ann...
Ben
1
Гайс, вопрос для разносторонее развитых: читаю стрим с юарта, нада выделять с него фреймы с определенной структурой, если ли чо готовое, или долбаться с ринг буффером? нада у...
Vitaly
9
Anyone knows where there are some instructions or discort about failed bridge transactions ?
Jochem
21
@lozuk how do I get my phex copies of my ehex from a atomic wallet, to move to my rabby?
Justfrontin 👀
11
Карта сайта