You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are two types of event handlers the SDK provides for a client app to respond to various events: a device-specific listener and a call-specific listener.
127
127
128
-
#### - Device-specific Listener
128
+
#### - Device-specific listener
129
129
130
130
Register a device-specific event handler using the `SendBirdCall.addListener()` method. It is recommended to add the event handler during initialization because it is a prerequisite for detecting an `onRinging()` event. The code below shows the way device-wide events such as incoming calls are handled once device-specific event is added.
|onAudioOutputDeviceChanged | Audio output devices have changed. |
156
156
|onVideoInputDeviceChanged | Video input devices have changed. |
157
157
158
-
#### - Call-specific Listener
158
+
#### - Call-specific listener
159
159
160
160
Register a call-specific event handler by attaching an event handler function directly to the properties of the call object. Responding to call-specific events such as establishing a successful call connection is then handled as shown below.
|onEstablished|The callee accepted the call using the method `call.accept()`. However, neither the caller or callee’s devices are connected to media devices yet.|
208
208
|onConnected|A connection is established between the caller and callee’s media devices such as microphones and speakers. The voice or video call can begin.|
209
-
|onEnded | The call has ended on either the caller or the callee’s devices. When the `call.end()` method is used from either party, a call ends. The `call.end()` event listener is also invoked if the call is ended for other reasons. Refer to [Calls result](#call-results) in [Appendix](#appendix) for all possible reasons for call termination. |
209
+
|onEnded | The call has ended on either the caller or the callee’s devices. When the `call.end()` method is used from either party, a call ends. The `call.end()` event listener is also invoked if the call is ended for other reasons. Refer to [Call results](#call-results) in [Appendix](#appendix) for all possible reasons for call termination. |
210
210
|onRemoteAudioSettingsChanged| The other party changed their audio settings. |
211
211
|onRemoteVideoSettingsChanged| The other party changed their video settings. |
212
212
|onCustomItemsUpdated| One or more of `call`’s custom items that are used to store additional information have been updated.|
0 commit comments