@webex/plugin-meetings 3.0.0-beta.108 → 3.0.0-beta.109

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/dist/breakouts/breakout.js +1 -1
  2. package/dist/breakouts/index.js +1 -1
  3. package/dist/constants.js +21 -2
  4. package/dist/constants.js.map +1 -1
  5. package/dist/controls-options-manager/enums.js +2 -0
  6. package/dist/controls-options-manager/enums.js.map +1 -1
  7. package/dist/controls-options-manager/types.js.map +1 -1
  8. package/dist/controls-options-manager/util.js +36 -0
  9. package/dist/controls-options-manager/util.js.map +1 -1
  10. package/dist/locus-info/controlsUtils.js +39 -1
  11. package/dist/locus-info/controlsUtils.js.map +1 -1
  12. package/dist/locus-info/index.js +55 -0
  13. package/dist/locus-info/index.js.map +1 -1
  14. package/dist/meeting/in-meeting-actions.js +9 -1
  15. package/dist/meeting/in-meeting-actions.js.map +1 -1
  16. package/dist/meeting/index.js +84 -14
  17. package/dist/meeting/index.js.map +1 -1
  18. package/dist/types/constants.d.ts +16 -0
  19. package/dist/types/controls-options-manager/enums.d.ts +2 -0
  20. package/dist/types/controls-options-manager/types.d.ts +7 -1
  21. package/dist/types/meeting/in-meeting-actions.d.ts +8 -0
  22. package/package.json +19 -19
  23. package/src/constants.ts +22 -0
  24. package/src/controls-options-manager/enums.ts +2 -0
  25. package/src/controls-options-manager/types.ts +10 -0
  26. package/src/controls-options-manager/util.ts +45 -0
  27. package/src/locus-info/controlsUtils.ts +54 -0
  28. package/src/locus-info/index.ts +55 -0
  29. package/src/meeting/in-meeting-actions.ts +16 -0
  30. package/src/meeting/index.ts +70 -0
  31. package/test/unit/spec/controls-options-manager/util.js +108 -7
  32. package/test/unit/spec/locus-info/controlsUtils.js +112 -0
  33. package/test/unit/spec/locus-info/index.js +84 -1
  34. package/test/unit/spec/meeting/in-meeting-actions.ts +8 -0
  35. package/test/unit/spec/meeting/index.js +108 -0
@@ -1 +1 @@
1
- {"version":3,"names":["Utils","displayHints","includes","DISPLAY_HINTS","ENABLE_MUTE_ON_ENTRY","ENABLE_HARD_MUTE","DISABLE_MUTE_ON_ENTRY","DISABLE_HARD_MUTE","MUTE_ALL","UNMUTE_ALL","config","requiredHints","every","hint","control","properties","muted","push","disallowUnmute","muteOnEntry","hasHints","enabled","ENABLE_REACTIONS","DISABLE_REACTIONS","showDisplayNameWithReactions","ENABLE_SHOW_DISPLAY_NAME","DISABLE_SHOW_DISPLAY_NAME","SHARE_CONTROL","ENABLE_VIEW_THE_PARTICIPANT_LIST","DISABLE_VIEW_THE_PARTICIPANT_LIST","determinant","scope","Control","audio","canUpdateAudio","reactions","canUpdateReactions","shareControl","canUpdateShareControl","viewTheParticipantList","canUpdateViewTheParticipantsList"],"sources":["util.ts"],"sourcesContent":["import {DISPLAY_HINTS} from '../constants';\nimport {Control} from './enums';\nimport {\n ControlConfig,\n AudioProperties,\n ReactionsProperties,\n ViewTheParticipantListProperties,\n} from './types';\n\n/**\n * The Controls Options Manager utilities\n *\n * @internal\n */\nclass Utils {\n /**\n * Validate if enabling mute on entry can be set.\n *\n * @param {Array<string>} displayHints - Display Hints to use when validating.\n * @returns {boolean} - True if the action is allowed.\n */\n public static canSetMuteOnEntry(displayHints: Array<string>): boolean {\n return displayHints.includes(DISPLAY_HINTS.ENABLE_MUTE_ON_ENTRY);\n }\n\n /**\n * Validate if allowing unmuting can be set.\n *\n * @param {Array<string>} displayHints - Display Hints to use when validating.\n * @returns {boolean} - True if the action is allowed.\n */\n public static canSetDisallowUnmute(displayHints: Array<string>): boolean {\n return displayHints.includes(DISPLAY_HINTS.ENABLE_HARD_MUTE);\n }\n\n /**\n * Validate if disabling mute on entry can be set.\n *\n * @param {Array<string>} displayHints - Display Hints to use when validating.\n * @returns {boolean} - True if the action is allowed.\n */\n public static canUnsetMuteOnEntry(displayHints: Array<string>): boolean {\n return displayHints.includes(DISPLAY_HINTS.DISABLE_MUTE_ON_ENTRY);\n }\n\n /**\n * Validate if enabling muting can be set.\n *\n * @param {Array<string>} displayHints - Display Hints to use when validating.\n * @returns {boolean} - True if the action is allowed.\n */\n public static canUnsetDisallowUnmute(displayHints: Array<string>): boolean {\n return displayHints.includes(DISPLAY_HINTS.DISABLE_HARD_MUTE);\n }\n\n /**\n * Validate if muting all can be set.\n *\n * @param {Array<string>} displayHints - Display Hints to use when validating.\n * @returns {boolean} - True if the action is allowed.\n */\n public static canSetMuted(displayHints: Array<string>): boolean {\n return displayHints.includes(DISPLAY_HINTS.MUTE_ALL);\n }\n\n /**\n * Validate if unmuting all can be set.\n *\n * @param {Array<string>} displayHints - Display Hints to use when validating.\n * @returns {boolean} - True if the action is allowed.\n */\n public static canUnsetMuted(displayHints: Array<string>): boolean {\n return displayHints.includes(DISPLAY_HINTS.UNMUTE_ALL);\n }\n\n /**\n * Validate an array of hints are allowed based on a full collection of hints.\n *\n * @param {Object} config - Configuration Object.\n * @param {Array<string>} config.requiredHints - Hints required for validation.\n * @param {Array<string>} config.displayHints - All available hints.\n * @returns {boolean} - True if all of the actions are allowed.\n */\n public static hasHints(config: {requiredHints: Array<string>; displayHints: Array<string>}) {\n const {requiredHints, displayHints} = config;\n\n return requiredHints.every((hint) => displayHints.includes(hint));\n }\n\n /**\n * Validate if an audio-scoped control is allowed to be sent to the service.\n *\n * @param {ControlConfig<AudioProperties>} control - Audio control config to validate.\n * @param {Array<string>} displayHints - All available hints.\n * @returns {boolean} - True if all of the actions are allowed.\n */\n public static canUpdateAudio(\n control: ControlConfig<AudioProperties>,\n displayHints: Array<string>\n ) {\n const requiredHints = [];\n\n if (control.properties.muted === true) {\n requiredHints.push(DISPLAY_HINTS.MUTE_ALL);\n }\n if (control.properties.muted === false) {\n requiredHints.push(DISPLAY_HINTS.UNMUTE_ALL);\n }\n if (control.properties.disallowUnmute === true) {\n requiredHints.push(DISPLAY_HINTS.ENABLE_HARD_MUTE);\n }\n if (control.properties.disallowUnmute === false) {\n requiredHints.push(DISPLAY_HINTS.DISABLE_HARD_MUTE);\n }\n if (control.properties.muteOnEntry === true) {\n requiredHints.push(DISPLAY_HINTS.ENABLE_MUTE_ON_ENTRY);\n }\n if (control.properties.muteOnEntry === false) {\n requiredHints.push(DISPLAY_HINTS.DISABLE_MUTE_ON_ENTRY);\n }\n\n return Utils.hasHints({requiredHints, displayHints});\n }\n\n /**\n * Validate if an reactions-scoped control is allowed to be sent to the service.\n *\n * @param {ControlConfig<ReactionsProperties>} control - Reaction control config to validate.\n * @param {Array<string>} displayHints - All available hints.\n * @returns {boolean} - True if all of the actions are allowed.\n */\n public static canUpdateReactions(\n control: ControlConfig<ReactionsProperties>,\n displayHints: Array<string>\n ) {\n const requiredHints = [];\n\n if (control.properties.enabled === true) {\n requiredHints.push(DISPLAY_HINTS.ENABLE_REACTIONS);\n }\n if (control.properties.enabled === false) {\n requiredHints.push(DISPLAY_HINTS.DISABLE_REACTIONS);\n }\n if (control.properties.showDisplayNameWithReactions === true) {\n requiredHints.push(DISPLAY_HINTS.ENABLE_SHOW_DISPLAY_NAME);\n }\n if (control.properties.showDisplayNameWithReactions === false) {\n requiredHints.push(DISPLAY_HINTS.DISABLE_SHOW_DISPLAY_NAME);\n }\n\n return Utils.hasHints({requiredHints, displayHints});\n }\n\n /**\n * Validate if an share-control-scoped control is allowed to be sent to the service.\n *\n * @param {Array<string>} displayHints - All available hints.\n * @returns {boolean} - True if all of the actions are allowed.\n */\n public static canUpdateShareControl(displayHints: Array<string>) {\n return Utils.hasHints({requiredHints: [DISPLAY_HINTS.SHARE_CONTROL], displayHints});\n }\n\n /**\n * Validate if an view-the-participants-list-scoped control is allowed to be sent to the service.\n *\n * @param {ControlConfig<ViewTheParticipantListProperties>} control - View Participants List control config to validate.\n * @param {Array<string>} displayHints - All available hints.\n * @returns {boolean} - True if all of the actions are allowed.\n */\n public static canUpdateViewTheParticipantsList(\n control: ControlConfig<ViewTheParticipantListProperties>,\n displayHints: Array<string>\n ) {\n const requiredHints = [];\n\n if (control.properties.enabled === true) {\n requiredHints.push(DISPLAY_HINTS.ENABLE_VIEW_THE_PARTICIPANT_LIST);\n }\n if (control.properties.enabled === false) {\n requiredHints.push(DISPLAY_HINTS.DISABLE_VIEW_THE_PARTICIPANT_LIST);\n }\n\n return Utils.hasHints({requiredHints, displayHints});\n }\n\n /**\n * Validate that a control can be sent to the service based on the provided\n * display hints.\n *\n * @param {ControlConfig} control - Control to validate.\n * @param {Array<string>} displayHints - All available hints.\n * @returns {boolean} - True if all of the actions are allowed.\n */\n public static canUpdate(control: ControlConfig, displayHints: Array<string>) {\n let determinant: boolean;\n\n switch (control.scope) {\n case Control.audio:\n determinant = Utils.canUpdateAudio(control as ControlConfig<AudioProperties>, displayHints);\n break;\n\n case Control.reactions:\n determinant = Utils.canUpdateReactions(\n control as ControlConfig<ReactionsProperties>,\n displayHints\n );\n break;\n\n case Control.shareControl:\n determinant = Utils.canUpdateShareControl(displayHints);\n break;\n\n case Control.viewTheParticipantList:\n determinant = Utils.canUpdateViewTheParticipantsList(\n control as ControlConfig<ViewTheParticipantListProperties>,\n displayHints\n );\n break;\n\n default:\n determinant = false;\n }\n\n return determinant;\n }\n}\n\nexport default Utils;\n"],"mappings":";;;;;;;;;;AAAA;AACA;AAQA;AACA;AACA;AACA;AACA;AAJA,IAKMA,KAAK;EAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IACT;AACF;AACA;AACA;AACA;AACA;IACE,2BAAgCC,YAA2B,EAAW;MACpE,OAAOA,YAAY,CAACC,QAAQ,CAACC,wBAAa,CAACC,oBAAoB,CAAC;IAClE;;IAEA;AACF;AACA;AACA;AACA;AACA;EALE;IAAA;IAAA,OAMA,8BAAmCH,YAA2B,EAAW;MACvE,OAAOA,YAAY,CAACC,QAAQ,CAACC,wBAAa,CAACE,gBAAgB,CAAC;IAC9D;;IAEA;AACF;AACA;AACA;AACA;AACA;EALE;IAAA;IAAA,OAMA,6BAAkCJ,YAA2B,EAAW;MACtE,OAAOA,YAAY,CAACC,QAAQ,CAACC,wBAAa,CA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D;QAEF,KAAK+B,cAAO,CAACO,sBAAsB;UACjCT,WAAW,GAAG9B,KAAK,CAACwC,gCAAgC,CAClD1B,OAAO,EACPb,YAAY,CACb;UACD;QAEF;UACE6B,WAAW,GAAG,KAAK;MAAC;MAGxB,OAAOA,WAAW;IACpB;EAAC;EAAA;AAAA;AAAA,eAGY9B,KAAK;AAAA"}
1
+ {"version":3,"names":["Utils","displayHints","includes","DISPLAY_HINTS","ENABLE_MUTE_ON_ENTRY","ENABLE_HARD_MUTE","DISABLE_MUTE_ON_ENTRY","DISABLE_HARD_MUTE","MUTE_ALL","UNMUTE_ALL","config","requiredHints","every","hint","control","properties","muted","push","disallowUnmute","muteOnEntry","hasHints","enabled","ENABLE_RAISE_HAND","DISABLE_RAISE_HAND","ENABLE_REACTIONS","DISABLE_REACTIONS","showDisplayNameWithReactions","ENABLE_SHOW_DISPLAY_NAME","DISABLE_SHOW_DISPLAY_NAME","SHARE_CONTROL","ENABLE_VIEW_THE_PARTICIPANT_LIST","DISABLE_VIEW_THE_PARTICIPANT_LIST","ENABLE_VIDEO","DISABLE_VIDEO","determinant","scope","Control","audio","canUpdateAudio","raiseHand","canUpdateRaiseHand","reactions","canUpdateReactions","shareControl","canUpdateShareControl","video","canUpdateVideo","viewTheParticipantList","canUpdateViewTheParticipantsList"],"sources":["util.ts"],"sourcesContent":["import {DISPLAY_HINTS} from '../constants';\nimport {Control} from './enums';\nimport {\n ControlConfig,\n AudioProperties,\n RaiseHandProperties,\n ReactionsProperties,\n ViewTheParticipantListProperties,\n VideoProperties,\n} from './types';\n\n/**\n * The Controls Options Manager utilities\n *\n * @internal\n */\nclass Utils {\n /**\n * Validate if enabling mute on entry can be set.\n *\n * @param {Array<string>} displayHints - Display Hints to use when validating.\n * @returns {boolean} - True if the action is allowed.\n */\n public static canSetMuteOnEntry(displayHints: Array<string>): boolean {\n return displayHints.includes(DISPLAY_HINTS.ENABLE_MUTE_ON_ENTRY);\n }\n\n /**\n * Validate if allowing unmuting can be set.\n *\n * @param {Array<string>} displayHints - Display Hints to use when validating.\n * @returns {boolean} - True if the action is allowed.\n */\n public static canSetDisallowUnmute(displayHints: Array<string>): boolean {\n return displayHints.includes(DISPLAY_HINTS.ENABLE_HARD_MUTE);\n }\n\n /**\n * Validate if disabling mute on entry can be set.\n *\n * @param {Array<string>} displayHints - Display Hints to use when validating.\n * @returns {boolean} - True if the action is allowed.\n */\n public static canUnsetMuteOnEntry(displayHints: Array<string>): boolean {\n return displayHints.includes(DISPLAY_HINTS.DISABLE_MUTE_ON_ENTRY);\n }\n\n /**\n * Validate if enabling muting can be set.\n *\n * @param {Array<string>} displayHints - Display Hints to use when validating.\n * @returns {boolean} - True if the action is allowed.\n */\n public static canUnsetDisallowUnmute(displayHints: Array<string>): boolean {\n return displayHints.includes(DISPLAY_HINTS.DISABLE_HARD_MUTE);\n }\n\n /**\n * Validate if muting all can be set.\n *\n * @param {Array<string>} displayHints - Display Hints to use when validating.\n * @returns {boolean} - True if the action is allowed.\n */\n public static canSetMuted(displayHints: Array<string>): boolean {\n return displayHints.includes(DISPLAY_HINTS.MUTE_ALL);\n }\n\n /**\n * Validate if unmuting all can be set.\n *\n * @param {Array<string>} displayHints - Display Hints to use when validating.\n * @returns {boolean} - True if the action is allowed.\n */\n public static canUnsetMuted(displayHints: Array<string>): boolean {\n return displayHints.includes(DISPLAY_HINTS.UNMUTE_ALL);\n }\n\n /**\n * Validate an array of hints are allowed based on a full collection of hints.\n *\n * @param {Object} config - Configuration Object.\n * @param {Array<string>} config.requiredHints - Hints required for validation.\n * @param {Array<string>} config.displayHints - All available hints.\n * @returns {boolean} - True if all of the actions are allowed.\n */\n public static hasHints(config: {requiredHints: Array<string>; displayHints: Array<string>}) {\n const {requiredHints, displayHints} = config;\n\n return requiredHints.every((hint) => displayHints.includes(hint));\n }\n\n /**\n * Validate if an audio-scoped control is allowed to be sent to the service.\n *\n * @param {ControlConfig<AudioProperties>} control - Audio control config to validate.\n * @param {Array<string>} displayHints - All available hints.\n * @returns {boolean} - True if all of the actions are allowed.\n */\n public static canUpdateAudio(\n control: ControlConfig<AudioProperties>,\n displayHints: Array<string>\n ) {\n const requiredHints = [];\n\n if (control.properties.muted === true) {\n requiredHints.push(DISPLAY_HINTS.MUTE_ALL);\n }\n if (control.properties.muted === false) {\n requiredHints.push(DISPLAY_HINTS.UNMUTE_ALL);\n }\n if (control.properties.disallowUnmute === true) {\n requiredHints.push(DISPLAY_HINTS.ENABLE_HARD_MUTE);\n }\n if (control.properties.disallowUnmute === false) {\n requiredHints.push(DISPLAY_HINTS.DISABLE_HARD_MUTE);\n }\n if (control.properties.muteOnEntry === true) {\n requiredHints.push(DISPLAY_HINTS.ENABLE_MUTE_ON_ENTRY);\n }\n if (control.properties.muteOnEntry === false) {\n requiredHints.push(DISPLAY_HINTS.DISABLE_MUTE_ON_ENTRY);\n }\n\n return Utils.hasHints({requiredHints, displayHints});\n }\n\n public static canUpdateRaiseHand(\n control: ControlConfig<RaiseHandProperties>,\n displayHints: Array<string>\n ) {\n const requiredHints = [];\n\n if (control.properties.enabled === true) {\n requiredHints.push(DISPLAY_HINTS.ENABLE_RAISE_HAND);\n }\n if (control.properties.enabled === false) {\n requiredHints.push(DISPLAY_HINTS.DISABLE_RAISE_HAND);\n }\n\n return Utils.hasHints({requiredHints, displayHints});\n }\n\n /**\n * Validate if an reactions-scoped control is allowed to be sent to the service.\n *\n * @param {ControlConfig<ReactionsProperties>} control - Reaction control config to validate.\n * @param {Array<string>} displayHints - All available hints.\n * @returns {boolean} - True if all of the actions are allowed.\n */\n public static canUpdateReactions(\n control: ControlConfig<ReactionsProperties>,\n displayHints: Array<string>\n ) {\n const requiredHints = [];\n\n if (control.properties.enabled === true) {\n requiredHints.push(DISPLAY_HINTS.ENABLE_REACTIONS);\n }\n if (control.properties.enabled === false) {\n requiredHints.push(DISPLAY_HINTS.DISABLE_REACTIONS);\n }\n if (control.properties.showDisplayNameWithReactions === true) {\n requiredHints.push(DISPLAY_HINTS.ENABLE_SHOW_DISPLAY_NAME);\n }\n if (control.properties.showDisplayNameWithReactions === false) {\n requiredHints.push(DISPLAY_HINTS.DISABLE_SHOW_DISPLAY_NAME);\n }\n\n return Utils.hasHints({requiredHints, displayHints});\n }\n\n /**\n * Validate if an share-control-scoped control is allowed to be sent to the service.\n *\n * @param {Array<string>} displayHints - All available hints.\n * @returns {boolean} - True if all of the actions are allowed.\n */\n public static canUpdateShareControl(displayHints: Array<string>) {\n return Utils.hasHints({requiredHints: [DISPLAY_HINTS.SHARE_CONTROL], displayHints});\n }\n\n /**\n * Validate if an view-the-participants-list-scoped control is allowed to be sent to the service.\n *\n * @param {ControlConfig<ViewTheParticipantListProperties>} control - View Participants List control config to validate.\n * @param {Array<string>} displayHints - All available hints.\n * @returns {boolean} - True if all of the actions are allowed.\n */\n public static canUpdateViewTheParticipantsList(\n control: ControlConfig<ViewTheParticipantListProperties>,\n displayHints: Array<string>\n ) {\n const requiredHints = [];\n\n if (control.properties.enabled === true) {\n requiredHints.push(DISPLAY_HINTS.ENABLE_VIEW_THE_PARTICIPANT_LIST);\n }\n if (control.properties.enabled === false) {\n requiredHints.push(DISPLAY_HINTS.DISABLE_VIEW_THE_PARTICIPANT_LIST);\n }\n\n return Utils.hasHints({requiredHints, displayHints});\n }\n\n public static canUpdateVideo(\n control: ControlConfig<VideoProperties>,\n displayHints: Array<string>\n ) {\n const requiredHints = [];\n\n if (control.properties.enabled === true) {\n requiredHints.push(DISPLAY_HINTS.ENABLE_VIDEO);\n }\n if (control.properties.enabled === false) {\n requiredHints.push(DISPLAY_HINTS.DISABLE_VIDEO);\n }\n\n return Utils.hasHints({requiredHints, displayHints});\n }\n\n /**\n * Validate that a control can be sent to the service based on the provided\n * display hints.\n *\n * @param {ControlConfig} control - Control to validate.\n * @param {Array<string>} displayHints - All available hints.\n * @returns {boolean} - True if all of the actions are allowed.\n */\n public static canUpdate(control: ControlConfig, displayHints: Array<string>) {\n let determinant: boolean;\n\n switch (control.scope) {\n case Control.audio:\n determinant = Utils.canUpdateAudio(control as ControlConfig<AudioProperties>, displayHints);\n break;\n\n case Control.raiseHand:\n determinant = Utils.canUpdateRaiseHand(\n control as ControlConfig<RaiseHandProperties>,\n displayHints\n );\n break;\n\n case Control.reactions:\n determinant = Utils.canUpdateReactions(\n control as ControlConfig<ReactionsProperties>,\n displayHints\n );\n break;\n\n case Control.shareControl:\n determinant = Utils.canUpdateShareControl(displayHints);\n break;\n\n case Control.video:\n determinant = Utils.canUpdateVideo(control as ControlConfig<VideoProperties>, displayHints);\n break;\n\n case Control.viewTheParticipantList:\n determinant = Utils.canUpdateViewTheParticipantsList(\n control as ControlConfig<ViewTheParticipantListProperties>,\n displayHints\n );\n break;\n\n default:\n determinant = false;\n }\n\n return determinant;\n }\n}\n\nexport default Utils;\n"],"mappings":";;;;;;;;;;AAAA;AACA;AAUA;AACA;AACA;AACA;AACA;AAJA,IAKMA,KAAK;EAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IACT;AACF;AACA;AACA;AACA;AACA;IACE,2BAAgCC,YAA2B,EAAW;MACpE,OAAOA,YAAY,CAACC,QAAQ,CAACC,wBAAa,CAACC,oBAAoB,CAAC;IAClE;;IAEA;AACF;AACA;AACA;AACA;AACA;EALE;IAAA;IAAA,OAMA,8BAAmCH,YAA2B,EAAW;MACvE,OAAOA,YAAY,CAACC,QAAQ,CAACC,wBAAa,CAACE,gBAAgB,CAAC;IAC9D;;IAEA;AACF;AACA;AACA;AACA;AACA;EALE;IAAA;IAAA,OAMA,6BAAkCJ,YAA2B,EAAW;MACtE,OAAOA,YAAY,CAACC,QAAQ,CAACC,wBAAa,CAACG,qBAAqB,CAAC;IACnE;;IAEA;AACF;AACA;AACA;AACA;AACA;EALE;IAAA;IAAA,OAMA,gCAAqCL,YAA2B,EAAW;MACzE,OAAOA,YAAY,CAACC,QAAQ,CAACC,wBAAa,CAACI,iBAAiB,CAAC;IAC/D;;IAEA;AACF;AACA;AACA;AACA;AACA;EALE;IAAA;IAAA,OAMA,qBA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AAO,KAAK,KAAK,EAAE;QACxCV,aAAa,CAACM,IAAI,CAACd,wBAAa,CAAC8B,aAAa,CAAC;MACjD;MAEA,OAAOjC,KAAK,CAACoB,QAAQ,CAAC;QAACT,aAAa,EAAbA,aAAa;QAAEV,YAAY,EAAZA;MAAY,CAAC,CAAC;IACtD;;IAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EAPE;IAAA;IAAA,OAQA,mBAAwBa,OAAsB,EAAEb,YAA2B,EAAE;MAC3E,IAAIiC,WAAoB;MAExB,QAAQpB,OAAO,CAACqB,KAAK;QACnB,KAAKC,cAAO,CAACC,KAAK;UAChBH,WAAW,GAAGlC,KAAK,CAACsC,cAAc,CAACxB,OAAO,EAAoCb,YAAY,CAAC;UAC3F;QAEF,KAAKmC,cAAO,CAACG,SAAS;UACpBL,WAAW,GAAGlC,KAAK,CAACwC,kBAAkB,CACpC1B,OAAO,EACPb,YAAY,CACb;UACD;QAEF,KAAKmC,cAAO,CAACK,SAAS;UACpBP,WAAW,GAAGlC,KAAK,CAAC0C,kBAAkB,CACpC5B,OAAO,EACPb,YAAY,CACb;UACD;QAEF,KAAKmC,cAAO,CAACO,YAAY;UACvBT,WAAW,GAAGlC,KAAK,CAAC4C,qBAAqB,CAAC3C,YAAY,CAAC;UACvD;QAEF,KAAKmC,cAAO,CAACS,KAAK;UAChBX,WAAW,GAAGlC,KAAK,CAAC8C,cAAc,CAAChC,OAAO,EAAoCb,YAAY,CAAC;UAC3F;QAEF,KAAKmC,cAAO,CAACW,sBAAsB;UACjCb,WAAW,GAAGlC,KAAK,CAACgD,gCAAgC,CAClDlC,OAAO,EACPb,YAAY,CACb;UACD;QAEF;UACEiC,WAAW,GAAG,KAAK;MAAC;MAGxB,OAAOA,WAAW;IACpB;EAAC;EAAA;AAAA;AAAA,eAGYlC,KAAK;AAAA"}
@@ -60,6 +60,37 @@ ControlsUtils.parse = function (controls) {
60
60
  if (controls && controls.video) {
61
61
  parsedControls.videoEnabled = controls.video.enabled;
62
62
  }
63
+ if (controls !== null && controls !== void 0 && controls.muteOnEntry) {
64
+ parsedControls.muteOnEntry = {
65
+ enabled: controls.muteOnEntry.enabled
66
+ };
67
+ }
68
+ if (controls !== null && controls !== void 0 && controls.shareControl) {
69
+ parsedControls.shareControl = {
70
+ control: controls.shareControl.control
71
+ };
72
+ }
73
+ if (controls !== null && controls !== void 0 && controls.disallowUnmute) {
74
+ parsedControls.disallowUnmute = {
75
+ enabled: controls.disallowUnmute.enabled
76
+ };
77
+ }
78
+ if (controls !== null && controls !== void 0 && controls.reactions) {
79
+ parsedControls.reactions = {
80
+ enabled: controls.reactions.enabled,
81
+ showDisplayNameWithReactions: controls.reactions.showDisplayNameWithReactions
82
+ };
83
+ }
84
+ if (controls !== null && controls !== void 0 && controls.viewTheParticipantList) {
85
+ parsedControls.viewTheParticipantList = {
86
+ enabled: controls.viewTheParticipantList.enabled
87
+ };
88
+ }
89
+ if (controls !== null && controls !== void 0 && controls.raiseHand) {
90
+ parsedControls.raiseHand = {
91
+ enabled: controls.raiseHand.enabled
92
+ };
93
+ }
63
94
  return parsedControls;
64
95
  };
65
96
 
@@ -70,13 +101,20 @@ ControlsUtils.parse = function (controls) {
70
101
  * @returns {Object} combination of state plus the changes
71
102
  */
72
103
  ControlsUtils.getControls = function (oldControls, newControls) {
73
- var _previous$record, _previous$record2, _current$record, _previous$record3, _current$record2, _previous$record4, _current$record3, _previous$meetingCont, _current$meetingConta, _previous$transcribe, _current$transcribe, _previous$transcribe2, _current$transcribe2, _newControls$video;
104
+ var _current$muteOnEntry, _current$muteOnEntry2, _previous$muteOnEntry, _current$shareControl, _current$shareControl2, _previous$shareContro, _current$disallowUnmu, _current$disallowUnmu2, _previous$disallowUnm, _current$reactions, _current$reactions2, _previous$reactions, _current$reactions3, _current$reactions4, _previous$reactions2, _current$viewTheParti, _current$viewTheParti2, _previous$viewThePart, _current$raiseHand, _current$raiseHand2, _previous$raiseHand, _previous$record, _previous$record2, _current$record, _previous$record3, _current$record2, _previous$record4, _current$record3, _previous$meetingCont, _current$meetingConta, _previous$transcribe, _current$transcribe, _previous$transcribe2, _current$transcribe2, _newControls$video;
74
105
  var previous = ControlsUtils.parse(oldControls);
75
106
  var current = ControlsUtils.parse(newControls);
76
107
  return {
77
108
  previous: previous,
78
109
  current: current,
79
110
  updates: {
111
+ hasMuteOnEntryChanged: (current === null || current === void 0 ? void 0 : (_current$muteOnEntry = current.muteOnEntry) === null || _current$muteOnEntry === void 0 ? void 0 : _current$muteOnEntry.enabled) && (current === null || current === void 0 ? void 0 : (_current$muteOnEntry2 = current.muteOnEntry) === null || _current$muteOnEntry2 === void 0 ? void 0 : _current$muteOnEntry2.enabled) !== (previous === null || previous === void 0 ? void 0 : (_previous$muteOnEntry = previous.muteOnEntry) === null || _previous$muteOnEntry === void 0 ? void 0 : _previous$muteOnEntry.enabled),
112
+ hasShareControlChanged: (current === null || current === void 0 ? void 0 : (_current$shareControl = current.shareControl) === null || _current$shareControl === void 0 ? void 0 : _current$shareControl.control) && (current === null || current === void 0 ? void 0 : (_current$shareControl2 = current.shareControl) === null || _current$shareControl2 === void 0 ? void 0 : _current$shareControl2.control) !== (previous === null || previous === void 0 ? void 0 : (_previous$shareContro = previous.shareControl) === null || _previous$shareContro === void 0 ? void 0 : _previous$shareContro.control),
113
+ hasDisallowUnmuteChanged: (current === null || current === void 0 ? void 0 : (_current$disallowUnmu = current.disallowUnmute) === null || _current$disallowUnmu === void 0 ? void 0 : _current$disallowUnmu.enabled) && (current === null || current === void 0 ? void 0 : (_current$disallowUnmu2 = current.disallowUnmute) === null || _current$disallowUnmu2 === void 0 ? void 0 : _current$disallowUnmu2.enabled) !== (previous === null || previous === void 0 ? void 0 : (_previous$disallowUnm = previous.disallowUnmute) === null || _previous$disallowUnm === void 0 ? void 0 : _previous$disallowUnm.enabled),
114
+ hasReactionsChanged: (current === null || current === void 0 ? void 0 : (_current$reactions = current.reactions) === null || _current$reactions === void 0 ? void 0 : _current$reactions.enabled) && (current === null || current === void 0 ? void 0 : (_current$reactions2 = current.reactions) === null || _current$reactions2 === void 0 ? void 0 : _current$reactions2.enabled) !== (previous === null || previous === void 0 ? void 0 : (_previous$reactions = previous.reactions) === null || _previous$reactions === void 0 ? void 0 : _previous$reactions.enabled),
115
+ hasReactionDisplayNamesChanged: (current === null || current === void 0 ? void 0 : (_current$reactions3 = current.reactions) === null || _current$reactions3 === void 0 ? void 0 : _current$reactions3.showDisplayNameWithReactions) && (current === null || current === void 0 ? void 0 : (_current$reactions4 = current.reactions) === null || _current$reactions4 === void 0 ? void 0 : _current$reactions4.showDisplayNameWithReactions) !== (previous === null || previous === void 0 ? void 0 : (_previous$reactions2 = previous.reactions) === null || _previous$reactions2 === void 0 ? void 0 : _previous$reactions2.showDisplayNameWithReactions),
116
+ hasViewTheParticipantListChanged: (current === null || current === void 0 ? void 0 : (_current$viewTheParti = current.viewTheParticipantList) === null || _current$viewTheParti === void 0 ? void 0 : _current$viewTheParti.enabled) && (current === null || current === void 0 ? void 0 : (_current$viewTheParti2 = current.viewTheParticipantList) === null || _current$viewTheParti2 === void 0 ? void 0 : _current$viewTheParti2.enabled) !== (previous === null || previous === void 0 ? void 0 : (_previous$viewThePart = previous.viewTheParticipantList) === null || _previous$viewThePart === void 0 ? void 0 : _previous$viewThePart.enabled),
117
+ hasRaiseHandChanged: (current === null || current === void 0 ? void 0 : (_current$raiseHand = current.raiseHand) === null || _current$raiseHand === void 0 ? void 0 : _current$raiseHand.enabled) && (current === null || current === void 0 ? void 0 : (_current$raiseHand2 = current.raiseHand) === null || _current$raiseHand2 === void 0 ? void 0 : _current$raiseHand2.enabled) !== (previous === null || previous === void 0 ? void 0 : (_previous$raiseHand = previous.raiseHand) === null || _previous$raiseHand === void 0 ? void 0 : _previous$raiseHand.enabled),
80
118
  hasRecordingPausedChanged: (current === null || current === void 0 ? void 0 : current.record) && !(0, _isEqual2.default)(previous === null || previous === void 0 ? void 0 : (_previous$record = previous.record) === null || _previous$record === void 0 ? void 0 : _previous$record.paused, current.record.paused) && ((previous === null || previous === void 0 ? void 0 : (_previous$record2 = previous.record) === null || _previous$record2 === void 0 ? void 0 : _previous$record2.recording) || (current === null || current === void 0 ? void 0 : (_current$record = current.record) === null || _current$record === void 0 ? void 0 : _current$record.recording)),
81
119
  // see comments directly below
82
120
 
@@ -1 +1 @@
1
- {"version":3,"names":["ControlsUtils","parse","controls","parsedControls","record","modifiedBy","getId","paused","recording","lastModified","meta","meetingContainer","meetingContainerUrl","transcribe","transcribing","caption","entryExitTone","enabled","mode","video","videoEnabled","getControls","oldControls","newControls","previous","current","updates","hasRecordingPausedChanged","hasRecordingChanged","hasMeetingContainerChanged","hasTranscribeChanged","hasEntryExitToneChanged","hasBreakoutChanged","breakout","hasVideoEnabledChanged","undefined","isNeedReplaceMembers","groupId","sessionId","getSessionSwitchStatus","status","isReturnToMain","isJoinToBreakout","sessionType","BREAKOUTS","SESSION_TYPES","BREAKOUT","MAIN","isMainSessionDTO","locus"],"sources":["controlsUtils.ts"],"sourcesContent":["import {isEqual} from 'lodash';\nimport {BREAKOUTS} from '../constants';\n\nconst ControlsUtils: any = {};\n\n/**\n * Controls\n * @typedef {Object} LocusControls\n * @property {Object} record\n * @property {Boolean} record.recording\n * @property {Object} record.meta\n * @property {String} record.meta.modifiedBy\n */\n\n/**\n * parse the relevant host values that we care about: id\n * @param {LocusControls} controls\n * @returns {Object} parsedObject - parsed host or null if host was undefined\n * @returns {String} parsedObject.recordingId\n */\nControlsUtils.parse = (controls: any) => {\n const parsedControls = {...controls};\n\n if (controls && controls.record) {\n parsedControls.record = {\n modifiedBy: ControlsUtils.getId(controls),\n paused: controls.record.paused ? controls.record.paused : false,\n recording: controls.record.recording,\n lastModified: controls.record.meta.lastModified,\n };\n }\n\n if (controls && controls.meetingContainer) {\n parsedControls.meetingContainer = {\n meetingContainerUrl: controls.meetingContainer.meetingContainerUrl,\n };\n }\n\n if (controls && controls.transcribe) {\n parsedControls.transcribe = {\n transcribing: controls.transcribe.transcribing,\n caption: controls.transcribe.caption,\n };\n }\n\n if (controls && controls.entryExitTone) {\n parsedControls.entryExitTone = controls.entryExitTone.enabled\n ? controls.entryExitTone.mode\n : null;\n }\n\n if (controls && controls.video) {\n parsedControls.videoEnabled = controls.video.enabled;\n }\n\n return parsedControls;\n};\n\n/**\n * parses and returns previous state vs current state and triggers the changes.\n * @param {LocusControls} oldControls previous state\n * @param {LocusControls} newControls current state\n * @returns {Object} combination of state plus the changes\n */\nControlsUtils.getControls = (oldControls: any, newControls: any) => {\n const previous = ControlsUtils.parse(oldControls);\n const current = ControlsUtils.parse(newControls);\n\n return {\n previous,\n current,\n updates: {\n hasRecordingPausedChanged:\n current?.record &&\n !isEqual(previous?.record?.paused, current.record.paused) &&\n (previous?.record?.recording || current?.record?.recording), // see comments directly below\n\n hasRecordingChanged:\n current?.record &&\n !isEqual(previous?.record?.recording, current?.record?.recording) && // upon first join, previous?.record?.recording = undefined; thus, never going to be equal and will always return true\n (previous?.record?.recording || current?.record?.recording), // therefore, condition added to prevent false firings of #meeting:recording:stopped upon first joining a meeting\n\n hasMeetingContainerChanged:\n current?.meetingContainer &&\n !isEqual(\n previous?.meetingContainer?.meetingContainerUrl,\n current?.meetingContainer?.meetingContainerUrl\n ),\n\n hasTranscribeChanged:\n current?.transcribe &&\n !isEqual(previous?.transcribe?.transcribing, current?.transcribe?.transcribing) && // upon first join, previous?.record?.recording = undefined; thus, never going to be equal and will always return true\n (previous?.transcribe?.transcribing || current?.transcribe?.transcribing), // therefore, condition added to prevent false firings of #meeting:recording:stopped upon first joining a meeting\n\n hasEntryExitToneChanged: !!(\n newControls.entryExitTone &&\n !isEqual(previous?.entryExitTone, current?.entryExitTone) &&\n (previous?.entryExitTone || current?.entryExitTone)\n ),\n\n hasBreakoutChanged: !isEqual(previous?.breakout, current?.breakout),\n\n hasVideoEnabledChanged:\n newControls.video?.enabled !== undefined &&\n !isEqual(previous?.videoEnabled, current?.videoEnabled),\n },\n };\n};\n\n/**\n * Extract the id from the record controls object\n * @param {LocusControls} controls\n * @returns {String|null}\n */\nControlsUtils.getId = (controls: any) => {\n if (controls.record.meta) {\n return controls.record.meta.modifiedBy;\n }\n\n return null;\n};\n\n/**\n * check whether to replace the meeting's members or not.\n * For case joined breakout session, need replace meeting's members\n * @param {LocusControls} oldControls\n * @param {LocusControls} controls\n * @returns {Boolean}\n */\nControlsUtils.isNeedReplaceMembers = (oldControls: any, controls: any) => {\n // no breakout case\n if (!oldControls?.breakout || !controls?.breakout) {\n return false;\n }\n\n return (\n oldControls.breakout.groupId !== controls.breakout.groupId ||\n oldControls.breakout.sessionId !== controls.breakout.sessionId\n );\n};\n\n/**\n * determine the switch status between breakout session and main session.\n * @param {LocusControls} oldControls\n * @param {LocusControls} controls\n * @returns {Object}\n */\nControlsUtils.getSessionSwitchStatus = (oldControls: any, controls: any) => {\n const status = {isReturnToMain: false, isJoinToBreakout: false};\n // no breakout case\n if (!oldControls?.breakout || !controls?.breakout) {\n return status;\n }\n\n status.isReturnToMain =\n oldControls.breakout.sessionType === BREAKOUTS.SESSION_TYPES.BREAKOUT &&\n controls.breakout.sessionType === BREAKOUTS.SESSION_TYPES.MAIN;\n status.isJoinToBreakout =\n oldControls.breakout.sessionType === BREAKOUTS.SESSION_TYPES.MAIN &&\n controls.breakout.sessionType === BREAKOUTS.SESSION_TYPES.BREAKOUT;\n\n return status;\n};\n\nControlsUtils.isMainSessionDTO = (locus: any) => {\n return locus?.controls?.breakout?.sessionType !== BREAKOUTS.SESSION_TYPES.BREAKOUT;\n};\n\nexport default ControlsUtils;\n"],"mappings":";;;;;;;;;;;;;;;AACA;AAAuC;AAAA;AAEvC,IAAMA,aAAkB,GAAG,CAAC,CAAC;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACAA,aAAa,CAACC,KAAK,GAAG,UAACC,QAAa,EAAK;EACvC,IAAMC,cAAc,qBAAOD,QAAQ,CAAC;EAEpC,IAAIA,QAAQ,I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QAAQ,CAACU,WAAW,KAAKC,oBAAS,CAACC,aAAa,CAACC,QAAQ;EAEpE,OAAON,MAAM;AACf,CAAC;AAEDxC,aAAa,CAACgD,gBAAgB,GAAG,UAACC,KAAU,EAAK;EAAA;EAC/C,OAAO,CAAAA,KAAK,aAALA,KAAK,0CAALA,KAAK,CAAE/C,QAAQ,6EAAf,gBAAiB+B,QAAQ,0DAAzB,sBAA2BU,WAAW,MAAKC,oBAAS,CAACC,aAAa,CAACC,QAAQ;AACpF,CAAC;AAAC,eAEa9C,aAAa;AAAA"}
1
+ {"version":3,"names":["ControlsUtils","parse","controls","parsedControls","record","modifiedBy","getId","paused","recording","lastModified","meta","meetingContainer","meetingContainerUrl","transcribe","transcribing","caption","entryExitTone","enabled","mode","video","videoEnabled","muteOnEntry","shareControl","control","disallowUnmute","reactions","showDisplayNameWithReactions","viewTheParticipantList","raiseHand","getControls","oldControls","newControls","previous","current","updates","hasMuteOnEntryChanged","hasShareControlChanged","hasDisallowUnmuteChanged","hasReactionsChanged","hasReactionDisplayNamesChanged","hasViewTheParticipantListChanged","hasRaiseHandChanged","hasRecordingPausedChanged","hasRecordingChanged","hasMeetingContainerChanged","hasTranscribeChanged","hasEntryExitToneChanged","hasBreakoutChanged","breakout","hasVideoEnabledChanged","undefined","isNeedReplaceMembers","groupId","sessionId","getSessionSwitchStatus","status","isReturnToMain","isJoinToBreakout","sessionType","BREAKOUTS","SESSION_TYPES","BREAKOUT","MAIN","isMainSessionDTO","locus"],"sources":["controlsUtils.ts"],"sourcesContent":["import {isEqual} from 'lodash';\nimport {BREAKOUTS} from '../constants';\n\nconst ControlsUtils: any = {};\n\n/**\n * Controls\n * @typedef {Object} LocusControls\n * @property {Object} record\n * @property {Boolean} record.recording\n * @property {Object} record.meta\n * @property {String} record.meta.modifiedBy\n */\n\n/**\n * parse the relevant host values that we care about: id\n * @param {LocusControls} controls\n * @returns {Object} parsedObject - parsed host or null if host was undefined\n * @returns {String} parsedObject.recordingId\n */\nControlsUtils.parse = (controls: any) => {\n const parsedControls = {...controls};\n\n if (controls && controls.record) {\n parsedControls.record = {\n modifiedBy: ControlsUtils.getId(controls),\n paused: controls.record.paused ? controls.record.paused : false,\n recording: controls.record.recording,\n lastModified: controls.record.meta.lastModified,\n };\n }\n\n if (controls && controls.meetingContainer) {\n parsedControls.meetingContainer = {\n meetingContainerUrl: controls.meetingContainer.meetingContainerUrl,\n };\n }\n\n if (controls && controls.transcribe) {\n parsedControls.transcribe = {\n transcribing: controls.transcribe.transcribing,\n caption: controls.transcribe.caption,\n };\n }\n\n if (controls && controls.entryExitTone) {\n parsedControls.entryExitTone = controls.entryExitTone.enabled\n ? controls.entryExitTone.mode\n : null;\n }\n\n if (controls && controls.video) {\n parsedControls.videoEnabled = controls.video.enabled;\n }\n\n if (controls?.muteOnEntry) {\n parsedControls.muteOnEntry = {enabled: controls.muteOnEntry.enabled};\n }\n\n if (controls?.shareControl) {\n parsedControls.shareControl = {control: controls.shareControl.control};\n }\n\n if (controls?.disallowUnmute) {\n parsedControls.disallowUnmute = {enabled: controls.disallowUnmute.enabled};\n }\n\n if (controls?.reactions) {\n parsedControls.reactions = {\n enabled: controls.reactions.enabled,\n showDisplayNameWithReactions: controls.reactions.showDisplayNameWithReactions,\n };\n }\n\n if (controls?.viewTheParticipantList) {\n parsedControls.viewTheParticipantList = {enabled: controls.viewTheParticipantList.enabled};\n }\n\n if (controls?.raiseHand) {\n parsedControls.raiseHand = {enabled: controls.raiseHand.enabled};\n }\n\n return parsedControls;\n};\n\n/**\n * parses and returns previous state vs current state and triggers the changes.\n * @param {LocusControls} oldControls previous state\n * @param {LocusControls} newControls current state\n * @returns {Object} combination of state plus the changes\n */\nControlsUtils.getControls = (oldControls: any, newControls: any) => {\n const previous = ControlsUtils.parse(oldControls);\n const current = ControlsUtils.parse(newControls);\n\n return {\n previous,\n current,\n updates: {\n hasMuteOnEntryChanged:\n current?.muteOnEntry?.enabled &&\n current?.muteOnEntry?.enabled !== previous?.muteOnEntry?.enabled,\n\n hasShareControlChanged:\n current?.shareControl?.control &&\n current?.shareControl?.control !== previous?.shareControl?.control,\n\n hasDisallowUnmuteChanged:\n current?.disallowUnmute?.enabled &&\n current?.disallowUnmute?.enabled !== previous?.disallowUnmute?.enabled,\n\n hasReactionsChanged:\n current?.reactions?.enabled && current?.reactions?.enabled !== previous?.reactions?.enabled,\n\n hasReactionDisplayNamesChanged:\n current?.reactions?.showDisplayNameWithReactions &&\n current?.reactions?.showDisplayNameWithReactions !==\n previous?.reactions?.showDisplayNameWithReactions,\n\n hasViewTheParticipantListChanged:\n current?.viewTheParticipantList?.enabled &&\n current?.viewTheParticipantList?.enabled !== previous?.viewTheParticipantList?.enabled,\n\n hasRaiseHandChanged:\n current?.raiseHand?.enabled && current?.raiseHand?.enabled !== previous?.raiseHand?.enabled,\n\n hasRecordingPausedChanged:\n current?.record &&\n !isEqual(previous?.record?.paused, current.record.paused) &&\n (previous?.record?.recording || current?.record?.recording), // see comments directly below\n\n hasRecordingChanged:\n current?.record &&\n !isEqual(previous?.record?.recording, current?.record?.recording) && // upon first join, previous?.record?.recording = undefined; thus, never going to be equal and will always return true\n (previous?.record?.recording || current?.record?.recording), // therefore, condition added to prevent false firings of #meeting:recording:stopped upon first joining a meeting\n\n hasMeetingContainerChanged:\n current?.meetingContainer &&\n !isEqual(\n previous?.meetingContainer?.meetingContainerUrl,\n current?.meetingContainer?.meetingContainerUrl\n ),\n\n hasTranscribeChanged:\n current?.transcribe &&\n !isEqual(previous?.transcribe?.transcribing, current?.transcribe?.transcribing) && // upon first join, previous?.record?.recording = undefined; thus, never going to be equal and will always return true\n (previous?.transcribe?.transcribing || current?.transcribe?.transcribing), // therefore, condition added to prevent false firings of #meeting:recording:stopped upon first joining a meeting\n\n hasEntryExitToneChanged: !!(\n newControls.entryExitTone &&\n !isEqual(previous?.entryExitTone, current?.entryExitTone) &&\n (previous?.entryExitTone || current?.entryExitTone)\n ),\n\n hasBreakoutChanged: !isEqual(previous?.breakout, current?.breakout),\n\n hasVideoEnabledChanged:\n newControls.video?.enabled !== undefined &&\n !isEqual(previous?.videoEnabled, current?.videoEnabled),\n },\n };\n};\n\n/**\n * Extract the id from the record controls object\n * @param {LocusControls} controls\n * @returns {String|null}\n */\nControlsUtils.getId = (controls: any) => {\n if (controls.record.meta) {\n return controls.record.meta.modifiedBy;\n }\n\n return null;\n};\n\n/**\n * check whether to replace the meeting's members or not.\n * For case joined breakout session, need replace meeting's members\n * @param {LocusControls} oldControls\n * @param {LocusControls} controls\n * @returns {Boolean}\n */\nControlsUtils.isNeedReplaceMembers = (oldControls: any, controls: any) => {\n // no breakout case\n if (!oldControls?.breakout || !controls?.breakout) {\n return false;\n }\n\n return (\n oldControls.breakout.groupId !== controls.breakout.groupId ||\n oldControls.breakout.sessionId !== controls.breakout.sessionId\n );\n};\n\n/**\n * determine the switch status between breakout session and main session.\n * @param {LocusControls} oldControls\n * @param {LocusControls} controls\n * @returns {Object}\n */\nControlsUtils.getSessionSwitchStatus = (oldControls: any, controls: any) => {\n const status = {isReturnToMain: false, isJoinToBreakout: false};\n // no breakout case\n if (!oldControls?.breakout || !controls?.breakout) {\n return status;\n }\n\n status.isReturnToMain =\n oldControls.breakout.sessionType === BREAKOUTS.SESSION_TYPES.BREAKOUT &&\n controls.breakout.sessionType === BREAKOUTS.SESSION_TYPES.MAIN;\n status.isJoinToBreakout =\n oldControls.breakout.sessionType === BREAKOUTS.SESSION_TYPES.MAIN &&\n controls.breakout.sessionType === BREAKOUTS.SESSION_TYPES.BREAKOUT;\n\n return status;\n};\n\nControlsUtils.isMainSessionDTO = (locus: any) => {\n return locus?.controls?.breakout?.sessionType !== BREAKOUTS.SESSION_TYPES.BREAKOUT;\n};\n\nexport default ControlsUtils;\n"],"mappings":";;;;;;;;;;;;;;;AACA;AAAuC;AAAA;AAEvC,IAAMA,aAAkB,GAAG,CAAC,CAAC;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AAC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D,aAAa,CAACsD,sBAAsB,GAAG,UAACxB,WAAgB,EAAE5B,QAAa,EAAK;EAC1E,IAAMqD,MAAM,GAAG;IAACC,cAAc,EAAE,KAAK;IAAEC,gBAAgB,EAAE;EAAK,CAAC;EAC/D;EACA,IAAI,EAAC3B,WAAW,aAAXA,WAAW,eAAXA,WAAW,CAAEkB,QAAQ,KAAI,EAAC9C,QAAQ,aAARA,QAAQ,eAARA,QAAQ,CAAE8C,QAAQ,GAAE;IACjD,OAAOO,MAAM;EACf;EAEAA,MAAM,CAACC,cAAc,GACnB1B,WAAW,CAACkB,QAAQ,CAACU,WAAW,KAAKC,oBAAS,CAACC,aAAa,CAACC,QAAQ,IACrE3D,QAAQ,CAAC8C,QAAQ,CAACU,WAAW,KAAKC,oBAAS,CAACC,aAAa,CAACE,IAAI;EAChEP,MAAM,CAACE,gBAAgB,GACrB3B,WAAW,CAACkB,QAAQ,CAACU,WAAW,KAAKC,oBAAS,CAACC,aAAa,CAACE,IAAI,IACjE5D,QAAQ,CAAC8C,QAAQ,CAACU,WAAW,KAAKC,oBAAS,CAACC,aAAa,CAACC,QAAQ;EAEpE,OAAON,MAAM;AACf,CAAC;AAEDvD,aAAa,CAAC+D,gBAAgB,GAAG,UAACC,KAAU,EAAK;EAAA;EAC/C,OAAO,CAAAA,KAAK,aAALA,KAAK,0CAALA,KAAK,CAAE9D,QAAQ,6EAAf,gBAAiB8C,QAAQ,0DAAzB,sBAA2BU,WAAW,MAAKC,oBAAS,CAACC,aAAa,CAACC,QAAQ;AACpF,CAAC;AAAC,eAEa7D,aAAa;AAAA"}
@@ -664,7 +664,62 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
664
664
  hasEntryExitToneChanged = _ControlsUtils$getCon2.hasEntryExitToneChanged,
665
665
  hasBreakoutChanged = _ControlsUtils$getCon2.hasBreakoutChanged,
666
666
  hasVideoEnabledChanged = _ControlsUtils$getCon2.hasVideoEnabledChanged,
667
+ hasMuteOnEntryChanged = _ControlsUtils$getCon2.hasMuteOnEntryChanged,
668
+ hasShareControlChanged = _ControlsUtils$getCon2.hasShareControlChanged,
669
+ hasDisallowUnmuteChanged = _ControlsUtils$getCon2.hasDisallowUnmuteChanged,
670
+ hasReactionsChanged = _ControlsUtils$getCon2.hasReactionsChanged,
671
+ hasReactionDisplayNamesChanged = _ControlsUtils$getCon2.hasReactionDisplayNamesChanged,
672
+ hasViewTheParticipantListChanged = _ControlsUtils$getCon2.hasViewTheParticipantListChanged,
673
+ hasRaiseHandChanged = _ControlsUtils$getCon2.hasRaiseHandChanged,
667
674
  current = _ControlsUtils$getCon.current;
675
+ if (hasMuteOnEntryChanged) {
676
+ this.emitScoped({
677
+ file: 'locus-info',
678
+ function: 'updateControls'
679
+ }, _constants.LOCUSINFO.EVENTS.CONTROLS_MUTE_ON_ENTRY_CHANGED, {
680
+ state: current.muteOnEntry
681
+ });
682
+ }
683
+ if (hasShareControlChanged) {
684
+ this.emitScoped({
685
+ file: 'locus-info',
686
+ function: 'updateControls'
687
+ }, _constants.LOCUSINFO.EVENTS.CONTROLS_SHARE_CONTROL_CHANGED, {
688
+ state: current.shareControl
689
+ });
690
+ }
691
+ if (hasDisallowUnmuteChanged) {
692
+ this.emitScoped({
693
+ file: 'locus-info',
694
+ function: 'updateControls'
695
+ }, _constants.LOCUSINFO.EVENTS.CONTROLS_DISALLOW_UNMUTE_CHANGED, {
696
+ state: current.disallowUnmute
697
+ });
698
+ }
699
+ if (hasReactionsChanged || hasReactionDisplayNamesChanged) {
700
+ this.emitScoped({
701
+ file: 'locus-info',
702
+ function: 'updateControls'
703
+ }, _constants.LOCUSINFO.EVENTS.CONTROLS_REACTIONS_CHANGED, {
704
+ state: current.reactions
705
+ });
706
+ }
707
+ if (hasViewTheParticipantListChanged) {
708
+ this.emitScoped({
709
+ file: 'locus-info',
710
+ function: 'updateControls'
711
+ }, _constants.LOCUSINFO.EVENTS.CONTROLS_VIEW_THE_PARTICIPANTS_LIST_CHANGED, {
712
+ state: current.viewTheParticipantList
713
+ });
714
+ }
715
+ if (hasRaiseHandChanged) {
716
+ this.emitScoped({
717
+ file: 'locus-info',
718
+ function: 'updateControls'
719
+ }, _constants.LOCUSINFO.EVENTS.CONTROLS_RAISE_HAND_CHANGED, {
720
+ state: current.raiseHand
721
+ });
722
+ }
668
723
  if (hasRecordingChanged || hasRecordingPausedChanged) {
669
724
  var state = null;
670
725
  if (hasRecordingPausedChanged) {