Basic-Video-Call icon indicating copy to clipboard operation
Basic-Video-Call copied to clipboard

How can I allow one-way video communications?

Open jenniestrongbow opened this issue 3 years ago • 2 comments

Hi,

In a two-person communication, how can I allow only one participant to receive the video from the other user?

I can implement this with the audio without a problem. But with video, I do not receive any event when the remote user stops sending video for example (onRemoteVideoStateChanged not fired).

I tried setting up the client role to broadcaster on both sides but the one-way video still does not work:

mRtcEngine.setClientRole(Constants.CLIENT_ROLE_BROADCASTER);

Thanks

jenniestrongbow avatar Apr 04 '21 11:04 jenniestrongbow

Can you try this:

    ChannelMediaOptions option = new ChannelMediaOptions();
    option.autoSubscribeAudio = true;
    option.autoSubscribeVideo = false;
    int res = engine.joinChannel(accessToken, channelId, "Extra Optional Data", 0,option);

yoreland avatar Apr 05 '21 03:04 yoreland

@yoreland, thanks for your help. But I don't see how this can help me. How do I then display the video of the remote user without sending mine? Could you please give me a bit more code? Thanks

jenniestrongbow avatar Apr 05 '21 08:04 jenniestrongbow