Skip to content

IncomingWebrtcCallEvent

Lejla Solak edited this page Sep 11, 2023 · 3 revisions



constructor(incomingCall, customData)

Description

Creates a new instance of IncomingWebrtcCallEvent.

Arguments

  • incomingCall: IncomingWebrtcCall - The incoming call object for this event.
  • customData: CustomData - Custom data type that is defined as an object of key-value string pairs.

Example

let incomingWebrtcCallEvent = new IncomingWebrtcCallEvent(incomingCall, {"city": "New York"});



incomingCall()

Description

Getter for the incomingCall field.

Arguments

  • none

Returns

Example

let infobipRTC = createInfobipRtc('2e29c3a0-730a-4526-93ce-cda44556dab5', {debug: true});
infobipRTC.on('incoming-webrtc-call', (incomingWebrtcCallEvent) => {
    incomingWebrtcCallEvent.incomingCall.accept();
});



customData()

Description

Getter for the customData field.

Arguments

  • none

Returns

  • CustomData - Value of the customData field, defined as an object of key-value string pairs, containing custom additional information.

Example

let infobipRTC = createInfobipRtc('2e29c3a0-730a-4526-93ce-cda44556dab5', {debug: true});
infobipRTC.on('incoming-webrtc-call', function (incomingWebrtcCallEvent) {
    console.log(`Incoming WebRTC call custom data: ${JSON.stringify(incomingWebrtcCallEvent.customData)}`);
});

Tutorials

Migration guides

Reference documentation

Clone this wiki locally