sinch-rtc
Version:
RTC JavaScript/Web SDK
25 lines (24 loc) • 788 B
TypeScript
import { SinchError } from "../../SinchError";
import { MxpClientEvent } from "../MxpClientEvent";
/**
* Represents payload of MXP message
*/
export declare class Body {
type: string;
data: string;
static readonly clientType = "client";
static readonly sdpType = "sdp";
static readonly mediaType = "media";
static readonly clientEventType = "clientEvent";
static readonly errorJsonType = "error/json";
constructor(type: string, data: string);
isMedia(): boolean;
isSdp(): boolean;
isClientEvent(): boolean;
isError(): boolean;
static sdp(data: string): Body;
static client(data: string): Body;
static media(data: string): Body;
static clientEvent(event: MxpClientEvent): Body;
static error(error: SinchError): Body;
}