From 6ad75a95c62f7ec92c4a0ae0d40d68996ced1de7 Mon Sep 17 00:00:00 2001 From: Karina Sigartau Date: Fri, 4 Jun 2021 15:20:55 +0300 Subject: [PATCH] feat(MeetingsAdapter): add MediaPermissions enum --- src/MeetingsAdapter.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/MeetingsAdapter.js b/src/MeetingsAdapter.js index c746e01..9b4cf00 100644 --- a/src/MeetingsAdapter.js +++ b/src/MeetingsAdapter.js @@ -90,6 +90,22 @@ export const MeetingState = { LEFT: 'LEFT', // the user has left the meeting }; +/** + * Enum for media permissions states. + * A falsy value for the media permission means that it is unknown (eg: the meeting was just created). + * + * @readonly + * @enum {string} + */ +export const MediaPermissions = { + ASKING: 'ASKING', // set while requesting the user for permission to access media device + ALLOWED: 'ALLOWED', // set when the user has allowed permission to access media device + DENIED: 'DENIED', // set when the user has denied access to media device + DISMISSED: 'DISMISSED', // set when the user has dismissed the media device access prompt without allowing or denying access + ERROR: 'ERROR', // set when there is an error while requesting access to media device + IGNORED: 'IGNORED', // set when the user has chosen to not interact with the device access +}; + /** * This is a base class that defines the interface that maps meetings data. * Developers that want to extend `MeetingsAdapter` must implement all of its methods,