From d74a417db64636f5325056a7ddc179e94500f53b Mon Sep 17 00:00:00 2001 From: Gary Hunt Date: Mon, 21 Feb 2022 16:49:44 +0000 Subject: [PATCH] feat(ts) TypeScript enum for xmpp MediaSessionEvents --- modules/xmpp/MediaSessionEvents.js | 6 ------ modules/xmpp/MediaSessionEvents.ts | 8 ++++++++ types/auto/modules/xmpp/MediaSessionEvents.d.ts | 9 ++++++--- 3 files changed, 14 insertions(+), 9 deletions(-) delete mode 100644 modules/xmpp/MediaSessionEvents.js create mode 100644 modules/xmpp/MediaSessionEvents.ts diff --git a/modules/xmpp/MediaSessionEvents.js b/modules/xmpp/MediaSessionEvents.js deleted file mode 100644 index 46713a3b30..0000000000 --- a/modules/xmpp/MediaSessionEvents.js +++ /dev/null @@ -1,6 +0,0 @@ -export default { - /** - * Event triggered when the remote party signals it's receive video max frame height. - */ - REMOTE_VIDEO_CONSTRAINTS_CHANGED: 'media_session.REMOTE_VIDEO_CONSTRAINTS_CHANGED' -}; diff --git a/modules/xmpp/MediaSessionEvents.ts b/modules/xmpp/MediaSessionEvents.ts new file mode 100644 index 0000000000..3f06c8a806 --- /dev/null +++ b/modules/xmpp/MediaSessionEvents.ts @@ -0,0 +1,8 @@ +enum MediaSessionEvents { + /** + * Event triggered when the remote party signals it's receive video max frame height. + */ + REMOTE_VIDEO_CONSTRAINTS_CHANGED = 'media_session.REMOTE_VIDEO_CONSTRAINTS_CHANGED' +}; + +export default MediaSessionEvents; \ No newline at end of file diff --git a/types/auto/modules/xmpp/MediaSessionEvents.d.ts b/types/auto/modules/xmpp/MediaSessionEvents.d.ts index 210b8e09b2..cf63d190d8 100644 --- a/types/auto/modules/xmpp/MediaSessionEvents.d.ts +++ b/types/auto/modules/xmpp/MediaSessionEvents.d.ts @@ -1,4 +1,7 @@ -declare namespace _default { - const REMOTE_VIDEO_CONSTRAINTS_CHANGED: string; +declare enum MediaSessionEvents { + /** + * Event triggered when the remote party signals it's receive video max frame height. + */ + REMOTE_VIDEO_CONSTRAINTS_CHANGED = "media_session.REMOTE_VIDEO_CONSTRAINTS_CHANGED" } -export default _default; +export default MediaSessionEvents;