sinch-rtc
Version:
RTC JavaScript/Web SDK
32 lines (31 loc) • 1.37 kB
TypeScript
import { ClientRegistration } from "./ClientRegistration";
import { SinchClient } from "./SinchClient";
import { SinchError } from "./SinchError";
/**
* A `SinchClientListener` handles client state changes
*/
export interface SinchClientListener {
/**
* Tells the listener that the client has started and ready for initiating
* outgoing calls.
* __Note__ that in order to receive calls, {@link SinchClient.setSupportManagedPush} must be called.
*
* @param sinchClient - The client informing the listener that it started.
*/
onClientStarted: (sinchClient: SinchClient) => void;
/**
* Tells the listener that there was an error in the {@link SinchClient}.
*
* @param sinchClient - The {@link SinchClient} informing the listener that an error
* occurred.
* @param error - {@link SinchError} object that describes the problem.
*/
onClientFailed: (sinchClient: SinchClient, error: SinchError) => void;
/**
* Tells the listener that registration credentials are needed.
*
* @param sinchClient - The {@link SinchClient} informing the listener to register credentials
* @param clientRegistration - {@link ClientRegistration} object to call register on.
*/
onCredentialsRequired: (sinchClient: SinchClient, clientRegistration: ClientRegistration) => void;
}