Frage

I make WEBRTC Video chat, test page.
and

our client say, I don't want show my face. so , we need to camera off and send other image, or something else.

how to do that?

War es hilfreich?

Lösung

There are many possible cases:

  1. Setup audio-only connection
  2. Setup audio/video connection however disable video-tracks
  3. Setup audio/video connection however change video-mLine's attribute "sendrecv" to "inactive"
  4. Setup audio/video connection; keep sending video however on target user's side, either remove "src" or hide video-element or use invisible video element.

It seems that first options suits your needs.

Setting-up audio-only connection is as easy as:

  1. Invoking getUserMedia with {audio:true} and adding MediaStream to peer connection.
  2. While invoking createOffer/createAnswer methods; setting OfferToReceiveAudio:true however OfferToReceiveVideo:false - Remember, both are true by default.

P.S. Audio-only connection still works if you set OfferToReceiveVideo:true.


To share users' snapshot; obviously you can either use XMLHttpRequest/DB or WebSocket/etc. to exchange Data-URLs among users.


It is possible to set poster of video-element; however make sure that you've not set src at the same time; otherwise poster will fail.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top