tjc-sdk
Version:
TIANJI IM SDK
2 lines (1 loc) • 723 B
JavaScript
import t from"../../messages/notification/notificationMessageContent.js";import{MessageContentType as e}from"../../messages/messageContentType.js";import s from"../../client/tjc.js";class i extends t{callId;videoMuted;existParticipants;constructor(t=0,s=[]){super(e.VOIP_CONTENT_TYPE_MUTE_VIDEO,t,s)}formatNotification(t){return"mute video"}encode(){let t=super.encode();t.content=this.callId;let e={existParticipants:this.existParticipants,videoMuted:this.videoMuted};return t.binaryContent=s.utf8_to_b64(JSON.stringify(e)),t}decode(t){super.decode(t),this.callId=t.content;let e=s.b64_to_utf8(t.binaryContent),i=JSON.parse(e);this.existParticipants=i.existParticipants,this.videoMuted=i.videoMuted}}export{i as default};