@100mslive/hms-video-store
Version:
@100mslive Core SDK which abstracts the complexities of webRTC while providing a reactive store for data management with a unidirectional data flow
43 lines (35 loc) • 2.33 kB
text/typescript
import * as sdkTypes from '../../internal';
import { HMSNotificationTypes } from '../../schema/notification';
type PeerNotificationMap = { [key in sdkTypes.HMSPeerUpdate]?: HMSNotificationTypes };
export const PEER_NOTIFICATION_TYPES: PeerNotificationMap = {
[]: HMSNotificationTypes.PEER_JOINED,
[]: HMSNotificationTypes.PEER_LEFT,
[]: HMSNotificationTypes.ROLE_UPDATED,
[]: HMSNotificationTypes.NAME_UPDATED,
[]: HMSNotificationTypes.METADATA_UPDATED,
[]: HMSNotificationTypes.HAND_RAISE_CHANGED,
};
type TrackNotificationMap = { [key in sdkTypes.HMSTrackUpdate]: HMSNotificationTypes };
export const TRACK_NOTIFICATION_TYPES: TrackNotificationMap = {
[]: HMSNotificationTypes.TRACK_ADDED,
[]: HMSNotificationTypes.TRACK_REMOVED,
[]: HMSNotificationTypes.TRACK_MUTED,
[]: HMSNotificationTypes.TRACK_UNMUTED,
[]: HMSNotificationTypes.TRACK_DEGRADED,
[]: HMSNotificationTypes.TRACK_RESTORED,
[]: HMSNotificationTypes.TRACK_DESCRIPTION_CHANGED,
};
type PollNotificationMap = { [key in sdkTypes.HMSPollsUpdate]: HMSNotificationTypes };
export const POLL_NOTIFICATION_TYPES: PollNotificationMap = {
[]: HMSNotificationTypes.POLL_CREATED,
[]: HMSNotificationTypes.POLL_STARTED,
[]: HMSNotificationTypes.POLL_STOPPED,
[]: HMSNotificationTypes.POLL_VOTES_UPDATED,
[]: HMSNotificationTypes.POLLS_LIST,
};
type TranscriptionNotificationMap = {
[]: HMSNotificationTypes;
};
export const TRANSCRIPTION_NOTIFICATION_TYPES: TranscriptionNotificationMap = {
[]: HMSNotificationTypes.TRANSCRIPTION_STATE_UPDATED,
};