I'm currently experiencing a problem that a client who has audio but no video can't receive the remote clients video (even though the remote client is capturing both audio and video).

Video and audio constraints are set to true on both clients. The application runs correctly if both clients have audio and video.

Does anyone know a solution for this?

有帮助吗?

解决方案

Simply make sure that the client who has audio/video MUST create offer; and other client should create answer. Then it will be oneway streaming; and it will work!

userWhoHasMedia.createOffer(sdp_sucess_callback, sdp_failure_callback, sdp_constraints);

userWhoDontHavemedia.createAnswer(sdp_sucess_callback, sdp_failure_callback, sdp_constraints);

Also, if you want, you can set "OfferToReceiveAudio" and "offerToReceiveVideo" to false for client who doesn't captures media. Though, it is useless in your case, because non-Media client is receiver.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top