Search code examples
agora.ioagora-web-sdk-ng

How to send messages (call reactions) during video chat with agora RTC WEB


I'm trying use Agora Rtc WEB api for voice/video chat.

It will be just 1:1 call, and I want that one side can invoke notification/send message to other side (e.g. something like send emoji "call reactions" in Skype).

In reality it will not be invoked just by user, but I want some side channel to transfer some data during call, it will be only few bytes, but I need it in-sync with video/audio.

I'm looking for sendMetadata(), but it is not supported on WEB platform?

Is possible to have custom track? So I can do "client.publish(sideChannelDataTrack);" ?

Or the only way is to use both RTC and RTM together, even for 1:1 call?

Thanks for reactions.


Solution

  • You'll have to use the RTM SDK for messaging or emoji reactions or hand raising features.

    It's recommended to use Agora's RTM SDK for sending data messages between clients because data channels are not reliable, there is no guarantee or retry so if you send a message there is a chance one of the other clients may miss it, also there is no built in concurrency handling where as Agora RTM has these built in.