Skip to content

Commit

Permalink
feat(ts) TypeScript enum for SignalingEvents
Browse files Browse the repository at this point in the history
  • Loading branch information
garyhuntddn authored Feb 21, 2022
1 parent 74e7e03 commit c33f7c2
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 27 deletions.
14 changes: 0 additions & 14 deletions service/RTC/SignalingEvents.js

This file was deleted.

20 changes: 20 additions & 0 deletions service/RTC/SignalingEvents.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
export enum SignalingEvents {
/**
* Event triggered when participant's muted status changes.
* @param {string} endpointId the track owner's identifier (MUC nickname)
* @param {MediaType} mediaType "audio" or "video"
* @param {boolean} isMuted the new muted state
*/
PEER_MUTED_CHANGED = 'signaling.peerMuted',

/**
* Event triggered when participant's video type changes.
* @param {string} endpointId the video owner's ID (MUC nickname)
* @param {VideoType} videoType the new value
*/
PEER_VIDEO_TYPE_CHANGED = 'signaling.peerVideoType'
}

// exported for backward compatibility
export const PEER_MUTED_CHANGED = SignalingEvents.PEER_MUTED_CHANGED;
export const PEER_VIDEO_TYPE_CHANGED = SignalingEvents.PEER_VIDEO_TYPE_CHANGED;
30 changes: 17 additions & 13 deletions types/auto/service/RTC/SignalingEvents.d.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
/**
* Event triggered when participant's muted status changes.
* @param {string} endpointId the track owner's identifier (MUC nickname)
* @param {MediaType} mediaType "audio" or "video"
* @param {boolean} isMuted the new muted state
*/
export const PEER_MUTED_CHANGED: "signaling.peerMuted";
/**
* Event triggered when participant's video type changes.
* @param {string} endpointId the video owner's ID (MUC nickname)
* @param {VideoType} videoType the new value
*/
export const PEER_VIDEO_TYPE_CHANGED: "signaling.peerVideoType";
export declare enum SignalingEvents {
/**
* Event triggered when participant's muted status changes.
* @param {string} endpointId the track owner's identifier (MUC nickname)
* @param {MediaType} mediaType "audio" or "video"
* @param {boolean} isMuted the new muted state
*/
PEER_MUTED_CHANGED = "signaling.peerMuted",
/**
* Event triggered when participant's video type changes.
* @param {string} endpointId the video owner's ID (MUC nickname)
* @param {VideoType} videoType the new value
*/
PEER_VIDEO_TYPE_CHANGED = "signaling.peerVideoType"
}
export declare const PEER_MUTED_CHANGED = SignalingEvents.PEER_MUTED_CHANGED;
export declare const PEER_VIDEO_TYPE_CHANGED = SignalingEvents.PEER_VIDEO_TYPE_CHANGED;

0 comments on commit c33f7c2

Please sign in to comment.