export const ParticipantMessageType = { PARTICIPANT_AFK : 'p_afk' , PARTICIPANT_TRACKSTATES : 'p_trackSt' , PARTICIPANT_VIEWPOINT : 'p_viewpoint' , } ; export type ParticipantMessageKeys = keyof typeof ParticipantMessageType ; export const PoseMessageType = { PARTICIPANT_POSE : 'mp' , PARTICIPANT_MOUSE : 'mm' , PARTICIPANT_ON_STAGE : 'p_onStage' , } ; export const StoredMessageType = { ... ParticipantMessageType , PARTICIPANT_INFO : 'p_info' , MAIN_SCREEN_CARRIER : 'main_screen_carrier' , MY_CONTENT : 'my_content' , } ; export type StoredMessageKeys = keyof typeof StoredMessageType ; export const InstantMessageType = { PARTICIPANT_TRACKLIMITS : 'm_track_limits' , YARN_PHONE : 'YARN_PHONE' , CHAT_MESSAGE : 'm_chat' , CALL_REMOTE : 'call_remote' , MUTE_VIDEO : 'm_mute_video' , MUTE_AUDIO : 'm_mute_audio' , RELOAD_BROWSER : 'm_reload' , KICK : 'm_kick' , } ; export type InstantMessageKeys = keyof typeof InstantMessageType ; export const InstantMessageTypes = new Set ( Object . values ( InstantMessageType ) ) ; export const ObjectArrayMessageType = { CONTENT_UPDATE_REQUEST : 'c_update' , CONTENT_INFO_UPDATE : 'c_info_update' , } ; export const ObjectArrayMessageTypes = new Set ( Object . values ( ObjectArrayMessageType ) ) ; export const StringArrayMessageType = { LEFT_CONTENT_REMOVE_REQUEST : 'left_c_remove' , CONTENT_REMOVE_REQUEST : 'c_remove' , PARTICIPANT_OUT : 'p_out' , MOUSE_OUT : 'm_out' , CONTENT_OUT : 'c_out' , } ; export const StringArrayMessageTypes = new Set ( Object . values ( StringArrayMessageType ) ) ; export const ClientToServerOnlyMessageType = { CONTENT_UPDATE_REQUEST_BY_ID : 'c_update_by_id' , REQUEST_ALL : 'req_all' , REQUEST_RANGE : 'req_range' , REQUEST_PARTICIPANT_STATES : 'req_p_state' , } ; export const MessageType = { ... ObjectArrayMessageType , ... StringArrayMessageType , ... InstantMessageType , ... StoredMessageType , ... PoseMessageType , ... ClientToServerOnlyMessageType , PARTICIPANT_LEFT : 'm_participant_left' , ROOM_PROP : 'room_prop' , REQUEST_TO : 'req_to' , FRAGMENT_HEAD : 'frag_head' , FRAGMENT_CONTENT : 'frag_cont' , } ; export type MessageKeys = keyof typeof MessageType ;