Переглянути джерело

feat(ts) TypeScript enum for SignalingEvents

tags/v0.0.2
Gary Hunt 3 роки тому
джерело
коміт
c33f7c2bd9
Аккаунт користувача з таким Email не знайдено

+ 0
- 14
service/RTC/SignalingEvents.js Переглянути файл

@@ -1,14 +0,0 @@
1
-/**
2
- * Event triggered when participant's muted status changes.
3
- * @param {string} endpointId the track owner's identifier (MUC nickname)
4
- * @param {MediaType} mediaType "audio" or "video"
5
- * @param {boolean} isMuted the new muted state
6
- */
7
-export const PEER_MUTED_CHANGED = 'signaling.peerMuted';
8
-
9
-/**
10
- * Event triggered when participant's video type changes.
11
- * @param {string} endpointId the video owner's ID (MUC nickname)
12
- * @param {VideoType} videoType the new value
13
- */
14
-export const PEER_VIDEO_TYPE_CHANGED = 'signaling.peerVideoType';

+ 20
- 0
service/RTC/SignalingEvents.ts Переглянути файл

@@ -0,0 +1,20 @@
1
+export enum SignalingEvents {
2
+    /**
3
+     * Event triggered when participant's muted status changes.
4
+     * @param {string} endpointId the track owner's identifier (MUC nickname)
5
+     * @param {MediaType} mediaType "audio" or "video"
6
+     * @param {boolean} isMuted the new muted state
7
+     */
8
+    PEER_MUTED_CHANGED = 'signaling.peerMuted',
9
+
10
+    /**
11
+     * Event triggered when participant's video type changes.
12
+     * @param {string} endpointId the video owner's ID (MUC nickname)
13
+     * @param {VideoType} videoType the new value
14
+     */
15
+    PEER_VIDEO_TYPE_CHANGED = 'signaling.peerVideoType'
16
+}
17
+
18
+// exported for backward compatibility
19
+export const PEER_MUTED_CHANGED = SignalingEvents.PEER_MUTED_CHANGED;
20
+export const PEER_VIDEO_TYPE_CHANGED = SignalingEvents.PEER_VIDEO_TYPE_CHANGED;

+ 17
- 13
types/auto/service/RTC/SignalingEvents.d.ts Переглянути файл

@@ -1,13 +1,17 @@
1
-/**
2
- * Event triggered when participant's muted status changes.
3
- * @param {string} endpointId the track owner's identifier (MUC nickname)
4
- * @param {MediaType} mediaType "audio" or "video"
5
- * @param {boolean} isMuted the new muted state
6
- */
7
-export const PEER_MUTED_CHANGED: "signaling.peerMuted";
8
-/**
9
- * Event triggered when participant's video type changes.
10
- * @param {string} endpointId the video owner's ID (MUC nickname)
11
- * @param {VideoType} videoType the new value
12
- */
13
-export const PEER_VIDEO_TYPE_CHANGED: "signaling.peerVideoType";
1
+export declare enum SignalingEvents {
2
+    /**
3
+     * Event triggered when participant's muted status changes.
4
+     * @param {string} endpointId the track owner's identifier (MUC nickname)
5
+     * @param {MediaType} mediaType "audio" or "video"
6
+     * @param {boolean} isMuted the new muted state
7
+     */
8
+    PEER_MUTED_CHANGED = "signaling.peerMuted",
9
+    /**
10
+     * Event triggered when participant's video type changes.
11
+     * @param {string} endpointId the video owner's ID (MUC nickname)
12
+     * @param {VideoType} videoType the new value
13
+     */
14
+    PEER_VIDEO_TYPE_CHANGED = "signaling.peerVideoType"
15
+}
16
+export declare const PEER_MUTED_CHANGED = SignalingEvents.PEER_MUTED_CHANGED;
17
+export declare const PEER_VIDEO_TYPE_CHANGED = SignalingEvents.PEER_VIDEO_TYPE_CHANGED;

Завантаження…
Відмінити
Зберегти