forked from jitsi/lib-jitsi-meet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ts) TypeScript enum for statistics Events
- Loading branch information
1 parent
5c07660
commit 993e0ba
Showing
3 changed files
with
86 additions
and
70 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
export enum Events { | ||
/** | ||
* Notifies about audio level in RTP statistics by SSRC. | ||
* | ||
* @param ssrc - The synchronization source identifier (SSRC) of the | ||
* endpoint/participant whose audio level is being reported. | ||
* @param {number} audioLevel - The audio level of <tt>ssrc</tt> according to | ||
* RTP statistics. | ||
* @param {boolean} isLocal - <tt>true</tt> if <tt>ssrc</tt> identifies the | ||
* local endpoint/participant; otherwise, <tt>false</tt>. | ||
*/ | ||
AUDIO_LEVEL = 'statistics.audioLevel', | ||
|
||
/** | ||
* An event fired just before the statistics module gets disposes and it's | ||
* the last chance to submit some logs that will end up in stats services like | ||
* CallStats (if enabled). | ||
*/ | ||
BEFORE_DISPOSED = 'statistics.before_disposed', | ||
|
||
/** | ||
* An event carrying all statistics by ssrc. | ||
*/ | ||
BYTE_SENT_STATS = 'statistics.byte_sent_stats', | ||
|
||
/** | ||
* An event carrying connection statistics. | ||
* | ||
* @param {object} connectionStats - The connection statistics carried by the | ||
* event such as <tt>bandwidth</tt>, <tt>bitrate</tt>, <tt>packetLoss</tt>, | ||
* <tt>resolution</tt>, and <tt>transport</tt>. | ||
*/ | ||
CONNECTION_STATS = 'statistics.connectionstats', | ||
|
||
/** | ||
* An event carrying performance stats. | ||
*/ | ||
LONG_TASKS_STATS = 'statistics.long_tasks_stats' | ||
}; | ||
|
||
// exported for backward compatibility | ||
export const AUDIO_LEVEL = Events.AUDIO_LEVEL; | ||
export const BEFORE_DISPOSED = Events.BEFORE_DISPOSED; | ||
export const BYTE_SENT_STATS = Events.BYTE_SENT_STATS; | ||
export const CONNECTION_STATS = Events.CONNECTION_STATS; | ||
export const LONG_TASKS_STATS = Events.LONG_TASKS_STATS; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,40 @@ | ||
/** | ||
* Notifies about audio level in RTP statistics by SSRC. | ||
* | ||
* @param ssrc - The synchronization source identifier (SSRC) of the | ||
* endpoint/participant whose audio level is being reported. | ||
* @param {number} audioLevel - The audio level of <tt>ssrc</tt> according to | ||
* RTP statistics. | ||
* @param {boolean} isLocal - <tt>true</tt> if <tt>ssrc</tt> identifies the | ||
* local endpoint/participant; otherwise, <tt>false</tt>. | ||
*/ | ||
export const AUDIO_LEVEL: "statistics.audioLevel"; | ||
/** | ||
* An event fired just before the statistics module gets disposes and it's | ||
* the last chance to submit some logs that will end up in stats services like | ||
* CallStats (if enabled). | ||
*/ | ||
export const BEFORE_DISPOSED: "statistics.before_disposed"; | ||
/** | ||
* An event carrying all statistics by ssrc. | ||
*/ | ||
export const BYTE_SENT_STATS: "statistics.byte_sent_stats"; | ||
/** | ||
* An event carrying connection statistics. | ||
* | ||
* @param {object} connectionStats - The connection statistics carried by the | ||
* event such as <tt>bandwidth</tt>, <tt>bitrate</tt>, <tt>packetLoss</tt>, | ||
* <tt>resolution</tt>, and <tt>transport</tt>. | ||
*/ | ||
export const CONNECTION_STATS: "statistics.connectionstats"; | ||
/** | ||
* An event carrying performance stats. | ||
*/ | ||
export const LONG_TASKS_STATS: "statistics.long_tasks_stats"; | ||
export declare enum Events { | ||
/** | ||
* Notifies about audio level in RTP statistics by SSRC. | ||
* | ||
* @param ssrc - The synchronization source identifier (SSRC) of the | ||
* endpoint/participant whose audio level is being reported. | ||
* @param {number} audioLevel - The audio level of <tt>ssrc</tt> according to | ||
* RTP statistics. | ||
* @param {boolean} isLocal - <tt>true</tt> if <tt>ssrc</tt> identifies the | ||
* local endpoint/participant; otherwise, <tt>false</tt>. | ||
*/ | ||
AUDIO_LEVEL = "statistics.audioLevel", | ||
/** | ||
* An event fired just before the statistics module gets disposes and it's | ||
* the last chance to submit some logs that will end up in stats services like | ||
* CallStats (if enabled). | ||
*/ | ||
BEFORE_DISPOSED = "statistics.before_disposed", | ||
/** | ||
* An event carrying all statistics by ssrc. | ||
*/ | ||
BYTE_SENT_STATS = "statistics.byte_sent_stats", | ||
/** | ||
* An event carrying connection statistics. | ||
* | ||
* @param {object} connectionStats - The connection statistics carried by the | ||
* event such as <tt>bandwidth</tt>, <tt>bitrate</tt>, <tt>packetLoss</tt>, | ||
* <tt>resolution</tt>, and <tt>transport</tt>. | ||
*/ | ||
CONNECTION_STATS = "statistics.connectionstats", | ||
/** | ||
* An event carrying performance stats. | ||
*/ | ||
LONG_TASKS_STATS = "statistics.long_tasks_stats" | ||
} | ||
export declare const AUDIO_LEVEL = Events.AUDIO_LEVEL; | ||
export declare const BEFORE_DISPOSED = Events.BEFORE_DISPOSED; | ||
export declare const BYTE_SENT_STATS = Events.BYTE_SENT_STATS; | ||
export declare const CONNECTION_STATS = Events.CONNECTION_STATS; | ||
export declare const LONG_TASKS_STATS = Events.LONG_TASKS_STATS; |