yimultiscreenserver-sdk-web
Version:
YiMultiScreenServer SDK for Web
35 lines • 1.36 kB
JavaScript
import { CastSessionVO } from "../../../vo/cast/CastSessionVO";
import { MsgClientType } from "./MsgClientType";
import { MsgType } from "./MsgType";
import { SessionAction } from "./SessionAction";
import { SessionDestroyReason } from "./SessionDestroyReason";
import { YMSMessage } from "./YMSMessage";
export class CastSessionMessage extends YMSMessage {
constructor(sender, receiver) {
super(sender, receiver, MsgType.CAST);
this.castSession = new CastSessionVO();
this.action = SessionAction.DESTROY;
this.mediaPayload = "";
this.destroyReason = SessionDestroyReason.NONE;
}
getQoS() {
return 1;
}
isRetained() {
return false;
}
toString() {
return `CastSessionMessage{` +
`timestamp=${this.timestamp}, ` +
`sender=${MsgClientType[this.sender]}, ` +
`receiver='${MsgClientType[this.receiver]}, ` +
`msgType=${MsgType[this.msgType]}, ` +
`senderClientId='${this.senderClientId}', ` +
`castSeesion=${this.castSession.toString()}, ` +
`action=${SessionAction[this.action]}, ` +
`mediaPayload='${this.mediaPayload}', ` +
`destroyReason='${SessionDestroyReason[this.destroyReason]}'` +
`}`;
}
}
//# sourceMappingURL=CastSessionMessage.js.map