Umar Hussain
Umar Hussain

Reputation: 3527

Webrtc sending call offer over FCM

I want to send the call offer message (sdp) over fcm to offline users. But the issue is the limit of fcm is 4096 bytes and the sdp of call offer exceeds this limit in case of video calls.

My mechanism for call offer: User creates a call offer message for remote peer, get the message and emit it to server via SocketIO. Server then checks if the remote peer is online (connected via socket).

Now if the remote user is offline I need to send the sdp to the user via push notification.

Is my approach to this problem correct? Or do I need to change the mechanism to first signal the call offer and then when the remote user get notified, I generate call offer and use my SocketIO to transmit the sdp

Upvotes: 5

Views: 1230

Answers (3)

jamix
jamix

Reputation: 5628

Or do I need to change the mechanism to first signal the call offer and then when the remote user get notified, I generate call offer and use my SocketIO to transmit the sdp

I would suggest the above approach instead. Use the push notification to "wake" the remote user (callee) and make them connect via SocketIO. Then, make the caller generate the offer SDP and send the SDP via SocketIO to the callee.

Upvotes: 4

Mahadev Mandale
Mahadev Mandale

Reputation: 447

In case of iOS, You can use VOIP notification. Also you need to increase VOIP push notification size while sending the notification from server side(e.g. java).

Upvotes: 0

Philipp Hancke
Philipp Hancke

Reputation: 17340

you can reduce the amount of information with some of the techniques described in https://webrtchacks.com/the-minimum-viable-sdp/

Given that the information in the SDP is somewhat time-critical a small push notification and then fetching the full SDP from your local server is the better approach.

Upvotes: 2

Related Questions