media_update webhook is sent. Like business-initiated calling, when you receive this webhook, you must generate an SDP answer using the SDP information and apply that answer to your local peer connection. See the appendix for an example media update webhook containing video track data.| Codec | Processing Power | Device Support | Video Quality | Network Bandwidth | Use Case |
|---|---|---|---|---|---|
VP8 | Low-Medium | Wide (WebRTC native) | Medium | Medium-High | Wide support and minimum network bandwidth |
VP9 | Medium-High | Wide (WebRTC native) | High | Low-Medium | Higher quality than VP8 and less network bandwidth but not supported on as many devices |
H264 | Medium | Very Wide (hardware accelerated) | High | Medium-High | Most broad support and high quality |
H265 | High | Limited (hardware accelerated on newer devices) | Very High | Low | Higher quality than H264 and less network bandwidth but not supported on as many devices |
AV1 | High | Increasing (WebRTC native, but limited hardware acceleration) | Very High | Low | Highest quality and least network bandwidth but only supports modern devices |

/<page-id>/calls with action=media_update and an SDP offer containing your updated media tracks. See the appendix for example SDP offer and answer.
from_version and to_version in the API request. The API caller receives a 200 OK with no SDP offer or an error about conflicting media status. In either case, the client should process the version updates and retry the request.
media_update webhook from Meta, increment the version. This prevents race conditions where your client calls the media update API between Meta sending a media_update webhook.media_update request with the correct version. Please note this is not the same as the version number in the o= line in the SDP.| Property | Description |
|---|---|
platformOptional string | Only messenger is supported at this time |
call_idstring | ID of the call from the webhook you previously received for this call |
actionstring | media_update |
from_versionstring | The current media version of your local client |
to_versionstring | The new media version that your client is moving to |
tracksArray of objects | Metadata about the media tracks you want to add/update 1) tracks[i].msid: string that matches the msid line in the sdp offer2) tracks[i].label: enum value
3) tracks[i].status: enum value
|
sessionJSON | JSON serialized string with following 2 keys: 1) sdp: SDP offer of the device on the other end of the call. See the appendix for example structure.2) sdp_type: “offer” to indicate an SDP offer |
POST /<PAGE_ID>/calls { "platform": "messenger", "call_id": "c_M5YPhGE5jm0L_PMQdScLlYJlR7tU_f0rgXinCqnTQ", "action": "media_update", "from_version": "0", "to_version": "1", "tracks": [ { "msid", "123-abc", "label": "default_audio", "status": "enabled" }, { "msid", "456-def", "label": "default_video", "status": "enabled" } ], "session" : { "sdp_type" : "offer", "sdp" : "<<RFC 4566 SDP>>" } }
| Property | Description |
|---|---|
successboolean | Whether the operation is successful |
sessionJSON | SDP data. The API response includes an SDP response that should be applied to the business peer connection. |
{ "success" : true "session" : { "sdp_response" : { "sdp_type": "answer", "sdp": "<<RFC 4566 SDP>>" }, "sdp_renegotiation": { "sdp_type": "offer", "sdp": "<<RFC 4566 SDP>>" } } }