@webex/plugin-meetings 3.0.0-beta.185 → 3.0.0-beta.186
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.
- package/dist/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +1 -1
- package/dist/interpretation/index.js +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/locus-info/index.js +47 -15
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/parser.js.map +1 -1
- package/dist/meeting/muteState.js +1 -1
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/request.js +7 -44
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/util.js +1 -1
- package/dist/meeting/util.js.map +1 -1
- package/dist/types/locus-info/index.d.ts +7 -0
- package/dist/types/locus-info/parser.d.ts +2 -1
- package/dist/types/meeting/request.d.ts +3 -16
- package/package.json +19 -19
- package/src/locus-info/index.ts +47 -14
- package/src/locus-info/parser.ts +1 -1
- package/src/meeting/muteState.ts +1 -1
- package/src/meeting/request.ts +6 -47
- package/src/meeting/util.ts +1 -1
- package/test/unit/spec/locus-info/index.js +62 -15
- package/test/unit/spec/meeting/muteState.js +1 -1
- package/test/unit/spec/meeting/utils.js +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Parser","queue","SimpleQueue","status","IDLE","onDeltaAction","workingCopy","incomingFullDto","isLoci","LoggerProxy","logger","info","comparisonResult","compareFullDtoSequence","loci","USE_INCOMING","newLoci","isValid","setStatus","PAUSED","size","processDeltaEvent","action","locus","enqueue","WORKING","DESYNC","extract","extractComparisonState","dequeue","isValidLocus","result","compare","lociComparison","debug","pause","call","nextEvent","current","incoming","comparison","min","max","GT","LT","currentIsNotUnique","unique","length","incomingIsNotUnique","currentTotalRange","end","incomingTotalRange","EQ","currentIsUnique","incomingIsUnique","currentUniqueMin","incomingUniqueMin","currentHasNoRange","start","incomingHasNoRange","neitherSeqHasRange","hasUniqOverlap","list","some","seq","currentUniqOverlap","incomingUniqOverlap","debugInfo","isSequenceEmpty","pack","packComparisonResult","baseSequence","compareDelta","compareSequence","sequence","compareToAction","entries","slice","USE_CURRENT","local","getMetaData","delta","getUniqueSequences","rules","checkSequenceOverlap","checkUnequalRanges","checkForUniqueEntries","checkIfOutOfSync","rule","ERROR","lociComparisonResult","split","first","last","rangeStart","rangeEnd","baseLoci","otherLoci","diff","getNumbersOutOfRange","output","filter","num","sort","a","b","hasEmptyEntries","hasEmptyRange","hasProp","prop","Object","prototype","hasOwnProperty","newData","oldData","debugCode","mStr","strings","join","replace","resolutionMap","debugMap","SO001","title","description","logic","SO002","UR001","UR002","UR003","UE001","UE002","OOS001","OOS002","OOS003","debugObj","resolution"],"sources":["parser.ts"],"sourcesContent":["import {difference} from 'lodash';\n\nimport SimpleQueue from '../common/queue';\nimport LoggerProxy from '../common/logs/logger-proxy';\n\n/**\n * Locus Delta Parser\n * @private\n * https://sqbu-github.cisco.com/WebExSquared/cloud-apps/wiki/Locus-Delta-Events\n */\nexport default class Parser {\n // processing status\n static status = {\n IDLE: 'IDLE',\n PAUSED: 'PAUSED',\n WORKING: 'WORKING',\n };\n\n // loci comparison states\n static loci = {\n EQ: 'EQUAL',\n GT: 'GREATER_THAN',\n LT: 'LESS_THAN',\n DESYNC: 'DESYNC',\n USE_INCOMING: 'USE_INCOMING',\n USE_CURRENT: 'USE_CURRENT',\n ERROR: 'ERROR',\n };\n\n queue: any;\n workingCopy: any;\n\n /**\n * @constructs Parser\n */\n constructor() {\n this.queue = new SimpleQueue();\n // @ts-ignore - This is declared as static class member and again being initialized here from same\n this.status = Parser.status.IDLE;\n this.onDeltaAction = null;\n this.workingCopy = null;\n }\n\n /**\n * Checks if two sequences overlap in time,\n * the sequence with the higher minimum value is greater.\n * Chooses sequence with most recent data.\n * @param {Types~Locus} current\n * @param {Types~Locus} incoming\n * @returns {string} loci comparison state\n */\n static checkSequenceOverlap(current, incoming) {\n let comparison = null;\n\n // if earliest working copy sequence is more recent than last incoming sequence\n if (current.min > incoming.max) {\n // choose left side (current)\n comparison = `${Parser.loci.GT}:SO001`;\n }\n // if last working copy sequence is before the earliest incoming sequence\n else if (current.max < incoming.min) {\n // choose right side (incoming)\n comparison = `${Parser.loci.LT}:SO002`;\n }\n\n // if no match above, defaults to null\n return comparison;\n }\n\n /**\n * Checks if two sequences have unequal ranges.\n * Chooses sequence with most larger range.\n * @param {Types~Locus} current\n * @param {Types~Locus} incoming\n * @returns {object} loci comparison\n */\n static checkUnequalRanges(current, incoming) {\n let comparison = null;\n const currentIsNotUnique = current.unique.length === 0;\n const incomingIsNotUnique = incoming.unique.length === 0;\n const currentTotalRange = current.end - current.min;\n const incomingTotalRange = incoming.end - incoming.min;\n\n // no unique values for both loci\n if (currentIsNotUnique && incomingIsNotUnique) {\n // current working copy loci has a larger range\n if (currentTotalRange > incomingTotalRange) {\n // choose left side (current)\n comparison = `${Parser.loci.GT}:UR001`;\n }\n // incoming delta loci has a larger range\n else if (currentTotalRange < incomingTotalRange) {\n // choose right side (incoming)\n comparison = `${Parser.loci.LT}:UR002`;\n } else {\n // with no unique entries and with ranges either absent or\n // of the same size, the sequences are considered equal.\n comparison = `${Parser.loci.EQ}:UR003`;\n }\n }\n\n return comparison;\n }\n\n /**\n * Checks if either sequences has unique entries.\n * Entries are considered unique if they do not overlap\n * with other Loci sequences or range values.\n * Chooses sequence with the unique entries.\n * @param {Types~Locus} current\n * @param {Types~Locus} incoming\n * @returns {string} loci comparison state\n */\n static checkForUniqueEntries(current, incoming) {\n let comparison = null;\n const currentIsUnique = current.unique.length > 0;\n const incomingIsUnique = incoming.unique.length > 0;\n\n // current has unique entries and incoming does not\n if (currentIsUnique && !incomingIsUnique) {\n // choose left side (current)\n comparison = `${Parser.loci.GT}:UE001`;\n }\n // current has no unique entries but incoming does\n else if (!currentIsUnique && incomingIsUnique) {\n // choose right side (incoming)\n comparison = `${Parser.loci.LT}:UE002`;\n }\n\n return comparison;\n }\n\n /**\n * Checks both Locus Delta objects to see if they are\n * out of sync with one another. If so sends a DESYNC\n * request to the server.\n * @param {Types~Locus} current\n * @param {Types~Locus} incoming\n * @returns {string} loci comparison state\n */\n static checkIfOutOfSync(current, incoming) {\n let comparison = null;\n const currentUniqueMin = current.unique[0];\n const incomingUniqueMin = incoming.unique[0];\n\n const currentHasNoRange = !current.start && !current.end;\n const incomingHasNoRange = !incoming.start && !incoming.end;\n const neitherSeqHasRange = currentHasNoRange && incomingHasNoRange;\n\n const hasUniqOverlap = (list, min, max) => list.some((seq) => min < seq && seq < max);\n // current unique entries overlap the total range of incoming\n const currentUniqOverlap = hasUniqOverlap(current.unique, incoming.min, incoming.max);\n // vice-versa, incoming unique entries overlap the total range of current\n const incomingUniqOverlap = hasUniqOverlap(incoming.unique, current.min, current.max);\n\n if (neitherSeqHasRange || currentUniqOverlap || incomingUniqOverlap) {\n // outputs string indicating which condition occurred. ex: 0,1,0\n const debugInfo = `${+neitherSeqHasRange},${+currentUniqOverlap},${+incomingUniqOverlap}`;\n\n // send DESYNC to server\n comparison = `${Parser.loci.DESYNC}:OOS001:${debugInfo}`;\n } else if (currentUniqueMin > incomingUniqueMin) {\n // choose left side (current)\n comparison = `${Parser.loci.GT}:OOS002`;\n } else {\n // choose right side (incoming)\n comparison = `${Parser.loci.LT}:OOS003`;\n }\n\n return comparison;\n }\n\n /**\n * Compares two loci to determine which one contains the most recent state\n * @instance\n * @memberof Locus\n * @param {Types~Locus} current\n * @param {Types~Locus} incoming\n * @returns {string} loci comparison state\n */\n static compare(current, incoming) {\n const {isSequenceEmpty} = Parser;\n const {extractComparisonState: extract} = Parser;\n const {packComparisonResult: pack} = Parser;\n\n if (isSequenceEmpty(current) || isSequenceEmpty(incoming)) {\n return pack(Parser.loci.USE_INCOMING, 'C001');\n }\n\n if (incoming.baseSequence) {\n return pack(Parser.compareDelta(current, incoming), 'C002');\n }\n\n const result = Parser.compareSequence(current.sequence, incoming.sequence);\n const action = Parser.compareToAction(extract(result));\n\n return pack(action, result);\n }\n\n /**\n * Compares two loci sequences (with delta params) and indicates what action\n * to take.\n * @instance\n * @memberof Locus\n * @param {Types~Locus} current\n * @param {Types~Locus} incoming\n * @private\n * @returns {string} loci comparison state\n */\n private static compareDelta(current, incoming) {\n const {LT, GT, EQ, DESYNC, USE_INCOMING} = Parser.loci;\n\n const {extractComparisonState: extract} = Parser;\n const {packComparisonResult: pack} = Parser;\n\n const result = Parser.compareSequence(current.sequence, incoming.sequence);\n let comparison = extract(result);\n\n if (comparison !== LT) {\n return pack(Parser.compareToAction(comparison), result);\n }\n\n comparison = Parser.compareSequence(current.sequence, incoming.baseSequence);\n\n switch (extract(comparison)) {\n case GT:\n case EQ:\n comparison = USE_INCOMING;\n break;\n\n default:\n comparison = DESYNC;\n }\n\n return pack(comparison, result);\n }\n\n /**\n * Compares Locus sequences - it should be called only for full Locus DTOs, not deltas\n *\n * @param {Types~Locus} current Current working copy\n * @param {Types~Locus} incomingFullDto New Full Locus DTO\n * @returns {string} either Parser.loci.USE_INCOMING or Parser.loci.USE_CURRENT\n */\n static compareFullDtoSequence(current, incomingFullDto) {\n if (Parser.isSequenceEmpty(current) || Parser.isSequenceEmpty(incomingFullDto)) {\n return Parser.loci.USE_INCOMING;\n }\n\n // the sequence.entries list will always contain at least 1 entry\n // https://sqbu-github.cisco.com/WebExSquared/cloud-apps/wiki/Locus-Sequence-Comparison-Algorithm\n\n return incomingFullDto.sequence.entries.slice(-1)[0] > current.sequence.entries.slice(-1)[0]\n ? Parser.loci.USE_INCOMING\n : Parser.loci.USE_CURRENT;\n }\n\n /**\n * Returns true if the incoming full locus DTO is newer than the current working copy\n *\n * @param {Types~Locus} incomingFullDto New Full Locus DTO\n * @returns {string} either Parser.loci.USE_INCOMING or Parser.loci.USE_CURRENT\n */\n isNewFullLocus(incomingFullDto) {\n if (!Parser.isLoci(incomingFullDto)) {\n LoggerProxy.logger.info('Locus-info:parser#isNewFullLocus --> Ignoring non-locus object.');\n\n return false;\n }\n\n if (!this.workingCopy) {\n // we don't have a working copy yet, so any full locus is better than nothing\n return true;\n }\n\n const comparisonResult = Parser.compareFullDtoSequence(this.workingCopy, incomingFullDto);\n\n return comparisonResult === Parser.loci.USE_INCOMING;\n }\n\n /**\n * Compares Locus sequences\n * @param {Types~Locus} current Current working copy\n * @param {Types~Locus} incoming New Locus delta\n * @returns {string}\n */\n static compareSequence(current, incoming) {\n // Locus sequence comparison rules in order of priority.\n // https://sqbu-github.cisco.com/WebExSquared/cloud-apps/wiki/Locus-Sequence-Comparison-Algorithm\n\n const local: any = Parser.getMetaData(current);\n const delta: any = Parser.getMetaData(incoming);\n\n // update loci metadata\n local.unique = Parser.getUniqueSequences(local, delta);\n delta.unique = Parser.getUniqueSequences(delta, local);\n\n // Locus sequence comparison rules\n // order matters\n const rules = [\n Parser.checkSequenceOverlap,\n Parser.checkUnequalRanges,\n Parser.checkForUniqueEntries,\n Parser.checkIfOutOfSync,\n ];\n\n for (const rule of rules) {\n // Rule only returns a value if the rule applies,\n // otherwise returns null.\n const result = rule(local, delta);\n\n if (result) {\n return result;\n }\n }\n\n // error, none of rules above applied\n // should never get here as last rule\n // should be catch all.\n return Parser.loci.ERROR;\n }\n\n /**\n * Transates the result of a sequence comparison into an intended behavior\n * @param {string} result\n * @returns {string} Locus comparison action\n */\n static compareToAction(result: string) {\n const {DESYNC, EQ, ERROR, GT, LT, USE_CURRENT, USE_INCOMING} = Parser.loci;\n\n let action = ERROR;\n\n switch (result) {\n case EQ:\n case GT:\n action = USE_CURRENT;\n break;\n case LT:\n action = USE_INCOMING;\n break;\n case DESYNC:\n action = DESYNC;\n break;\n default:\n LoggerProxy.logger.info(\n `Locus-info:parser#compareToAction --> Error: ${result} is not a recognized sequence comparison result.`\n );\n }\n\n return action;\n }\n\n /**\n * Extracts a loci comparison from a string of data.\n * @param {string} lociComparisonResult Comparison result with extra data\n * @returns {string} Comparison of EQ, LT, GT, or DESYNC.\n */\n static extractComparisonState(lociComparisonResult: string) {\n return lociComparisonResult.split(':')[0];\n }\n\n /**\n * @typedef {object} LociMetadata\n * @property {number} start - Starting sequence number\n * @property {number} end - Ending sequence number\n * @property {number} first - First sequence number\n * @property {number} last - Last sequence number\n * @property {number} min - Minimum sequence number\n * @property {number} max - Maximum sequence number\n * @property {number} entries - Loci sequence entries\n */\n\n /**\n * Metadata for Locus delta\n * @param {Array.<number>} sequence Locus delta sequence\n * @returns {LociMetadata} Locus Delta Metadata\n */\n static getMetaData(sequence: any) {\n const {entries} = sequence;\n const first = entries[0];\n const last = entries.slice(-1)[0];\n\n // rangeStart or rangeEnd is 0 if a range doesn't exist\n const start = sequence.rangeStart;\n const end = sequence.rangeEnd;\n\n // sequence data\n return {\n start,\n end,\n first,\n last,\n // Rule is: rangeStart <= rangeEnd <= min(entries)\n min: start || first,\n // Grab last entry if exist else default to rangeEnd\n max: last || end,\n // keep reference to actual sequence entries\n entries,\n };\n }\n\n /**\n * Compares two Locus delta objects and notes unique\n * values contained within baseLoci.\n * @param {LociMetadata} baseLoci\n * @param {LociMetadata} otherLoci\n * @returns {Array.<number>} List of unique sequences\n */\n static getUniqueSequences(baseLoci: any, otherLoci: any) {\n const diff: any = difference(baseLoci.entries, otherLoci.entries);\n\n const {start, end} = otherLoci;\n\n return Parser.getNumbersOutOfRange(diff, start, end);\n }\n\n /**\n * Returns an array of numbers outside of a given range.\n * @param {Array.<number>} list Array to filter\n * @param {number} rangeStart Start of range\n * @param {number} rangeEnd End of range\n * @returns {Array.<number>} Array of numbers sorted ASC\n */\n static getNumbersOutOfRange(list: Array<number>, rangeStart: number, rangeEnd: number) {\n // Collect all numbers if number is outside of specified range\n const output = list.filter((num) => num < rangeStart || num > rangeEnd);\n\n // sort ascending\n return output.sort((a, b) => a - b);\n }\n\n /**\n * Checks if newLoci or workingCopy is invalid.\n * @param {Types~Locus} newLoci\n * @returns {boolean}\n */\n isValidLocus(newLoci) {\n let isValid = false;\n const {IDLE} = Parser.status;\n const {isLoci} = Parser;\n // @ts-ignore\n const setStatus = (status) => {\n // @ts-ignore\n this.status = status;\n };\n\n // one or both objects are not locus delta events\n if (!isLoci(this.workingCopy) || !isLoci(newLoci)) {\n setStatus(IDLE);\n LoggerProxy.logger.info(\n 'Locus-info:parser#processDeltaEvent --> Ignoring non-locus object. workingCopy:',\n this.workingCopy,\n 'newLoci:',\n newLoci\n );\n } else {\n isValid = true;\n }\n\n return isValid;\n }\n\n /**\n * Determines if a paricular locus's sequence is empty\n * @param {Types~Locus} locus\n * @returns {bool}\n */\n static isSequenceEmpty(locus) {\n const {sequence} = locus;\n const hasEmptyEntries = !sequence.entries?.length;\n const hasEmptyRange = sequence.rangeStart === 0 && sequence.rangeEnd === 0;\n\n return hasEmptyEntries && hasEmptyRange;\n }\n\n /**\n * Determines if an object has basic\n * structure of a locus object.\n * @param {Types~Locus} loci\n * @returns {boolean}\n */\n static isLoci(loci) {\n if (!loci || !loci.sequence) {\n return false;\n }\n const hasProp = (prop) => Object.prototype.hasOwnProperty.call(loci.sequence, prop);\n\n if (hasProp('rangeStart') && hasProp('rangeEnd')) {\n return true;\n }\n\n return false;\n }\n\n /**\n * Processes next event in queue,\n * if queue is empty sets status to idle.\n * @returns {undefined}\n */\n nextEvent() {\n // @ts-ignore\n if (this.status === Parser.status.PAUSED) {\n LoggerProxy.logger.info('Locus-info:parser#nextEvent --> Locus parser paused.');\n\n return;\n }\n\n // continue processing until queue is empty\n if (this.queue.size() > 0) {\n this.processDeltaEvent();\n } else {\n // @ts-ignore\n this.status = Parser.status.IDLE;\n }\n }\n\n /**\n * Function handler for delta actions,\n * is set by instance callee.\n * @param {string} action Locus delta action\n * @param {Types~Locus} locus Locus delta\n * @returns {undefined}\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onDeltaAction(action: string, locus) {}\n\n /**\n * Event handler for locus delta events\n * @param {Types~Locus} loci Locus Delta\n * @returns {undefined}\n */\n onDeltaEvent(loci) {\n // enqueue the new loci\n this.queue.enqueue(loci);\n // start processing events in the queue if idle\n // and a function handler is defined\n // @ts-ignore\n if (this.status === Parser.status.IDLE && this.onDeltaAction) {\n // Update status, ensure we only process one event at a time.\n // @ts-ignore\n this.status = Parser.status.WORKING;\n\n this.processDeltaEvent();\n }\n }\n\n /**\n * Appends new data onto a string of existing data.\n * @param {string} newData\n * @param {string} oldData\n * @returns {string}\n */\n static packComparisonResult(newData: string, oldData: string) {\n return `${newData}:${oldData}`;\n }\n\n /**\n * Pause locus processing\n * @returns {undefined}\n */\n pause() {\n // @ts-ignore\n this.status = Parser.status.PAUSED;\n LoggerProxy.logger.info('Locus-info:parser#pause --> Locus parser paused.');\n }\n\n /**\n * Processes next locus delta in the queue,\n * continues until the queue is empty\n * or cleared.\n * @returns {undefined}\n */\n processDeltaEvent() {\n const {DESYNC, USE_INCOMING} = Parser.loci;\n const {extractComparisonState: extract} = Parser;\n const newLoci = this.queue.dequeue();\n\n if (!this.isValidLocus(newLoci)) {\n return;\n }\n\n const result = Parser.compare(this.workingCopy, newLoci);\n const lociComparison = extract(result);\n\n // limited debugging, use chrome extension\n // for full debugging.\n LoggerProxy.logger.debug(`Locus-info:parser#processDeltaEvent --> Locus Debug: ${result}`);\n\n if (lociComparison === DESYNC) {\n // wait for desync response\n this.pause();\n } else if (lociComparison === USE_INCOMING) {\n // update working copy for future comparisons.\n // Note: The working copy of parser gets updated in .onFullLocus()\n // and here when USE_INCOMING locus.\n this.workingCopy = newLoci;\n }\n\n if (this.onDeltaAction) {\n LoggerProxy.logger.info(\n `Locus-info:parser#processDeltaEvent --> Locus Delta Action: ${lociComparison}`\n );\n\n // eslint-disable-next-line no-useless-call\n this.onDeltaAction.call(this, lociComparison, newLoci);\n }\n\n this.nextEvent();\n }\n\n /**\n * Resume from a paused state\n * @returns {undefined}\n */\n resume() {\n LoggerProxy.logger.info('Locus-info:parser#resume --> Locus parser resumed.');\n // @ts-ignore\n this.status = Parser.status.WORKING;\n this.nextEvent();\n }\n\n /**\n * Gets related debug info for given error code\n * @param {string} debugCode Debug code\n * @param {string} comparison Locus comparison string\n * @returns {object} Debug message\n */\n static getDebugMessage(debugCode: string, comparison: string) {\n // removes extra spaces from multiline string\n const mStr = (strings) => strings.join('').replace(/\\s{2,}/g, ' ');\n\n const resolutionMap = {\n EQ: `${Parser.loci.LT}: is equal (current == incoming).`,\n LT: `${Parser.loci.LT}: choose right side (incoming).`,\n GT: `${Parser.loci.GT}: choose left side (current).`,\n };\n\n const debugMap = {\n SO001: {\n title: 'checkSequenceOverlap-001',\n description: mStr`Occurs if earliest working copy sequence is more \\\n recent than last incoming sequence.`,\n logic: 'current.min > incoming.max',\n },\n\n SO002: {\n title: 'checkSequenceOverlap-002',\n description: mStr`Occurs if last working copy sequence is before the \\\n earliest incoming sequence.`,\n logic: 'current.max < incoming.min',\n },\n\n UR001: {\n title: 'checkUnequalRanges-001',\n description: mStr`Occurs if there are no unique values for both loci, \\\n and the current working copy loci has a larger range.`,\n logic: 'currentTotalRange > incomingTotalRange',\n },\n\n UR002: {\n title: 'checkUnequalRanges-002',\n description: mStr`Occurs if there are no unique values for both loci, \\\n and the incoming delta loci has a larger range.`,\n logic: 'currentTotalRange < incomingTotalRange',\n },\n\n UR003: {\n title: 'checkUnequalRanges-003',\n description: mStr`Occurs if there are no unique values for both loci, \\\n and with ranges either absent or of the same size, the sequences \\\n are considered equal.`,\n logic: 'currentTotalRange == incomingTotalRange',\n },\n\n UE001: {\n title: 'checkForUniqueEntries-001',\n description: mStr`Occurs if current loci has unique entries and \\\n incoming does not. Entries are considered unique if they \\\n do not overlap with other Loci sequences or range values.`,\n logic: 'currentIsUnique && !incomingIsUnique',\n },\n\n UE002: {\n title: 'checkForUniqueEntries-002',\n description: mStr`Occurs if current has no unique entries but \\\n incoming does. Entries are considered unique if they \\\n do not overlap with other Loci sequences or range values.`,\n logic: '!currentIsUnique && incomingIsUnique',\n },\n\n OOS001: {\n title: 'checkIfOutOfSync-001',\n description: mStr`Occurs if neither sequence has a range, or \\\n if the current loci unique entries overlap the total range of the \\\n incoming sequence, or if the incoming unique entries overlap \\\n the total range of current sequence.`,\n logic: 'neitherSeqHasRange || currentUniqOverlap || incomingUniqOverlap',\n },\n\n OOS002: {\n title: 'checkIfOutOfSync-002',\n description: mStr`Occurs if the minimum value from sequences that are \\\n unique to the current loci is greater than the minimum value from \\\n sequences that are unique to the incoming loci.`,\n logic: 'currentUniqueMin > incomingUniqueMin',\n },\n\n OOS003: {\n title: 'checkIfOutOfSync-003',\n description: mStr`Occurs if none of the comparison rules applied. \\\n It is a catch all.`,\n logic: 'else (catch all)',\n },\n };\n\n const debugObj = debugMap[debugCode];\n\n debugObj.title = `Debug: ${debugObj.title}`;\n debugObj.resolution = resolutionMap[comparison];\n\n return debugObj;\n }\n}\n"],"mappings":";;;;;;;;;;;;;AAEA;AACA;AAAsD;AAEtD;AACA;AACA;AACA;AACA;AAJA,IAKqBA,MAAM;EACzB;;EAOA;;EAcA;AACF;AACA;EACE,kBAAc;IAAA;IAAA;IAAA;IACZ,IAAI,CAACC,KAAK,GAAG,IAAIC,cAAW,EAAE;IAC9B;IACA,IAAI,CAACC,MAAM,GAAGH,MAAM,CAACG,MAAM,CAACC,IAAI;IAChC,IAAI,CAACC,aAAa,GAAG,IAAI;IACzB,IAAI,CAACC,WAAW,GAAG,IAAI;EACzB;;EAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EAPE;IAAA;IAAA;IAsNA;AACF;AACA;AACA;AACA;AACA;IACE,wBAAeC,eAAe,EAAE;MAC9B,IAAI,CAACP,MAAM,CAACQ,MAAM,CAACD,eAAe,CAAC,EAAE;QACnCE,oBAAW,CAACC,MAAM,CAACC,IAAI,CAAC,iEAAiE,CAAC;QAE1F,OAAO,KAAK;MACd;MAEA,IAAI,CAAC,IAAI,CAACL,WAAW,EAAE;QACrB;QACA,OAAO,IAAI;MACb;MAEA,IAAMM,gBAAgB,GAAGZ,MAAM,CAACa,sBAAsB,CAAC,IAAI,CAACP,WAAW,EAAEC,eAAe,CAAC;MAEzF,OAAOK,gBAAgB,KAAKZ,MAAM,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EAAE;QACT,CAAC;QAEDK,KAAK,EAAE;UACLP,KAAK,EAAE,2BAA2B;UAClCC,WAAW,EAAER,IAAI,2cAE2C;UAC5DS,KAAK,EAAE;QACT,CAAC;QAEDM,KAAK,EAAE;UACLR,KAAK,EAAE,2BAA2B;UAClCC,WAAW,EAAER,IAAI,+bAE2C;UAC5DS,KAAK,EAAE;QACT,CAAC;QAEDO,MAAM,EAAE;UACNT,KAAK,EAAE,sBAAsB;UAC7BC,WAAW,EAAER,IAAI,+jBAGsB;UACvCS,KAAK,EAAE;QACT,CAAC;QAEDQ,MAAM,EAAE;UACNV,KAAK,EAAE,sBAAsB;UAC7BC,WAAW,EAAER,IAAI,qdAEiC;UAClDS,KAAK,EAAE;QACT,CAAC;QAEDS,MAAM,EAAE;UACNX,KAAK,EAAE,sBAAsB;UAC7BC,WAAW,EAAER,IAAI,yPACI;UACrBS,KAAK,EAAE;QACT;MACF,CAAC;MAED,IAAMU,QAAQ,GAAGd,QAAQ,CAACN,SAAS,CAAC;MAEpCoB,QAAQ,CAACZ,KAAK,oBAAaY,QAAQ,CAACZ,KAAK,CAAE;MAC3CY,QAAQ,CAACC,UAAU,GAAGhB,aAAa,CAAChF,UAAU,CAAC;MAE/C,OAAO+F,QAAQ;IACjB;EAAC;EAAA;AAAA;AAAA;AAAA,8BAvsBkBvI,MAAM,YAET;EACdI,IAAI,EAAE,MAAM;EACZe,MAAM,EAAE,QAAQ;EAChBM,OAAO,EAAE;AACX,CAAC;AAAA,8BANkBzB,MAAM,UASX;EACZoD,EAAE,EAAE,OAAO;EACXT,EAAE,EAAE,cAAc;EAClBC,EAAE,EAAE,WAAW;EACflB,MAAM,EAAE,QAAQ;EAChBX,YAAY,EAAE,cAAc;EAC5B+D,WAAW,EAAE,aAAa;EAC1BW,KAAK,EAAE;AACT,CAAC"}
|
|
1
|
+
{"version":3,"names":["Parser","queue","SimpleQueue","status","IDLE","onDeltaAction","workingCopy","incomingFullDto","isLoci","LoggerProxy","logger","info","comparisonResult","compareFullDtoSequence","loci","USE_INCOMING","newLoci","isValid","setStatus","PAUSED","size","processDeltaEvent","action","locus","enqueue","WORKING","DESYNC","extract","extractComparisonState","dequeue","isValidLocus","result","compare","lociComparison","debug","pause","call","nextEvent","current","incoming","comparison","min","max","GT","LT","currentIsNotUnique","unique","length","incomingIsNotUnique","currentTotalRange","end","incomingTotalRange","EQ","currentIsUnique","incomingIsUnique","currentUniqueMin","incomingUniqueMin","currentHasNoRange","start","incomingHasNoRange","neitherSeqHasRange","hasUniqOverlap","list","some","seq","currentUniqOverlap","incomingUniqOverlap","debugInfo","isSequenceEmpty","pack","packComparisonResult","baseSequence","compareDelta","compareSequence","sequence","compareToAction","entries","slice","USE_CURRENT","local","getMetaData","delta","getUniqueSequences","rules","checkSequenceOverlap","checkUnequalRanges","checkForUniqueEntries","checkIfOutOfSync","rule","ERROR","lociComparisonResult","split","first","last","rangeStart","rangeEnd","baseLoci","otherLoci","diff","getNumbersOutOfRange","output","filter","num","sort","a","b","hasEmptyEntries","hasEmptyRange","hasProp","prop","Object","prototype","hasOwnProperty","newData","oldData","debugCode","mStr","strings","join","replace","resolutionMap","debugMap","SO001","title","description","logic","SO002","UR001","UR002","UR003","UE001","UE002","OOS001","OOS002","OOS003","debugObj","resolution"],"sources":["parser.ts"],"sourcesContent":["import {difference} from 'lodash';\n\nimport SimpleQueue from '../common/queue';\nimport LoggerProxy from '../common/logs/logger-proxy';\n\n/**\n * Locus Delta Parser\n * @private\n * https://sqbu-github.cisco.com/WebExSquared/cloud-apps/wiki/Locus-Delta-Events\n */\nexport default class Parser {\n // processing status\n static status = {\n IDLE: 'IDLE',\n PAUSED: 'PAUSED',\n WORKING: 'WORKING',\n };\n\n // loci comparison states\n static loci = {\n EQ: 'EQUAL',\n GT: 'GREATER_THAN',\n LT: 'LESS_THAN',\n DESYNC: 'DESYNC',\n USE_INCOMING: 'USE_INCOMING',\n USE_CURRENT: 'USE_CURRENT',\n ERROR: 'ERROR',\n };\n\n queue: SimpleQueue;\n workingCopy: any;\n\n /**\n * @constructs Parser\n */\n constructor() {\n this.queue = new SimpleQueue();\n // @ts-ignore - This is declared as static class member and again being initialized here from same\n this.status = Parser.status.IDLE;\n this.onDeltaAction = null;\n this.workingCopy = null;\n }\n\n /**\n * Checks if two sequences overlap in time,\n * the sequence with the higher minimum value is greater.\n * Chooses sequence with most recent data.\n * @param {Types~Locus} current\n * @param {Types~Locus} incoming\n * @returns {string} loci comparison state\n */\n static checkSequenceOverlap(current, incoming) {\n let comparison = null;\n\n // if earliest working copy sequence is more recent than last incoming sequence\n if (current.min > incoming.max) {\n // choose left side (current)\n comparison = `${Parser.loci.GT}:SO001`;\n }\n // if last working copy sequence is before the earliest incoming sequence\n else if (current.max < incoming.min) {\n // choose right side (incoming)\n comparison = `${Parser.loci.LT}:SO002`;\n }\n\n // if no match above, defaults to null\n return comparison;\n }\n\n /**\n * Checks if two sequences have unequal ranges.\n * Chooses sequence with most larger range.\n * @param {Types~Locus} current\n * @param {Types~Locus} incoming\n * @returns {object} loci comparison\n */\n static checkUnequalRanges(current, incoming) {\n let comparison = null;\n const currentIsNotUnique = current.unique.length === 0;\n const incomingIsNotUnique = incoming.unique.length === 0;\n const currentTotalRange = current.end - current.min;\n const incomingTotalRange = incoming.end - incoming.min;\n\n // no unique values for both loci\n if (currentIsNotUnique && incomingIsNotUnique) {\n // current working copy loci has a larger range\n if (currentTotalRange > incomingTotalRange) {\n // choose left side (current)\n comparison = `${Parser.loci.GT}:UR001`;\n }\n // incoming delta loci has a larger range\n else if (currentTotalRange < incomingTotalRange) {\n // choose right side (incoming)\n comparison = `${Parser.loci.LT}:UR002`;\n } else {\n // with no unique entries and with ranges either absent or\n // of the same size, the sequences are considered equal.\n comparison = `${Parser.loci.EQ}:UR003`;\n }\n }\n\n return comparison;\n }\n\n /**\n * Checks if either sequences has unique entries.\n * Entries are considered unique if they do not overlap\n * with other Loci sequences or range values.\n * Chooses sequence with the unique entries.\n * @param {Types~Locus} current\n * @param {Types~Locus} incoming\n * @returns {string} loci comparison state\n */\n static checkForUniqueEntries(current, incoming) {\n let comparison = null;\n const currentIsUnique = current.unique.length > 0;\n const incomingIsUnique = incoming.unique.length > 0;\n\n // current has unique entries and incoming does not\n if (currentIsUnique && !incomingIsUnique) {\n // choose left side (current)\n comparison = `${Parser.loci.GT}:UE001`;\n }\n // current has no unique entries but incoming does\n else if (!currentIsUnique && incomingIsUnique) {\n // choose right side (incoming)\n comparison = `${Parser.loci.LT}:UE002`;\n }\n\n return comparison;\n }\n\n /**\n * Checks both Locus Delta objects to see if they are\n * out of sync with one another. If so sends a DESYNC\n * request to the server.\n * @param {Types~Locus} current\n * @param {Types~Locus} incoming\n * @returns {string} loci comparison state\n */\n static checkIfOutOfSync(current, incoming) {\n let comparison = null;\n const currentUniqueMin = current.unique[0];\n const incomingUniqueMin = incoming.unique[0];\n\n const currentHasNoRange = !current.start && !current.end;\n const incomingHasNoRange = !incoming.start && !incoming.end;\n const neitherSeqHasRange = currentHasNoRange && incomingHasNoRange;\n\n const hasUniqOverlap = (list, min, max) => list.some((seq) => min < seq && seq < max);\n // current unique entries overlap the total range of incoming\n const currentUniqOverlap = hasUniqOverlap(current.unique, incoming.min, incoming.max);\n // vice-versa, incoming unique entries overlap the total range of current\n const incomingUniqOverlap = hasUniqOverlap(incoming.unique, current.min, current.max);\n\n if (neitherSeqHasRange || currentUniqOverlap || incomingUniqOverlap) {\n // outputs string indicating which condition occurred. ex: 0,1,0\n const debugInfo = `${+neitherSeqHasRange},${+currentUniqOverlap},${+incomingUniqOverlap}`;\n\n // send DESYNC to server\n comparison = `${Parser.loci.DESYNC}:OOS001:${debugInfo}`;\n } else if (currentUniqueMin > incomingUniqueMin) {\n // choose left side (current)\n comparison = `${Parser.loci.GT}:OOS002`;\n } else {\n // choose right side (incoming)\n comparison = `${Parser.loci.LT}:OOS003`;\n }\n\n return comparison;\n }\n\n /**\n * Compares two loci to determine which one contains the most recent state\n * @instance\n * @memberof Locus\n * @param {Types~Locus} current\n * @param {Types~Locus} incoming\n * @returns {string} loci comparison state\n */\n static compare(current, incoming) {\n const {isSequenceEmpty} = Parser;\n const {extractComparisonState: extract} = Parser;\n const {packComparisonResult: pack} = Parser;\n\n if (isSequenceEmpty(current) || isSequenceEmpty(incoming)) {\n return pack(Parser.loci.USE_INCOMING, 'C001');\n }\n\n if (incoming.baseSequence) {\n return pack(Parser.compareDelta(current, incoming), 'C002');\n }\n\n const result = Parser.compareSequence(current.sequence, incoming.sequence);\n const action = Parser.compareToAction(extract(result));\n\n return pack(action, result);\n }\n\n /**\n * Compares two loci sequences (with delta params) and indicates what action\n * to take.\n * @instance\n * @memberof Locus\n * @param {Types~Locus} current\n * @param {Types~Locus} incoming\n * @private\n * @returns {string} loci comparison state\n */\n private static compareDelta(current, incoming) {\n const {LT, GT, EQ, DESYNC, USE_INCOMING} = Parser.loci;\n\n const {extractComparisonState: extract} = Parser;\n const {packComparisonResult: pack} = Parser;\n\n const result = Parser.compareSequence(current.sequence, incoming.sequence);\n let comparison = extract(result);\n\n if (comparison !== LT) {\n return pack(Parser.compareToAction(comparison), result);\n }\n\n comparison = Parser.compareSequence(current.sequence, incoming.baseSequence);\n\n switch (extract(comparison)) {\n case GT:\n case EQ:\n comparison = USE_INCOMING;\n break;\n\n default:\n comparison = DESYNC;\n }\n\n return pack(comparison, result);\n }\n\n /**\n * Compares Locus sequences - it should be called only for full Locus DTOs, not deltas\n *\n * @param {Types~Locus} current Current working copy\n * @param {Types~Locus} incomingFullDto New Full Locus DTO\n * @returns {string} either Parser.loci.USE_INCOMING or Parser.loci.USE_CURRENT\n */\n static compareFullDtoSequence(current, incomingFullDto) {\n if (Parser.isSequenceEmpty(current) || Parser.isSequenceEmpty(incomingFullDto)) {\n return Parser.loci.USE_INCOMING;\n }\n\n // the sequence.entries list will always contain at least 1 entry\n // https://sqbu-github.cisco.com/WebExSquared/cloud-apps/wiki/Locus-Sequence-Comparison-Algorithm\n\n return incomingFullDto.sequence.entries.slice(-1)[0] > current.sequence.entries.slice(-1)[0]\n ? Parser.loci.USE_INCOMING\n : Parser.loci.USE_CURRENT;\n }\n\n /**\n * Returns true if the incoming full locus DTO is newer than the current working copy\n *\n * @param {Types~Locus} incomingFullDto New Full Locus DTO\n * @returns {string} either Parser.loci.USE_INCOMING or Parser.loci.USE_CURRENT\n */\n isNewFullLocus(incomingFullDto) {\n if (!Parser.isLoci(incomingFullDto)) {\n LoggerProxy.logger.info('Locus-info:parser#isNewFullLocus --> Ignoring non-locus object.');\n\n return false;\n }\n\n if (!this.workingCopy) {\n // we don't have a working copy yet, so any full locus is better than nothing\n return true;\n }\n\n const comparisonResult = Parser.compareFullDtoSequence(this.workingCopy, incomingFullDto);\n\n return comparisonResult === Parser.loci.USE_INCOMING;\n }\n\n /**\n * Compares Locus sequences\n * @param {Types~Locus} current Current working copy\n * @param {Types~Locus} incoming New Locus delta\n * @returns {string}\n */\n static compareSequence(current, incoming) {\n // Locus sequence comparison rules in order of priority.\n // https://sqbu-github.cisco.com/WebExSquared/cloud-apps/wiki/Locus-Sequence-Comparison-Algorithm\n\n const local: any = Parser.getMetaData(current);\n const delta: any = Parser.getMetaData(incoming);\n\n // update loci metadata\n local.unique = Parser.getUniqueSequences(local, delta);\n delta.unique = Parser.getUniqueSequences(delta, local);\n\n // Locus sequence comparison rules\n // order matters\n const rules = [\n Parser.checkSequenceOverlap,\n Parser.checkUnequalRanges,\n Parser.checkForUniqueEntries,\n Parser.checkIfOutOfSync,\n ];\n\n for (const rule of rules) {\n // Rule only returns a value if the rule applies,\n // otherwise returns null.\n const result = rule(local, delta);\n\n if (result) {\n return result;\n }\n }\n\n // error, none of rules above applied\n // should never get here as last rule\n // should be catch all.\n return Parser.loci.ERROR;\n }\n\n /**\n * Transates the result of a sequence comparison into an intended behavior\n * @param {string} result\n * @returns {string} Locus comparison action\n */\n static compareToAction(result: string) {\n const {DESYNC, EQ, ERROR, GT, LT, USE_CURRENT, USE_INCOMING} = Parser.loci;\n\n let action = ERROR;\n\n switch (result) {\n case EQ:\n case GT:\n action = USE_CURRENT;\n break;\n case LT:\n action = USE_INCOMING;\n break;\n case DESYNC:\n action = DESYNC;\n break;\n default:\n LoggerProxy.logger.info(\n `Locus-info:parser#compareToAction --> Error: ${result} is not a recognized sequence comparison result.`\n );\n }\n\n return action;\n }\n\n /**\n * Extracts a loci comparison from a string of data.\n * @param {string} lociComparisonResult Comparison result with extra data\n * @returns {string} Comparison of EQ, LT, GT, or DESYNC.\n */\n static extractComparisonState(lociComparisonResult: string) {\n return lociComparisonResult.split(':')[0];\n }\n\n /**\n * @typedef {object} LociMetadata\n * @property {number} start - Starting sequence number\n * @property {number} end - Ending sequence number\n * @property {number} first - First sequence number\n * @property {number} last - Last sequence number\n * @property {number} min - Minimum sequence number\n * @property {number} max - Maximum sequence number\n * @property {number} entries - Loci sequence entries\n */\n\n /**\n * Metadata for Locus delta\n * @param {Array.<number>} sequence Locus delta sequence\n * @returns {LociMetadata} Locus Delta Metadata\n */\n static getMetaData(sequence: any) {\n const {entries} = sequence;\n const first = entries[0];\n const last = entries.slice(-1)[0];\n\n // rangeStart or rangeEnd is 0 if a range doesn't exist\n const start = sequence.rangeStart;\n const end = sequence.rangeEnd;\n\n // sequence data\n return {\n start,\n end,\n first,\n last,\n // Rule is: rangeStart <= rangeEnd <= min(entries)\n min: start || first,\n // Grab last entry if exist else default to rangeEnd\n max: last || end,\n // keep reference to actual sequence entries\n entries,\n };\n }\n\n /**\n * Compares two Locus delta objects and notes unique\n * values contained within baseLoci.\n * @param {LociMetadata} baseLoci\n * @param {LociMetadata} otherLoci\n * @returns {Array.<number>} List of unique sequences\n */\n static getUniqueSequences(baseLoci: any, otherLoci: any) {\n const diff: any = difference(baseLoci.entries, otherLoci.entries);\n\n const {start, end} = otherLoci;\n\n return Parser.getNumbersOutOfRange(diff, start, end);\n }\n\n /**\n * Returns an array of numbers outside of a given range.\n * @param {Array.<number>} list Array to filter\n * @param {number} rangeStart Start of range\n * @param {number} rangeEnd End of range\n * @returns {Array.<number>} Array of numbers sorted ASC\n */\n static getNumbersOutOfRange(list: Array<number>, rangeStart: number, rangeEnd: number) {\n // Collect all numbers if number is outside of specified range\n const output = list.filter((num) => num < rangeStart || num > rangeEnd);\n\n // sort ascending\n return output.sort((a, b) => a - b);\n }\n\n /**\n * Checks if newLoci or workingCopy is invalid.\n * @param {Types~Locus} newLoci\n * @returns {boolean}\n */\n isValidLocus(newLoci) {\n let isValid = false;\n const {IDLE} = Parser.status;\n const {isLoci} = Parser;\n // @ts-ignore\n const setStatus = (status) => {\n // @ts-ignore\n this.status = status;\n };\n\n // one or both objects are not locus delta events\n if (!isLoci(this.workingCopy) || !isLoci(newLoci)) {\n setStatus(IDLE);\n LoggerProxy.logger.info(\n 'Locus-info:parser#processDeltaEvent --> Ignoring non-locus object. workingCopy:',\n this.workingCopy,\n 'newLoci:',\n newLoci\n );\n } else {\n isValid = true;\n }\n\n return isValid;\n }\n\n /**\n * Determines if a paricular locus's sequence is empty\n * @param {Types~Locus} locus\n * @returns {bool}\n */\n static isSequenceEmpty(locus) {\n const {sequence} = locus;\n const hasEmptyEntries = !sequence.entries?.length;\n const hasEmptyRange = sequence.rangeStart === 0 && sequence.rangeEnd === 0;\n\n return hasEmptyEntries && hasEmptyRange;\n }\n\n /**\n * Determines if an object has basic\n * structure of a locus object.\n * @param {Types~Locus} loci\n * @returns {boolean}\n */\n static isLoci(loci) {\n if (!loci || !loci.sequence) {\n return false;\n }\n const hasProp = (prop) => Object.prototype.hasOwnProperty.call(loci.sequence, prop);\n\n if (hasProp('rangeStart') && hasProp('rangeEnd')) {\n return true;\n }\n\n return false;\n }\n\n /**\n * Processes next event in queue,\n * if queue is empty sets status to idle.\n * @returns {undefined}\n */\n nextEvent() {\n // @ts-ignore\n if (this.status === Parser.status.PAUSED) {\n LoggerProxy.logger.info('Locus-info:parser#nextEvent --> Locus parser paused.');\n\n return;\n }\n\n // continue processing until queue is empty\n if (this.queue.size() > 0) {\n this.processDeltaEvent();\n } else {\n // @ts-ignore\n this.status = Parser.status.IDLE;\n }\n }\n\n /**\n * Function handler for delta actions,\n * is set by instance callee.\n * @param {string} action Locus delta action\n * @param {Types~Locus} locus Locus delta\n * @returns {undefined}\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n onDeltaAction(action: string, locus) {}\n\n /**\n * Event handler for locus delta events\n * @param {Types~Locus} loci Locus Delta\n * @returns {undefined}\n */\n onDeltaEvent(loci) {\n // enqueue the new loci\n this.queue.enqueue(loci);\n // start processing events in the queue if idle\n // and a function handler is defined\n // @ts-ignore\n if (this.status === Parser.status.IDLE && this.onDeltaAction) {\n // Update status, ensure we only process one event at a time.\n // @ts-ignore\n this.status = Parser.status.WORKING;\n\n this.processDeltaEvent();\n }\n }\n\n /**\n * Appends new data onto a string of existing data.\n * @param {string} newData\n * @param {string} oldData\n * @returns {string}\n */\n static packComparisonResult(newData: string, oldData: string) {\n return `${newData}:${oldData}`;\n }\n\n /**\n * Pause locus processing\n * @returns {undefined}\n */\n pause() {\n // @ts-ignore\n this.status = Parser.status.PAUSED;\n LoggerProxy.logger.info('Locus-info:parser#pause --> Locus parser paused.');\n }\n\n /**\n * Processes next locus delta in the queue,\n * continues until the queue is empty\n * or cleared.\n * @returns {undefined}\n */\n processDeltaEvent() {\n const {DESYNC, USE_INCOMING} = Parser.loci;\n const {extractComparisonState: extract} = Parser;\n const newLoci = this.queue.dequeue();\n\n if (!this.isValidLocus(newLoci)) {\n return;\n }\n\n const result = Parser.compare(this.workingCopy, newLoci);\n const lociComparison = extract(result);\n\n // limited debugging, use chrome extension\n // for full debugging.\n LoggerProxy.logger.debug(`Locus-info:parser#processDeltaEvent --> Locus Debug: ${result}`);\n\n if (lociComparison === DESYNC) {\n // wait for desync response\n this.pause();\n } else if (lociComparison === USE_INCOMING) {\n // update working copy for future comparisons.\n // Note: The working copy of parser gets updated in .onFullLocus()\n // and here when USE_INCOMING locus.\n this.workingCopy = newLoci;\n }\n\n if (this.onDeltaAction) {\n LoggerProxy.logger.info(\n `Locus-info:parser#processDeltaEvent --> Locus Delta Action: ${lociComparison}`\n );\n\n // eslint-disable-next-line no-useless-call\n this.onDeltaAction.call(this, lociComparison, newLoci);\n }\n\n this.nextEvent();\n }\n\n /**\n * Resume from a paused state\n * @returns {undefined}\n */\n resume() {\n LoggerProxy.logger.info('Locus-info:parser#resume --> Locus parser resumed.');\n // @ts-ignore\n this.status = Parser.status.WORKING;\n this.nextEvent();\n }\n\n /**\n * Gets related debug info for given error code\n * @param {string} debugCode Debug code\n * @param {string} comparison Locus comparison string\n * @returns {object} Debug message\n */\n static getDebugMessage(debugCode: string, comparison: string) {\n // removes extra spaces from multiline string\n const mStr = (strings) => strings.join('').replace(/\\s{2,}/g, ' ');\n\n const resolutionMap = {\n EQ: `${Parser.loci.LT}: is equal (current == incoming).`,\n LT: `${Parser.loci.LT}: choose right side (incoming).`,\n GT: `${Parser.loci.GT}: choose left side (current).`,\n };\n\n const debugMap = {\n SO001: {\n title: 'checkSequenceOverlap-001',\n description: mStr`Occurs if earliest working copy sequence is more \\\n recent than last incoming sequence.`,\n logic: 'current.min > incoming.max',\n },\n\n SO002: {\n title: 'checkSequenceOverlap-002',\n description: mStr`Occurs if last working copy sequence is before the \\\n earliest incoming sequence.`,\n logic: 'current.max < incoming.min',\n },\n\n UR001: {\n title: 'checkUnequalRanges-001',\n description: mStr`Occurs if there are no unique values for both loci, \\\n and the current working copy loci has a larger range.`,\n logic: 'currentTotalRange > incomingTotalRange',\n },\n\n UR002: {\n title: 'checkUnequalRanges-002',\n description: mStr`Occurs if there are no unique values for both loci, \\\n and the incoming delta loci has a larger range.`,\n logic: 'currentTotalRange < incomingTotalRange',\n },\n\n UR003: {\n title: 'checkUnequalRanges-003',\n description: mStr`Occurs if there are no unique values for both loci, \\\n and with ranges either absent or of the same size, the sequences \\\n are considered equal.`,\n logic: 'currentTotalRange == incomingTotalRange',\n },\n\n UE001: {\n title: 'checkForUniqueEntries-001',\n description: mStr`Occurs if current loci has unique entries and \\\n incoming does not. Entries are considered unique if they \\\n do not overlap with other Loci sequences or range values.`,\n logic: 'currentIsUnique && !incomingIsUnique',\n },\n\n UE002: {\n title: 'checkForUniqueEntries-002',\n description: mStr`Occurs if current has no unique entries but \\\n incoming does. Entries are considered unique if they \\\n do not overlap with other Loci sequences or range values.`,\n logic: '!currentIsUnique && incomingIsUnique',\n },\n\n OOS001: {\n title: 'checkIfOutOfSync-001',\n description: mStr`Occurs if neither sequence has a range, or \\\n if the current loci unique entries overlap the total range of the \\\n incoming sequence, or if the incoming unique entries overlap \\\n the total range of current sequence.`,\n logic: 'neitherSeqHasRange || currentUniqOverlap || incomingUniqOverlap',\n },\n\n OOS002: {\n title: 'checkIfOutOfSync-002',\n description: mStr`Occurs if the minimum value from sequences that are \\\n unique to the current loci is greater than the minimum value from \\\n sequences that are unique to the incoming loci.`,\n logic: 'currentUniqueMin > incomingUniqueMin',\n },\n\n OOS003: {\n title: 'checkIfOutOfSync-003',\n description: mStr`Occurs if none of the comparison rules applied. \\\n It is a catch all.`,\n logic: 'else (catch all)',\n },\n };\n\n const debugObj = debugMap[debugCode];\n\n debugObj.title = `Debug: ${debugObj.title}`;\n debugObj.resolution = resolutionMap[comparison];\n\n return debugObj;\n }\n}\n"],"mappings":";;;;;;;;;;;;;AAEA;AACA;AAAsD;AAEtD;AACA;AACA;AACA;AACA;AAJA,IAKqBA,MAAM;EACzB;;EAOA;;EAcA;AACF;AACA;EACE,kBAAc;IAAA;IAAA;IAAA;IACZ,IAAI,CAACC,KAAK,GAAG,IAAIC,cAAW,EAAE;IAC9B;IACA,IAAI,CAACC,MAAM,GAAGH,MAAM,CAACG,MAAM,CAACC,IAAI;IAChC,IAAI,CAACC,aAAa,GAAG,IAAI;IACzB,IAAI,CAACC,WAAW,GAAG,IAAI;EACzB;;EAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EAPE;IAAA;IAAA;IAsNA;AACF;AACA;AACA;AACA;AACA;IACE,wBAAeC,eAAe,EAAE;MAC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BM,OAAO,EAAE;AACX,CAAC;AAAA,8BANkBzB,MAAM,UASX;EACZoD,EAAE,EAAE,OAAO;EACXT,EAAE,EAAE,cAAc;EAClBC,EAAE,EAAE,WAAW;EACflB,MAAM,EAAE,QAAQ;EAChBX,YAAY,EAAE,cAAc;EAC5B+D,WAAW,EAAE,aAAa;EAC1BW,KAAK,EAAE;AACT,CAAC"}
|
|
@@ -255,7 +255,7 @@ var MuteState = /*#__PURE__*/function () {
|
|
|
255
255
|
_loggerProxy.default.logger.info("Meeting:muteState#sendLocalMuteRequestToServer --> ".concat(_this2.type, ": local mute (audio=").concat(audioMuted, ", video=").concat(videoMuted, ") applied to server"));
|
|
256
256
|
_this2.state.server.localMute = _this2.type === _constants.AUDIO ? audioMuted : videoMuted;
|
|
257
257
|
if (locus) {
|
|
258
|
-
meeting.locusInfo.
|
|
258
|
+
meeting.locusInfo.handleLocusDelta(locus, meeting);
|
|
259
259
|
}
|
|
260
260
|
return locus;
|
|
261
261
|
}).catch(function (remoteUpdateError) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["createMuteState","type","meeting","enabled","LoggerProxy","logger","info","id","muteState","MuteState","AUDIO","VIDEO","ParameterError","ignoreMuteStateChange","state","client","localMute","server","remoteMute","remoteMuted","remoteVideoMuted","unmuteAllowed","unmuteVideoAllowed","syncToServerInProgress","applyUnmuteAllowedToTrack","muteLocalTrack","initialMute","mediaProperties","audioTrack","muted","videoTrack","undefined","applyClientStateToServer","init","enable","mute","reason","setServerMuted","localMuteState","getClientLocalMuteState","localMuteRequiresSync","remoteMuteRequiresSync","localMuteSyncPromise","sendLocalMuteRequestToServer","resolve","then","sendRemoteMuteRequestToServer","catch","e","warn","applyServerMuteToLocalTrack","audioMuted","videoMuted","MeetingUtil","remoteUpdateAudioVideo","locus","locusInfo","onDeltaLocus","remoteUpdateError","reject","members","muteMember","selfId","serverMuteReason","setUnmuteAllowed","applyClientStateLocally"],"sources":["muteState.ts"],"sourcesContent":["import {ServerMuteReason} from '@webex/media-helpers';\nimport LoggerProxy from '../common/logs/logger-proxy';\nimport ParameterError from '../common/errors/parameter';\nimport MeetingUtil from './util';\nimport {AUDIO, VIDEO} from '../constants';\n\n// eslint-disable-next-line import/prefer-default-export\nexport const createMuteState = (type, meeting, enabled: boolean) => {\n // todo: remove the meeting argument (SPARK-399695)\n\n LoggerProxy.logger.info(\n `Meeting:muteState#createMuteState --> ${type}: creating MuteState for meeting id ${meeting?.id}`\n );\n\n const muteState = new MuteState(type, meeting, enabled);\n\n return muteState;\n};\n\n/** The purpose of this class is to manage the local and remote mute state and make sure that the server state always matches\n the last requested state by the client.\n\n More info about Locus muting API: https://sqbu-github.cisco.com/pages/WebExSquared/locus/guides/mute.html#\n\n This class is exported only for unit tests. It should never be instantiated directly with new MuteState(), instead createMuteState() should be called\n*/\nexport class MuteState {\n state: {\n client: {\n enabled: boolean; // indicates if audio/video is enabled at all or not\n localMute: boolean;\n };\n server: {localMute: boolean; remoteMute: boolean; unmuteAllowed: boolean};\n syncToServerInProgress: boolean;\n };\n\n type: any;\n ignoreMuteStateChange: boolean;\n\n /**\n * Constructor\n *\n * @param {String} type - audio or video\n * @param {Object} meeting - the meeting object (used for reading current remote mute status)\n * @param {boolean} enabled - whether the client audio/video is enabled at all\n */\n constructor(type: string, meeting: any, enabled: boolean) {\n if (type !== AUDIO && type !== VIDEO) {\n throw new ParameterError('Mute state is designed for handling audio or video only');\n }\n this.type = type;\n this.ignoreMuteStateChange = false;\n this.state = {\n client: {\n enabled,\n localMute: true,\n },\n server: {\n localMute: true,\n // because remoteVideoMuted and unmuteVideoAllowed are updated seperately, they might be undefined\n remoteMute: type === AUDIO ? meeting.remoteMuted : meeting.remoteVideoMuted ?? false,\n unmuteAllowed: type === AUDIO ? meeting.unmuteAllowed : meeting.unmuteVideoAllowed ?? true,\n },\n syncToServerInProgress: false,\n };\n }\n\n /**\n * Starts the mute state machine. Needs to be called after a new MuteState instance is created.\n *\n * @param {Object} meeting - the meeting object\n * @returns {void}\n */\n public init(meeting: any) {\n this.applyUnmuteAllowedToTrack(meeting);\n\n // if we are remotely muted, we need to apply that to the local track now (mute on-entry)\n if (this.state.server.remoteMute) {\n this.muteLocalTrack(meeting, this.state.server.remoteMute, 'remotelyMuted');\n }\n\n const initialMute =\n this.type === AUDIO\n ? meeting.mediaProperties.audioTrack?.muted\n : meeting.mediaProperties.videoTrack?.muted;\n\n LoggerProxy.logger.info(\n `Meeting:muteState#init --> ${this.type}: local track initial mute state: ${initialMute}`\n );\n\n if (initialMute !== undefined) {\n this.state.client.localMute = initialMute;\n } else {\n // there is no track, so it's like we are locally muted\n // (this is important especially for transcoded meetings, in which the SDP m-line direction always stays \"sendrecv\")\n this.state.client.localMute = true;\n }\n this.applyClientStateToServer(meeting);\n }\n\n /**\n * This method needs to be called whenever the local audio/video track has changed.\n * It reapplies the remote mute state onto the new track and also reads the current\n * local mute state from the track and updates the internal state machine and sends\n * any required requests to the server.\n *\n * @param {Object} meeting - the meeting object\n * @returns {void}\n */\n public handleLocalTrackChange(meeting: any) {\n return this.init(meeting);\n }\n\n /**\n * Enables/disables audio/video\n *\n * @param {Object} meeting - the meeting object\n * @param {boolean} enable\n * @returns {void}\n */\n public enable(meeting: any, enable: boolean) {\n this.state.client.enabled = enable;\n\n this.applyClientStateToServer(meeting);\n }\n\n /**\n * Mutes/unmutes local track\n *\n * @param {Object} meeting - the meeting object\n * @param {Boolean} mute - true to mute the track, false to unmute it\n * @param {ServerMuteReason} reason - reason for muting/unmuting\n * @returns {void}\n */\n private muteLocalTrack(meeting: any, mute: boolean, reason: ServerMuteReason) {\n this.ignoreMuteStateChange = true;\n if (this.type === AUDIO) {\n meeting.mediaProperties.audioTrack?.setServerMuted(mute, reason);\n } else {\n meeting.mediaProperties.videoTrack?.setServerMuted(mute, reason);\n }\n this.ignoreMuteStateChange = false;\n }\n\n /**\n * This method should be called when the local track mute state is changed\n * @public\n * @memberof MuteState\n * @param {Object} [meeting] the meeting object\n * @param {Boolean} [mute] true for muting, false for unmuting request\n * @returns {void}\n */\n public handleLocalTrackMuteStateChange(meeting?: object, mute?: boolean) {\n if (this.ignoreMuteStateChange) {\n return;\n }\n LoggerProxy.logger.info(\n `Meeting:muteState#handleLocalTrackMuteStateChange --> ${this.type}: local track new mute state: ${mute}`\n );\n\n this.state.client.localMute = mute;\n\n this.applyClientStateToServer(meeting);\n }\n\n /**\n * Applies the current mute state to the local track (by enabling or disabling it accordingly)\n *\n * @public\n * @param {Object} [meeting] the meeting object\n * @param {ServerMuteReason} reason - reason why we're applying our client state to the local track\n * @memberof MuteState\n * @returns {void}\n */\n public applyClientStateLocally(meeting?: any, reason?: ServerMuteReason) {\n this.muteLocalTrack(meeting, this.state.client.localMute, reason);\n }\n\n /** Returns true if client is locally muted - it takes into account not just the client local mute state,\n * but also whether audio/video is enabled at all\n *\n * @returns {boolean}\n */\n private getClientLocalMuteState() {\n return this.state.client.enabled ? this.state.client.localMute : true;\n }\n\n /**\n * Updates the server local and remote mute values so that they match the current client desired state.\n *\n * @private\n * @param {Object} [meeting] the meeting object\n * @memberof MuteState\n * @returns {void}\n */\n private applyClientStateToServer(meeting?: any) {\n if (this.state.syncToServerInProgress) {\n LoggerProxy.logger.info(\n `Meeting:muteState#applyClientStateToServer --> ${this.type}: request to server in progress, we need to wait for it to complete`\n );\n\n return;\n }\n\n const localMuteState = this.getClientLocalMuteState();\n const localMuteRequiresSync = localMuteState !== this.state.server.localMute;\n const remoteMuteRequiresSync = !localMuteState && this.state.server.remoteMute;\n\n LoggerProxy.logger.info(\n `Meeting:muteState#applyClientStateToServer --> ${this.type}: localMuteRequiresSync: ${localMuteRequiresSync} (${localMuteState} ?= ${this.state.server.localMute})`\n );\n LoggerProxy.logger.info(\n `Meeting:muteState#applyClientStateToServer --> ${this.type}: remoteMuteRequiresSync: ${remoteMuteRequiresSync}`\n );\n\n if (!localMuteRequiresSync && !remoteMuteRequiresSync) {\n LoggerProxy.logger.info(\n `Meeting:muteState#applyClientStateToServer --> ${this.type}: client state already matching server state, nothing to do`\n );\n\n return;\n }\n\n this.state.syncToServerInProgress = true;\n\n // first sync local mute with server\n const localMuteSyncPromise = localMuteRequiresSync\n ? this.sendLocalMuteRequestToServer(meeting)\n : Promise.resolve();\n\n localMuteSyncPromise\n .then(() =>\n // then follow it up with remote mute sync\n remoteMuteRequiresSync ? this.sendRemoteMuteRequestToServer(meeting) : Promise.resolve()\n )\n .then(() => {\n this.state.syncToServerInProgress = false;\n LoggerProxy.logger.info(\n `Meeting:muteState#applyClientStateToServer --> ${this.type}: sync with server completed`\n );\n\n // need to check if a new sync is required, because this.state.client may have changed while we were doing the current sync\n this.applyClientStateToServer(meeting);\n })\n .catch((e) => {\n this.state.syncToServerInProgress = false;\n\n LoggerProxy.logger.warn(\n `Meeting:muteState#applyClientStateToServer --> ${this.type}: error: ${e}`\n );\n\n this.applyServerMuteToLocalTrack(meeting, 'clientRequestFailed');\n });\n }\n\n /**\n * Sets the local mute value in the server\n *\n * @private\n * @param {Object} [meeting] the meeting object\n * @memberof MuteState\n * @returns {Promise}\n */\n private sendLocalMuteRequestToServer(meeting?: any) {\n const audioMuted = this.type === AUDIO ? this.getClientLocalMuteState() : undefined;\n const videoMuted = this.type === VIDEO ? this.getClientLocalMuteState() : undefined;\n\n LoggerProxy.logger.info(\n `Meeting:muteState#sendLocalMuteRequestToServer --> ${this.type}: sending local mute (audio=${audioMuted}, video=${videoMuted}) to server`\n );\n\n return MeetingUtil.remoteUpdateAudioVideo(meeting, audioMuted, videoMuted)\n .then((locus) => {\n LoggerProxy.logger.info(\n `Meeting:muteState#sendLocalMuteRequestToServer --> ${this.type}: local mute (audio=${audioMuted}, video=${videoMuted}) applied to server`\n );\n\n this.state.server.localMute = this.type === AUDIO ? audioMuted : videoMuted;\n\n if (locus) {\n meeting.locusInfo.onDeltaLocus(locus);\n }\n\n return locus;\n })\n .catch((remoteUpdateError) => {\n LoggerProxy.logger.warn(\n `Meeting:muteState#sendLocalMuteRequestToServer --> ${this.type}: failed to apply local mute (audio=${audioMuted}, video=${videoMuted}) to server: ${remoteUpdateError}`\n );\n\n return Promise.reject(remoteUpdateError);\n });\n }\n\n /**\n * Sets the remote mute value in the server\n *\n * @private\n * @param {Object} [meeting] the meeting object\n * @memberof MuteState\n * @returns {Promise}\n */\n private sendRemoteMuteRequestToServer(meeting?: any) {\n const remoteMute = this.getClientLocalMuteState();\n\n LoggerProxy.logger.info(\n `Meeting:muteState#sendRemoteMuteRequestToServer --> ${this.type}: sending remote mute:${remoteMute} to server`\n );\n\n return meeting.members\n .muteMember(meeting.members.selfId, remoteMute, this.type === AUDIO)\n .then(() => {\n LoggerProxy.logger.info(\n `Meeting:muteState#sendRemoteMuteRequestToServer --> ${this.type}: remote mute:${remoteMute} applied to server`\n );\n\n this.state.server.remoteMute = remoteMute;\n })\n .catch((remoteUpdateError) => {\n LoggerProxy.logger.warn(\n `Meeting:muteState#sendRemoteMuteRequestToServer --> ${this.type}: failed to apply remote mute ${remoteMute} to server: ${remoteUpdateError}`\n );\n\n return Promise.reject(remoteUpdateError);\n });\n }\n\n /** Sets the mute state of the local track according to what server thinks is our state\n * @param {Object} meeting - the meeting object\n * @param {ServerMuteReason} serverMuteReason - reason why we're applying server mute to the local track\n * @returns {void}\n */\n private applyServerMuteToLocalTrack(meeting: any, serverMuteReason: ServerMuteReason) {\n const muted = this.state.server.localMute || this.state.server.remoteMute;\n\n // update the local track mute state, but not this.state.client.localMute\n this.muteLocalTrack(meeting, muted, serverMuteReason);\n }\n\n /** Applies the current value for unmute allowed to the underlying track\n *\n * @param {Meeting} meeting\n * @returns {void}\n */\n private applyUnmuteAllowedToTrack(meeting: any) {\n if (this.type === AUDIO) {\n meeting.mediaProperties.audioTrack?.setUnmuteAllowed(this.state.server.unmuteAllowed);\n } else {\n meeting.mediaProperties.videoTrack?.setUnmuteAllowed(this.state.server.unmuteAllowed);\n }\n }\n\n /**\n * This method should be called whenever the server remote mute state is changed\n *\n * @public\n * @memberof MuteState\n * @param {Meeting} meeting\n * @param {Boolean} [muted] true if user is remotely muted, false otherwise\n * @param {Boolean} [unmuteAllowed] indicates if user is allowed to unmute self (false when \"hard mute\" feature is used)\n * @returns {undefined}\n */\n public handleServerRemoteMuteUpdate(meeting: any, muted?: boolean, unmuteAllowed?: boolean) {\n LoggerProxy.logger.info(\n `Meeting:muteState#handleServerRemoteMuteUpdate --> ${this.type}: updating server remoteMute to (${muted})`\n );\n if (unmuteAllowed !== undefined) {\n this.state.server.unmuteAllowed = unmuteAllowed;\n this.applyUnmuteAllowedToTrack(meeting);\n }\n if (muted !== undefined) {\n this.state.server.remoteMute = muted;\n this.applyServerMuteToLocalTrack(meeting, 'remotelyMuted');\n }\n }\n\n /**\n * This method should be called whenever we receive from the server a requirement to locally unmute\n *\n * @public\n * @memberof MuteState\n * @param {Object} [meeting] the meeting object\n * @returns {undefined}\n */\n public handleServerLocalUnmuteRequired(meeting?: object) {\n if (!this.state.client.enabled) {\n LoggerProxy.logger.warn(\n `Meeting:muteState#handleServerLocalUnmuteRequired --> ${this.type}: localAudioUnmuteRequired received while ${this.type} is disabled -> local unmute will not result in ${this.type} being sent`\n );\n } else {\n LoggerProxy.logger.info(\n `Meeting:muteState#handleServerLocalUnmuteRequired --> ${this.type}: localAudioUnmuteRequired received -> doing local unmute`\n );\n }\n\n // todo: I'm seeing \"you can now unmute yourself \" popup when this happens - but same thing happens on web.w.c so we can ignore for now\n this.state.server.remoteMute = false;\n this.state.client.localMute = false;\n\n this.applyClientStateLocally(meeting, 'localUnmuteRequired');\n this.applyClientStateToServer(meeting);\n }\n\n /**\n * Returns true if the user is locally or remotely muted.\n * It only checks the mute status, ignoring the fact whether audio/video is enabled.\n *\n * @public\n * @memberof MuteState\n * @returns {Boolean}\n */\n public isMuted() {\n return (\n this.state.client.localMute || this.state.server.localMute || this.state.server.remoteMute\n );\n }\n\n /**\n * Returns true if the user is remotely muted\n *\n * @public\n * @memberof MuteState\n * @returns {Boolean}\n */\n public isRemotelyMuted() {\n return this.state.server.remoteMute;\n }\n\n /**\n * Returns true if unmute is allowed\n *\n * @public\n * @memberof MuteState\n * @returns {Boolean}\n */\n public isUnmuteAllowed() {\n return this.state.server.unmuteAllowed;\n }\n\n /**\n * Returns true if the user is locally muted or audio/video is disabled\n *\n * @public\n * @memberof MuteState\n * @returns {Boolean}\n */\n public isLocallyMuted() {\n return this.getClientLocalMuteState();\n }\n}\n"],"mappings":";;;;;;;;;;;;AACA;AACA;AACA;AACA;AAEA;AACO,IAAMA,eAAe,GAAG,SAAlBA,eAAe,CAAIC,IAAI,EAAEC,OAAO,EAAEC,OAAgB,EAAK;EAClE;;EAEAC,oBAAW,CAACC,MAAM,CAACC,IAAI,iDACoBL,IAAI,iDAAuCC,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEK,EAAE,EAChG;EAED,IAAMC,SAAS,GAAG,IAAIC,SAAS,CAACR,IAAI,EAAEC,OAAO,EAAEC,OAAO,CAAC;EAEvD,OAAOK,SAAS;AAClB,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AANA;AAAA,IAOaC,SAAS;EAapB;AACF;AACA;AACA;AACA;AACA;AACA;EACE,mBAAYR,IAAY,EAAEC,OAAY,EAAEC,OAAgB,EAAE;IAAA;IAAA;IAAA;IAAA;IAAA;IACxD,IAAIF,IAAI,KAAKS,gBAAK,IAAIT,IAAI,KAAKU,gBAAK,EAAE;MACpC,MAAM,IAAIC,kBAAc,CAAC,yDAAyD,CAAC;IACrF;IACA,IAAI,CAACX,IAAI,GAAGA,IAAI;IAChB,IAAI,CAACY,qBAAqB,GAAG,KAAK;IAClC,IAAI,CAACC,KAAK,GAAG;MACXC,MAAM,EAAE;QACNZ,OAAO,EAAPA,OAAO;QACPa,SAAS,EAAE;MACb,CAAC;MACDC,MAAM,EAAE;QACND,SAAS,EAAE,IAAI;QACf;QACAE,UAAU,EAAEjB,IAAI,KAAKS,gBAAK,GAAGR,OAAO,CAACiB,WAAW,4BAAGjB,OAAO,CAACkB,gBAA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ACkB,uBAAuB,EAAE;IACvC;EAAC;EAAA;AAAA;AAAA"}
|
|
1
|
+
{"version":3,"names":["createMuteState","type","meeting","enabled","LoggerProxy","logger","info","id","muteState","MuteState","AUDIO","VIDEO","ParameterError","ignoreMuteStateChange","state","client","localMute","server","remoteMute","remoteMuted","remoteVideoMuted","unmuteAllowed","unmuteVideoAllowed","syncToServerInProgress","applyUnmuteAllowedToTrack","muteLocalTrack","initialMute","mediaProperties","audioTrack","muted","videoTrack","undefined","applyClientStateToServer","init","enable","mute","reason","setServerMuted","localMuteState","getClientLocalMuteState","localMuteRequiresSync","remoteMuteRequiresSync","localMuteSyncPromise","sendLocalMuteRequestToServer","resolve","then","sendRemoteMuteRequestToServer","catch","e","warn","applyServerMuteToLocalTrack","audioMuted","videoMuted","MeetingUtil","remoteUpdateAudioVideo","locus","locusInfo","handleLocusDelta","remoteUpdateError","reject","members","muteMember","selfId","serverMuteReason","setUnmuteAllowed","applyClientStateLocally"],"sources":["muteState.ts"],"sourcesContent":["import {ServerMuteReason} from '@webex/media-helpers';\nimport LoggerProxy from '../common/logs/logger-proxy';\nimport ParameterError from '../common/errors/parameter';\nimport MeetingUtil from './util';\nimport {AUDIO, VIDEO} from '../constants';\n\n// eslint-disable-next-line import/prefer-default-export\nexport const createMuteState = (type, meeting, enabled: boolean) => {\n // todo: remove the meeting argument (SPARK-399695)\n\n LoggerProxy.logger.info(\n `Meeting:muteState#createMuteState --> ${type}: creating MuteState for meeting id ${meeting?.id}`\n );\n\n const muteState = new MuteState(type, meeting, enabled);\n\n return muteState;\n};\n\n/** The purpose of this class is to manage the local and remote mute state and make sure that the server state always matches\n the last requested state by the client.\n\n More info about Locus muting API: https://sqbu-github.cisco.com/pages/WebExSquared/locus/guides/mute.html#\n\n This class is exported only for unit tests. It should never be instantiated directly with new MuteState(), instead createMuteState() should be called\n*/\nexport class MuteState {\n state: {\n client: {\n enabled: boolean; // indicates if audio/video is enabled at all or not\n localMute: boolean;\n };\n server: {localMute: boolean; remoteMute: boolean; unmuteAllowed: boolean};\n syncToServerInProgress: boolean;\n };\n\n type: any;\n ignoreMuteStateChange: boolean;\n\n /**\n * Constructor\n *\n * @param {String} type - audio or video\n * @param {Object} meeting - the meeting object (used for reading current remote mute status)\n * @param {boolean} enabled - whether the client audio/video is enabled at all\n */\n constructor(type: string, meeting: any, enabled: boolean) {\n if (type !== AUDIO && type !== VIDEO) {\n throw new ParameterError('Mute state is designed for handling audio or video only');\n }\n this.type = type;\n this.ignoreMuteStateChange = false;\n this.state = {\n client: {\n enabled,\n localMute: true,\n },\n server: {\n localMute: true,\n // because remoteVideoMuted and unmuteVideoAllowed are updated seperately, they might be undefined\n remoteMute: type === AUDIO ? meeting.remoteMuted : meeting.remoteVideoMuted ?? false,\n unmuteAllowed: type === AUDIO ? meeting.unmuteAllowed : meeting.unmuteVideoAllowed ?? true,\n },\n syncToServerInProgress: false,\n };\n }\n\n /**\n * Starts the mute state machine. Needs to be called after a new MuteState instance is created.\n *\n * @param {Object} meeting - the meeting object\n * @returns {void}\n */\n public init(meeting: any) {\n this.applyUnmuteAllowedToTrack(meeting);\n\n // if we are remotely muted, we need to apply that to the local track now (mute on-entry)\n if (this.state.server.remoteMute) {\n this.muteLocalTrack(meeting, this.state.server.remoteMute, 'remotelyMuted');\n }\n\n const initialMute =\n this.type === AUDIO\n ? meeting.mediaProperties.audioTrack?.muted\n : meeting.mediaProperties.videoTrack?.muted;\n\n LoggerProxy.logger.info(\n `Meeting:muteState#init --> ${this.type}: local track initial mute state: ${initialMute}`\n );\n\n if (initialMute !== undefined) {\n this.state.client.localMute = initialMute;\n } else {\n // there is no track, so it's like we are locally muted\n // (this is important especially for transcoded meetings, in which the SDP m-line direction always stays \"sendrecv\")\n this.state.client.localMute = true;\n }\n this.applyClientStateToServer(meeting);\n }\n\n /**\n * This method needs to be called whenever the local audio/video track has changed.\n * It reapplies the remote mute state onto the new track and also reads the current\n * local mute state from the track and updates the internal state machine and sends\n * any required requests to the server.\n *\n * @param {Object} meeting - the meeting object\n * @returns {void}\n */\n public handleLocalTrackChange(meeting: any) {\n return this.init(meeting);\n }\n\n /**\n * Enables/disables audio/video\n *\n * @param {Object} meeting - the meeting object\n * @param {boolean} enable\n * @returns {void}\n */\n public enable(meeting: any, enable: boolean) {\n this.state.client.enabled = enable;\n\n this.applyClientStateToServer(meeting);\n }\n\n /**\n * Mutes/unmutes local track\n *\n * @param {Object} meeting - the meeting object\n * @param {Boolean} mute - true to mute the track, false to unmute it\n * @param {ServerMuteReason} reason - reason for muting/unmuting\n * @returns {void}\n */\n private muteLocalTrack(meeting: any, mute: boolean, reason: ServerMuteReason) {\n this.ignoreMuteStateChange = true;\n if (this.type === AUDIO) {\n meeting.mediaProperties.audioTrack?.setServerMuted(mute, reason);\n } else {\n meeting.mediaProperties.videoTrack?.setServerMuted(mute, reason);\n }\n this.ignoreMuteStateChange = false;\n }\n\n /**\n * This method should be called when the local track mute state is changed\n * @public\n * @memberof MuteState\n * @param {Object} [meeting] the meeting object\n * @param {Boolean} [mute] true for muting, false for unmuting request\n * @returns {void}\n */\n public handleLocalTrackMuteStateChange(meeting?: object, mute?: boolean) {\n if (this.ignoreMuteStateChange) {\n return;\n }\n LoggerProxy.logger.info(\n `Meeting:muteState#handleLocalTrackMuteStateChange --> ${this.type}: local track new mute state: ${mute}`\n );\n\n this.state.client.localMute = mute;\n\n this.applyClientStateToServer(meeting);\n }\n\n /**\n * Applies the current mute state to the local track (by enabling or disabling it accordingly)\n *\n * @public\n * @param {Object} [meeting] the meeting object\n * @param {ServerMuteReason} reason - reason why we're applying our client state to the local track\n * @memberof MuteState\n * @returns {void}\n */\n public applyClientStateLocally(meeting?: any, reason?: ServerMuteReason) {\n this.muteLocalTrack(meeting, this.state.client.localMute, reason);\n }\n\n /** Returns true if client is locally muted - it takes into account not just the client local mute state,\n * but also whether audio/video is enabled at all\n *\n * @returns {boolean}\n */\n private getClientLocalMuteState() {\n return this.state.client.enabled ? this.state.client.localMute : true;\n }\n\n /**\n * Updates the server local and remote mute values so that they match the current client desired state.\n *\n * @private\n * @param {Object} [meeting] the meeting object\n * @memberof MuteState\n * @returns {void}\n */\n private applyClientStateToServer(meeting?: any) {\n if (this.state.syncToServerInProgress) {\n LoggerProxy.logger.info(\n `Meeting:muteState#applyClientStateToServer --> ${this.type}: request to server in progress, we need to wait for it to complete`\n );\n\n return;\n }\n\n const localMuteState = this.getClientLocalMuteState();\n const localMuteRequiresSync = localMuteState !== this.state.server.localMute;\n const remoteMuteRequiresSync = !localMuteState && this.state.server.remoteMute;\n\n LoggerProxy.logger.info(\n `Meeting:muteState#applyClientStateToServer --> ${this.type}: localMuteRequiresSync: ${localMuteRequiresSync} (${localMuteState} ?= ${this.state.server.localMute})`\n );\n LoggerProxy.logger.info(\n `Meeting:muteState#applyClientStateToServer --> ${this.type}: remoteMuteRequiresSync: ${remoteMuteRequiresSync}`\n );\n\n if (!localMuteRequiresSync && !remoteMuteRequiresSync) {\n LoggerProxy.logger.info(\n `Meeting:muteState#applyClientStateToServer --> ${this.type}: client state already matching server state, nothing to do`\n );\n\n return;\n }\n\n this.state.syncToServerInProgress = true;\n\n // first sync local mute with server\n const localMuteSyncPromise = localMuteRequiresSync\n ? this.sendLocalMuteRequestToServer(meeting)\n : Promise.resolve();\n\n localMuteSyncPromise\n .then(() =>\n // then follow it up with remote mute sync\n remoteMuteRequiresSync ? this.sendRemoteMuteRequestToServer(meeting) : Promise.resolve()\n )\n .then(() => {\n this.state.syncToServerInProgress = false;\n LoggerProxy.logger.info(\n `Meeting:muteState#applyClientStateToServer --> ${this.type}: sync with server completed`\n );\n\n // need to check if a new sync is required, because this.state.client may have changed while we were doing the current sync\n this.applyClientStateToServer(meeting);\n })\n .catch((e) => {\n this.state.syncToServerInProgress = false;\n\n LoggerProxy.logger.warn(\n `Meeting:muteState#applyClientStateToServer --> ${this.type}: error: ${e}`\n );\n\n this.applyServerMuteToLocalTrack(meeting, 'clientRequestFailed');\n });\n }\n\n /**\n * Sets the local mute value in the server\n *\n * @private\n * @param {Object} [meeting] the meeting object\n * @memberof MuteState\n * @returns {Promise}\n */\n private sendLocalMuteRequestToServer(meeting?: any) {\n const audioMuted = this.type === AUDIO ? this.getClientLocalMuteState() : undefined;\n const videoMuted = this.type === VIDEO ? this.getClientLocalMuteState() : undefined;\n\n LoggerProxy.logger.info(\n `Meeting:muteState#sendLocalMuteRequestToServer --> ${this.type}: sending local mute (audio=${audioMuted}, video=${videoMuted}) to server`\n );\n\n return MeetingUtil.remoteUpdateAudioVideo(meeting, audioMuted, videoMuted)\n .then((locus) => {\n LoggerProxy.logger.info(\n `Meeting:muteState#sendLocalMuteRequestToServer --> ${this.type}: local mute (audio=${audioMuted}, video=${videoMuted}) applied to server`\n );\n\n this.state.server.localMute = this.type === AUDIO ? audioMuted : videoMuted;\n\n if (locus) {\n meeting.locusInfo.handleLocusDelta(locus, meeting);\n }\n\n return locus;\n })\n .catch((remoteUpdateError) => {\n LoggerProxy.logger.warn(\n `Meeting:muteState#sendLocalMuteRequestToServer --> ${this.type}: failed to apply local mute (audio=${audioMuted}, video=${videoMuted}) to server: ${remoteUpdateError}`\n );\n\n return Promise.reject(remoteUpdateError);\n });\n }\n\n /**\n * Sets the remote mute value in the server\n *\n * @private\n * @param {Object} [meeting] the meeting object\n * @memberof MuteState\n * @returns {Promise}\n */\n private sendRemoteMuteRequestToServer(meeting?: any) {\n const remoteMute = this.getClientLocalMuteState();\n\n LoggerProxy.logger.info(\n `Meeting:muteState#sendRemoteMuteRequestToServer --> ${this.type}: sending remote mute:${remoteMute} to server`\n );\n\n return meeting.members\n .muteMember(meeting.members.selfId, remoteMute, this.type === AUDIO)\n .then(() => {\n LoggerProxy.logger.info(\n `Meeting:muteState#sendRemoteMuteRequestToServer --> ${this.type}: remote mute:${remoteMute} applied to server`\n );\n\n this.state.server.remoteMute = remoteMute;\n })\n .catch((remoteUpdateError) => {\n LoggerProxy.logger.warn(\n `Meeting:muteState#sendRemoteMuteRequestToServer --> ${this.type}: failed to apply remote mute ${remoteMute} to server: ${remoteUpdateError}`\n );\n\n return Promise.reject(remoteUpdateError);\n });\n }\n\n /** Sets the mute state of the local track according to what server thinks is our state\n * @param {Object} meeting - the meeting object\n * @param {ServerMuteReason} serverMuteReason - reason why we're applying server mute to the local track\n * @returns {void}\n */\n private applyServerMuteToLocalTrack(meeting: any, serverMuteReason: ServerMuteReason) {\n const muted = this.state.server.localMute || this.state.server.remoteMute;\n\n // update the local track mute state, but not this.state.client.localMute\n this.muteLocalTrack(meeting, muted, serverMuteReason);\n }\n\n /** Applies the current value for unmute allowed to the underlying track\n *\n * @param {Meeting} meeting\n * @returns {void}\n */\n private applyUnmuteAllowedToTrack(meeting: any) {\n if (this.type === AUDIO) {\n meeting.mediaProperties.audioTrack?.setUnmuteAllowed(this.state.server.unmuteAllowed);\n } else {\n meeting.mediaProperties.videoTrack?.setUnmuteAllowed(this.state.server.unmuteAllowed);\n }\n }\n\n /**\n * This method should be called whenever the server remote mute state is changed\n *\n * @public\n * @memberof MuteState\n * @param {Meeting} meeting\n * @param {Boolean} [muted] true if user is remotely muted, false otherwise\n * @param {Boolean} [unmuteAllowed] indicates if user is allowed to unmute self (false when \"hard mute\" feature is used)\n * @returns {undefined}\n */\n public handleServerRemoteMuteUpdate(meeting: any, muted?: boolean, unmuteAllowed?: boolean) {\n LoggerProxy.logger.info(\n `Meeting:muteState#handleServerRemoteMuteUpdate --> ${this.type}: updating server remoteMute to (${muted})`\n );\n if (unmuteAllowed !== undefined) {\n this.state.server.unmuteAllowed = unmuteAllowed;\n this.applyUnmuteAllowedToTrack(meeting);\n }\n if (muted !== undefined) {\n this.state.server.remoteMute = muted;\n this.applyServerMuteToLocalTrack(meeting, 'remotelyMuted');\n }\n }\n\n /**\n * This method should be called whenever we receive from the server a requirement to locally unmute\n *\n * @public\n * @memberof MuteState\n * @param {Object} [meeting] the meeting object\n * @returns {undefined}\n */\n public handleServerLocalUnmuteRequired(meeting?: object) {\n if (!this.state.client.enabled) {\n LoggerProxy.logger.warn(\n `Meeting:muteState#handleServerLocalUnmuteRequired --> ${this.type}: localAudioUnmuteRequired received while ${this.type} is disabled -> local unmute will not result in ${this.type} being sent`\n );\n } else {\n LoggerProxy.logger.info(\n `Meeting:muteState#handleServerLocalUnmuteRequired --> ${this.type}: localAudioUnmuteRequired received -> doing local unmute`\n );\n }\n\n // todo: I'm seeing \"you can now unmute yourself \" popup when this happens - but same thing happens on web.w.c so we can ignore for now\n this.state.server.remoteMute = false;\n this.state.client.localMute = false;\n\n this.applyClientStateLocally(meeting, 'localUnmuteRequired');\n this.applyClientStateToServer(meeting);\n }\n\n /**\n * Returns true if the user is locally or remotely muted.\n * It only checks the mute status, ignoring the fact whether audio/video is enabled.\n *\n * @public\n * @memberof MuteState\n * @returns {Boolean}\n */\n public isMuted() {\n return (\n this.state.client.localMute || this.state.server.localMute || this.state.server.remoteMute\n );\n }\n\n /**\n * Returns true if the user is remotely muted\n *\n * @public\n * @memberof MuteState\n * @returns {Boolean}\n */\n public isRemotelyMuted() {\n return this.state.server.remoteMute;\n }\n\n /**\n * Returns true if unmute is allowed\n *\n * @public\n * @memberof MuteState\n * @returns {Boolean}\n */\n public isUnmuteAllowed() {\n return this.state.server.unmuteAllowed;\n }\n\n /**\n * Returns true if the user is locally muted or audio/video is disabled\n *\n * @public\n * @memberof MuteState\n * @returns {Boolean}\n */\n public isLocallyMuted() {\n return this.getClientLocalMuteState();\n }\n}\n"],"mappings":";;;;;;;;;;;;AACA;AACA;AACA;AACA;AAEA;AACO,IAAMA,eAAe,GAAG,SAAlBA,eAAe,CAAIC,IAAI,EAAEC,OAAO,EAAEC,OAAgB,EAAK;EAClE;;EAEAC,oBAAW,CAACC,MAAM,CAACC,IAAI,iDACoBL,IAAI,iDAAuCC,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEK,EAAE,EAChG;EAED,IAAMC,SAAS,GAAG,IAAIC,SAAS,CAACR,IAAI,EAAEC,OAAO,EAAEC,OAAO,CAAC;EAEvD,OAAOK,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EAAE,qBAAqB,CAAC;MAC5D,IAAI,CAAC8B,wBAAwB,CAAC9B,OAAO,CAAC;IACxC;;IAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EAPE;IAAA;IAAA,OAQA,mBAAiB;MACf,OACE,IAAI,CAACY,KAAK,CAACC,MAAM,CAACC,SAAS,IAAI,IAAI,CAACF,KAAK,CAACG,MAAM,CAACD,SAAS,IAAI,IAAI,CAACF,KAAK,CAACG,MAAM,CAACC,UAAU;IAE9F;;IAEA;AACF;AACA;AACA;AACA;AACA;AACA;EANE;IAAA;IAAA,OAOA,2BAAyB;MACvB,OAAO,IAAI,CAACJ,KAAK,CAACG,MAAM,CAACC,UAAU;IACrC;;IAEA;AACF;AACA;AACA;AACA;AACA;AACA;EANE;IAAA;IAAA,OAOA,2BAAyB;MACvB,OAAO,IAAI,CAACJ,KAAK,CAACG,MAAM,CAACI,aAAa;IACxC;;IAEA;AACF;AACA;AACA;AACA;AACA;AACA;EANE;IAAA;IAAA,OAOA,0BAAwB;MACtB,OAAO,IAAI,CAACkB,uBAAuB,EAAE;IACvC;EAAC;EAAA;AAAA;AAAA"}
|
package/dist/meeting/request.js
CHANGED
|
@@ -356,59 +356,22 @@ var MeetingRequest = /*#__PURE__*/function (_StatelessWebexPlugin) {
|
|
|
356
356
|
}
|
|
357
357
|
|
|
358
358
|
/**
|
|
359
|
-
*
|
|
359
|
+
* Sends a requests to get the latest locus DTO, it might be a full Locus or a delta, depending on the url provided
|
|
360
360
|
* @param {Object} options
|
|
361
|
-
* @param {boolean} options.desync flag to get partial or whole locus object
|
|
362
|
-
* @param {String} options.syncUrl sync url to get ht elatest locus delta
|
|
363
|
-
* @returns {Promise}
|
|
364
|
-
*/
|
|
365
|
-
}, {
|
|
366
|
-
key: "syncMeeting",
|
|
367
|
-
value: function syncMeeting(options) {
|
|
368
|
-
/* eslint-disable no-else-return */
|
|
369
|
-
var desync = options.desync;
|
|
370
|
-
var syncUrl = options.syncUrl;
|
|
371
|
-
|
|
372
|
-
/* istanbul ignore else */
|
|
373
|
-
if (desync) {
|
|
374
|
-
// check for existing URL parameters
|
|
375
|
-
syncUrl = syncUrl.concat(syncUrl.split('?')[1] ? '&' : '?').concat("".concat(_constants.LOCUS.SYNCDEBUG, "=").concat(desync));
|
|
376
|
-
}
|
|
377
|
-
|
|
378
|
-
// @ts-ignore
|
|
379
|
-
return this.request({
|
|
380
|
-
method: _constants.HTTP_VERBS.GET,
|
|
381
|
-
uri: syncUrl
|
|
382
|
-
}) // TODO: Handle if delta sync failed . Get the full locus object
|
|
383
|
-
.catch(function (err) {
|
|
384
|
-
_loggerProxy.default.logger.error("Meeting:request#syncMeeting --> Error syncing meeting, error ".concat(err));
|
|
385
|
-
return err;
|
|
386
|
-
});
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
/**
|
|
390
|
-
* Request to get the complete locus object
|
|
391
|
-
* @param {Object} options
|
|
392
|
-
* @param {boolean} options.desync flag to get partial or whole locus object
|
|
393
361
|
* @param {String} options.locusUrl sync url to get ht elatest locus delta
|
|
394
362
|
* @returns {Promise}
|
|
395
363
|
*/
|
|
396
364
|
}, {
|
|
397
|
-
key: "
|
|
398
|
-
value: function
|
|
399
|
-
var
|
|
400
|
-
|
|
401
|
-
if (locusUrl) {
|
|
402
|
-
if (desync) {
|
|
403
|
-
locusUrl += "?".concat(_constants.LOCUS.SYNCDEBUG, "=").concat(desync);
|
|
404
|
-
}
|
|
405
|
-
|
|
365
|
+
key: "getLocusDTO",
|
|
366
|
+
value: function getLocusDTO(options) {
|
|
367
|
+
var url = options.url;
|
|
368
|
+
if (url) {
|
|
406
369
|
// @ts-ignore
|
|
407
370
|
return this.request({
|
|
408
371
|
method: _constants.HTTP_VERBS.GET,
|
|
409
|
-
uri:
|
|
372
|
+
uri: url
|
|
410
373
|
}).catch(function (err) {
|
|
411
|
-
_loggerProxy.default.logger.error("Meeting:request#
|
|
374
|
+
_loggerProxy.default.logger.error("Meeting:request#getLocusDTO --> Error getting latest locus, error ".concat(err));
|
|
412
375
|
return err;
|
|
413
376
|
});
|
|
414
377
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["MeetingRequest","attrs","options","meeting","otherAttrs","webex","boundedStorage","get","REACHABILITY","namespace","localStorageJoinCookie","catch","joinCookieRaw","joinCookie","JSON","parse","LoggerProxy","logger","error","locusDeltaRequest","MeetingUtil","generateLocusDeltaRequest","changeVideoLayoutDebounced","changeVideoLayout","leading","trailing","asResourceOccupant","inviteeAddress","meetingNumber","permissionToken","deviceUrl","locusUrl","resourceId","correlationId","ensureConversation","moderator","pin","moveToResource","roapMessage","preferTranscoding","breakoutsSupported","locale","deviceCapabilities","liveAnnotationSupported","info","url","getJoinCookie","body","device","deviceType","config","meetings","usingResource","moveMediaToResource","respOnlySdp","allowMultiDevice","supportsNativeLobby","clientMediaPreferences","push","BREAKOUTS","BREAKOUTS_SUPPORTED","ANNOTATION","ANNOTATION_ON_SHARE_SUPPORTED","length","clientRegion","countryCode","regionCode","undefined","PARTICIPANT","internal","services","waitForCatalog","LOCI","CALL","invitee","address","concat","ALTERNATE_REDIRECT_TRUE","callPreferences","requestedMedia","_SLIDES_","localMedias","request","method","HTTP_VERBS","POST","uri","captchaRefreshUrl","captchaId","err","dialInUrl","clientUrl","PROVISIONAL","provisionalType","PROVISIONAL_TYPE_DIAL_IN","dialOutUrl","phoneNumber","PROVISIONAL_TYPE_DIAL_OUT","dialoutAddress","desync","syncUrl","split","LOCUS","SYNCDEBUG","GET","reject","phoneUrl","selfId","LEAVE","PUT","ALERT","CONTROLS","lock","locked","PATCH","DECLINE","reason","floorReq","disposition","FLOOR_ACTION","GRANTED","beneficiary","personUrl","devices","requester","floor","resourceUrl","resourceToken","annotationInfo","annotation","tones","SEND_DTMF_ENDPOINT","dtmf","uuid","v4","layoutType","main","content","width","height","Error","renderInfoMain","renderInfoContent","layoutParams","renderInfo","layout","type","END","keepAliveUrl","reactionChannelUrl","reaction","participantId","sender","enable","requestingParticipantId","reactions","enabled","StatelessWebexPlugin"],"sources":["request.ts"],"sourcesContent":["import uuid from 'uuid';\nimport {debounce} from 'lodash';\n// @ts-ignore\nimport {StatelessWebexPlugin} from '@webex/webex-core';\n// @ts-ignore\nimport {deviceType} from '@webex/common';\n\nimport LoggerProxy from '../common/logs/logger-proxy';\nimport {\n ALERT,\n ALTERNATE_REDIRECT_TRUE,\n BREAKOUTS,\n CALL,\n CONTROLS,\n DECLINE,\n END,\n FLOOR_ACTION,\n HTTP_VERBS,\n LEAVE,\n LOCI,\n LOCUS,\n PARTICIPANT,\n PROVISIONAL_TYPE_DIAL_IN,\n PROVISIONAL_TYPE_DIAL_OUT,\n REACHABILITY,\n SEND_DTMF_ENDPOINT,\n _SLIDES_,\n ANNOTATION,\n} from '../constants';\nimport {SendReactionOptions, ToggleReactionsOptions} from './request.type';\nimport MeetingUtil from './util';\nimport {AnnotationInfo} from '../annotation/annotation.types';\n\n/**\n * @class MeetingRequest\n */\nexport default class MeetingRequest extends StatelessWebexPlugin {\n changeVideoLayoutDebounced: any;\n meetingRef: WeakRef<any>;\n locusDeltaRequest: (options: object) => Promise<any>;\n\n /**\n * Constructor\n * @param {Object} attrs\n * @param {Object} options\n */\n constructor(attrs: any, options: any) {\n const {meeting, ...otherAttrs} = attrs;\n\n super(otherAttrs, options);\n\n this.locusDeltaRequest = MeetingUtil.generateLocusDeltaRequest(meeting);\n\n this.changeVideoLayoutDebounced = debounce(this.changeVideoLayout, 2000, {\n leading: true,\n trailing: true,\n });\n }\n\n /**\n * Returns joinCookie from boundedStorage if present.\n * @returns {Object} joinCookie\n */\n private getJoinCookie = async () => {\n // @ts-ignore\n const joinCookieRaw = await this.webex.boundedStorage\n .get(REACHABILITY.namespace, REACHABILITY.localStorageJoinCookie)\n .catch(() => {});\n\n if (joinCookieRaw) {\n try {\n const joinCookie = JSON.parse(joinCookieRaw);\n if (joinCookie) {\n return joinCookie;\n }\n } catch (e) {\n LoggerProxy.logger.error(\n `MeetingRequest#constructor --> Error in parsing join cookie data: ${e}`\n );\n }\n }\n\n return null;\n };\n\n /**\n * Make a network request to join a meeting\n * @param {Object} options\n * @param {String} options.sipUri\n * @param {String} options.deviceUrl\n * @param {String} options.locusUrl\n * @param {String} options.resourceId,\n * @param {String} options.correlationId\n * @param {boolean} options.ensureConversation\n * @param {boolean} options.moderator\n * @param {boolean} options.pin\n * @param {boolean} options.moveToResource\n * @param {Object} options.roapMessage\n * @param {boolean} options.breakoutsSupported\n * @param {String} options.locale,\n * @param {Array} options.deviceCapabilities\n * @param {boolean} options.liveAnnotationSupported\n * @returns {Promise}\n */\n async joinMeeting(options: {\n sipUri: string;\n deviceUrl: string;\n locusUrl: string;\n resourceId: string;\n correlationId: string;\n ensureConversation: boolean;\n moderator: boolean;\n pin: boolean;\n moveToResource: boolean;\n roapMessage: any;\n asResourceOccupant: any;\n inviteeAddress: any;\n meetingNumber: any;\n permissionToken: any;\n preferTranscoding: any;\n breakoutsSupported: boolean;\n locale?: string;\n deviceCapabilities?: Array<string>;\n liveAnnotationSupported: boolean;\n }) {\n const {\n asResourceOccupant,\n inviteeAddress,\n meetingNumber,\n permissionToken,\n deviceUrl,\n locusUrl,\n resourceId,\n correlationId,\n ensureConversation,\n moderator,\n pin,\n moveToResource,\n roapMessage,\n preferTranscoding,\n breakoutsSupported,\n locale,\n deviceCapabilities = [],\n liveAnnotationSupported,\n } = options;\n\n LoggerProxy.logger.info('Meeting:request#joinMeeting --> Joining a meeting', correlationId);\n\n let url = '';\n\n const joinCookie = await this.getJoinCookie();\n\n const body: any = {\n asResourceOccupant,\n device: {\n url: deviceUrl,\n // @ts-ignore - config comes from registerPlugin\n deviceType: this.config.meetings.deviceType,\n },\n usingResource: resourceId || null,\n moveMediaToResource: (resourceId && moveToResource) || false,\n correlationId,\n respOnlySdp: true,\n allowMultiDevice: true,\n ensureConversation: ensureConversation || false,\n supportsNativeLobby: 1,\n clientMediaPreferences: {\n preferTranscoding: preferTranscoding ?? true,\n joinCookie,\n },\n };\n\n if (breakoutsSupported) {\n deviceCapabilities.push(BREAKOUTS.BREAKOUTS_SUPPORTED);\n }\n if (liveAnnotationSupported) {\n deviceCapabilities.push(ANNOTATION.ANNOTATION_ON_SHARE_SUPPORTED);\n }\n\n if (locale) {\n body.locale = locale;\n }\n\n // add deviceCapabilities prop\n if (deviceCapabilities.length) {\n body.deviceCapabilities = deviceCapabilities;\n }\n // @ts-ignore\n if (this.webex.meetings.clientRegion) {\n // @ts-ignore\n body.device.countryCode = this.webex.meetings.clientRegion.countryCode;\n // @ts-ignore\n body.device.regionCode = this.webex.meetings.clientRegion.regionCode;\n }\n\n if (moderator !== undefined) {\n body.moderator = moderator;\n }\n\n if (permissionToken) {\n body.permissionToken = permissionToken;\n }\n\n if (pin !== undefined) {\n body.pin = pin;\n }\n\n if (locusUrl) {\n url = `${locusUrl}/${PARTICIPANT}`;\n } else if (inviteeAddress || meetingNumber) {\n try {\n // @ts-ignore\n await this.webex.internal.services.waitForCatalog('postauth');\n // @ts-ignore\n url = `${this.webex.internal.services.get('locus')}/${LOCI}/${CALL}`;\n body.invitee = {\n address: inviteeAddress || `wbxmn:${meetingNumber}`,\n };\n } catch (e) {\n LoggerProxy.logger.error(\n `Meeting:request#joinMeeting Error Joining ${inviteeAddress || meetingNumber} --> ${e}`\n );\n throw e;\n }\n }\n\n // TODO: -- this will be resolved in SDK request\n url = url.concat(`?${ALTERNATE_REDIRECT_TRUE}`);\n\n if (resourceId === inviteeAddress) {\n body.callPreferences = {\n requestedMedia: [_SLIDES_],\n };\n }\n\n if (roapMessage) {\n body.localMedias = roapMessage.localMedias;\n }\n\n /// @ts-ignore\n return this.request({\n method: HTTP_VERBS.POST,\n uri: url,\n body,\n });\n }\n\n /**\n * Send a request to refresh the captcha\n * @param {Object} options\n * @param {String} options.captchaRefreshUrl\n * @param {String} options.captchaId\n * @returns {Promise}\n * @private\n */\n private refreshCaptcha({\n captchaRefreshUrl,\n captchaId,\n }: {\n captchaRefreshUrl: string;\n captchaId: string;\n }) {\n const body = {\n captchaId,\n };\n\n // @ts-ignore\n return this.request({\n method: HTTP_VERBS.POST,\n uri: captchaRefreshUrl,\n body,\n }).catch((err) => {\n LoggerProxy.logger.error(`Meeting:request#refreshCaptcha --> Error: ${err}`);\n\n throw err;\n });\n }\n\n /**\n * Make a network request to add a dial in device\n * @param {Object} options\n * @param {String} options.correlationId\n * @param {String} options.locusUrl url for the meeting\n * @param {String} options.dialInUrl identifier for the to-be provisioned device\n * @param {String} options.clientUrl identifier for the web device\n * @returns {Promise}\n * @private\n */\n private dialIn({\n locusUrl,\n dialInUrl,\n clientUrl,\n correlationId,\n }: {\n correlationId: string;\n locusUrl: string;\n dialInUrl: string;\n clientUrl: string;\n }) {\n LoggerProxy.logger.info(\n 'Meeting:request#dialIn --> Provisioning a dial in device',\n correlationId\n );\n const uri = `${locusUrl}/${PARTICIPANT}`;\n\n const body = {\n device: {\n deviceType: deviceType.PROVISIONAL,\n provisionalType: PROVISIONAL_TYPE_DIAL_IN,\n url: dialInUrl,\n clientUrl,\n },\n correlationId,\n };\n\n // @ts-ignore\n return this.locusDeltaRequest({\n method: HTTP_VERBS.POST,\n uri,\n body,\n }).catch((err) => {\n LoggerProxy.logger.error(\n `Meeting:request#dialIn --> Error provisioning a dial in device, error ${err}`\n );\n\n throw err;\n });\n }\n\n /**\n * Make a network request to add a dial out device\n * @param {Object} options\n * @param {String} options.correlationId\n * @param {String} options.locusUrl url for the meeting\n * @param {String} options.dialOutUrl identifier for the to-be provisioned device\n * @param {String} options.phoneNumber phone number to dial out to\n * @param {String} options.clientUrl identifier for the web device\n * @returns {Promise}\n * @private\n */\n private dialOut({\n locusUrl,\n dialOutUrl,\n phoneNumber,\n clientUrl,\n correlationId,\n }: {\n correlationId: string;\n locusUrl: string;\n dialOutUrl: string;\n phoneNumber: string;\n clientUrl: string;\n }) {\n LoggerProxy.logger.info(\n 'Meeting:request#dialOut --> Provisioning a dial out device',\n correlationId\n );\n const uri = `${locusUrl}/${PARTICIPANT}`;\n\n const body = {\n device: {\n deviceType: deviceType.PROVISIONAL,\n provisionalType: PROVISIONAL_TYPE_DIAL_OUT,\n url: dialOutUrl,\n dialoutAddress: phoneNumber,\n clientUrl,\n },\n correlationId,\n };\n\n // @ts-ignore\n return this.locusDeltaRequest({\n method: HTTP_VERBS.POST,\n uri,\n body,\n }).catch((err) => {\n LoggerProxy.logger.error(\n `Meeting:request#dialOut --> Error provisioning a dial out device, error ${err}`\n );\n\n throw err;\n });\n }\n\n /**\n * Syns the missed delta event\n * @param {Object} options\n * @param {boolean} options.desync flag to get partial or whole locus object\n * @param {String} options.syncUrl sync url to get ht elatest locus delta\n * @returns {Promise}\n */\n syncMeeting(options: {desync: boolean; syncUrl: string}) {\n /* eslint-disable no-else-return */\n const {desync} = options;\n let {syncUrl} = options;\n\n /* istanbul ignore else */\n if (desync) {\n // check for existing URL parameters\n syncUrl = syncUrl\n .concat(syncUrl.split('?')[1] ? '&' : '?')\n .concat(`${LOCUS.SYNCDEBUG}=${desync}`);\n }\n\n // @ts-ignore\n return this.request({\n method: HTTP_VERBS.GET,\n uri: syncUrl,\n }) // TODO: Handle if delta sync failed . Get the full locus object\n .catch((err) => {\n LoggerProxy.logger.error(\n `Meeting:request#syncMeeting --> Error syncing meeting, error ${err}`\n );\n\n return err;\n });\n }\n\n /**\n * Request to get the complete locus object\n * @param {Object} options\n * @param {boolean} options.desync flag to get partial or whole locus object\n * @param {String} options.locusUrl sync url to get ht elatest locus delta\n * @returns {Promise}\n */\n getFullLocus(options: {desync: boolean; locusUrl: string}) {\n let {locusUrl} = options;\n const {desync} = options;\n\n if (locusUrl) {\n if (desync) {\n locusUrl += `?${LOCUS.SYNCDEBUG}=${desync}`;\n }\n\n // @ts-ignore\n return this.request({\n method: HTTP_VERBS.GET,\n uri: locusUrl,\n }).catch((err) => {\n LoggerProxy.logger.error(\n `Meeting:request#getFullLocus --> Error getting full locus, error ${err}`\n );\n\n return err;\n });\n }\n\n return Promise.reject();\n }\n\n /**\n * Make a network request to make a provisioned phone leave the meeting\n * @param {Object} options\n * @param {String} options.locusUrl\n * @param {String} options.phoneUrl\n * @param {String} options.correlationId\n * @param {String} options.selfId\n * @returns {Promise}\n * @private\n */\n private disconnectPhoneAudio({\n locusUrl,\n phoneUrl,\n correlationId,\n selfId,\n }: {\n locusUrl: string;\n phoneUrl: string;\n correlationId: string;\n selfId: string;\n }) {\n LoggerProxy.logger.info(\n `Meeting:request#disconnectPhoneAudio --> request phone ${phoneUrl} to leave`,\n correlationId\n );\n const uri = `${locusUrl}/${PARTICIPANT}/${selfId}/${LEAVE}`;\n\n const body = {\n device: {\n deviceType: deviceType.PROVISIONAL,\n url: phoneUrl,\n },\n correlationId,\n };\n\n // @ts-ignore\n return this.locusDeltaRequest({\n method: HTTP_VERBS.PUT,\n uri,\n body,\n }).catch((err) => {\n LoggerProxy.logger.error(\n `Meeting:request#disconnectPhoneAudio --> Error when requesting phone ${phoneUrl} to leave, error ${err}`\n );\n\n throw err;\n });\n }\n\n /**\n * Make a network request to leave a meeting\n * @param {Object} options\n * @param {Url} options.locusUrl\n * @param {String} options.selfId\n * @param {Url} options.deviceUrl\n * @param {String} options.resourceId,\n * @param {String} options.correlationId\n * @returns {Promise}\n */\n leaveMeeting({\n locusUrl,\n selfId,\n deviceUrl: url,\n resourceId,\n correlationId,\n }: {\n locusUrl: string;\n selfId: string;\n deviceUrl: string;\n resourceId: string;\n correlationId: string;\n }) {\n LoggerProxy.logger.info('Meeting:request#leaveMeeting --> Leaving a meeting', correlationId);\n\n const uri = `${locusUrl}/${PARTICIPANT}/${selfId}/${LEAVE}`;\n const body = {\n device: {\n // @ts-ignore\n deviceType: this.config.meetings.deviceType,\n url,\n },\n usingResource: resourceId || null,\n correlationId,\n };\n\n return this.locusDeltaRequest({\n method: HTTP_VERBS.PUT,\n uri,\n body,\n });\n }\n\n /**\n * Make a network request to acknowledge a meeting\n * @param {Object} options\n * @param {String} options.locusUrl\n * @param {String} options.deviceUrl\n * @param {String} options.correlationId\n * @returns {Promise}\n */\n acknowledgeMeeting(options: {locusUrl: string; deviceUrl: string; correlationId: string}) {\n const uri = `${options.locusUrl}/${PARTICIPANT}/${ALERT}`;\n const body = {\n device: {\n // @ts-ignore\n deviceType: this.config.meetings.deviceType,\n url: options.deviceUrl,\n },\n correlationId: options.correlationId,\n };\n\n return this.locusDeltaRequest({\n method: HTTP_VERBS.PUT,\n uri,\n body,\n });\n }\n\n /**\n * Makes a network request to lock the meeting\n * @param {Object} options\n * @param {Boolean} options.lock Whether it is locked or not\n * @returns {Promise}\n */\n lockMeeting(options) {\n const uri = `${options.locusUrl}/${CONTROLS}`;\n const body = {\n lock: {\n locked: options.lock,\n },\n };\n\n return this.locusDeltaRequest({\n method: HTTP_VERBS.PATCH,\n uri,\n body,\n });\n }\n\n /**\n * Make a network request to decline a meeting\n * @param {Object} options\n * @param {String} options.locusUrl\n * @param {String} options.deviceUrl\n * @param {String} options.reason\n * @returns {Promise}\n */\n declineMeeting(options: {locusUrl: string; deviceUrl: string; reason: string}) {\n const uri = `${options.locusUrl}/${PARTICIPANT}/${DECLINE}`;\n const body = {\n device: {\n // @ts-ignore\n deviceType: this.config.meetings.deviceType,\n url: options.deviceUrl,\n },\n ...(options.reason && {reason: options.reason}),\n };\n\n return this.locusDeltaRequest({\n method: HTTP_VERBS.PUT,\n uri,\n body,\n });\n }\n\n /**\n * change the content floor grant\n * @param {Object} options options for floor grant\n * @param {String} options.disposition floor action (granted/released)\n * @param {String} options.personUrl personUrl who is requesting floor\n * @param {String} options.deviceUrl Url of a device\n * @param {String} options.resourceId Populated if you are paired to a device\n * @param {String} options.uri floor grant uri\n * @returns {Promise}\n */\n changeMeetingFloor(\n options:\n | {\n disposition: string;\n personUrl: string;\n deviceUrl: string;\n resourceId: string;\n uri: string;\n annotationInfo: AnnotationInfo;\n }\n | any\n ) {\n let floorReq: any = {disposition: options.disposition};\n\n /* istanbul ignore else */\n if (options.disposition === FLOOR_ACTION.GRANTED) {\n floorReq = {\n beneficiary: {\n url: options.personUrl,\n devices: [\n {\n // @ts-ignore\n deviceType: this.config.meetings.deviceType,\n url: options.deviceUrl,\n },\n ],\n },\n disposition: options.disposition,\n requester: {\n url: options.personUrl,\n },\n };\n }\n\n const body: any = {\n floor: floorReq,\n resourceUrl: options.resourceUrl,\n };\n\n if (options?.resourceToken) {\n body.resourceToken = options?.resourceToken;\n }\n if (options?.annotationInfo) {\n body.annotation = options?.annotationInfo;\n }\n\n // @ts-ignore\n return this.request({\n uri: options.uri,\n method: HTTP_VERBS.PUT,\n body,\n });\n }\n\n /**\n * Sends a request to the DTMF endpoint to send tones\n * @param {Object} options\n * @param {String} options.locusUrl\n * @param {String} options.deviceUrl\n * @param {String} options.tones a string of one or more DTMF tones to send\n * @returns {Promise}\n */\n sendDTMF({locusUrl, deviceUrl, tones}: {locusUrl: string; deviceUrl: string; tones: string}) {\n // @ts-ignore\n return this.locusDeltaRequest({\n method: HTTP_VERBS.POST,\n uri: `${locusUrl}/${SEND_DTMF_ENDPOINT}`,\n body: {\n deviceUrl,\n dtmf: {\n correlationId: uuid.v4(),\n tones,\n },\n },\n });\n }\n\n /**\n * Sends a request to the controls endpoint to set the video layout\n * @param {Object} options\n * @param {String} options.locusUrl\n * @param {String} options.deviceUrl\n * @param {String} options.layoutType a layout type that should be available in meeting constants {@link #layout_types}\n * @param {Object} options.main preferred dimensions for the remote main video stream\n * @param {Number} options.main.width preferred width of main video stream\n * @param {Number} options.main.height preferred height of main video stream\n * @param {Object} options.content preferred dimensions for the remote content share stream\n * @param {Number} options.content.width preferred width of content share stream\n * @param {Number} options.content.height preferred height of content share stream\n * @returns {Promise}\n */\n changeVideoLayout({\n locusUrl,\n deviceUrl,\n layoutType,\n main,\n content,\n }: {\n locusUrl: string;\n deviceUrl: string;\n layoutType: string;\n main: {\n width: number;\n height: number;\n };\n content: {\n width: number;\n height: number;\n };\n }) {\n // send main/content renderInfo only if both width and height are specified\n if (main && (!main.width || !main.height)) {\n return Promise.reject(\n new Error(\n `Both width and height must be specified. One of them is missing for main: ${JSON.stringify(\n main\n )}`\n )\n );\n }\n\n if (content && (!content.width || !content.height)) {\n return Promise.reject(\n new Error(\n `Both width and height must be specified. One of them is missing for content: ${JSON.stringify(\n content\n )}`\n )\n );\n }\n\n const renderInfoMain = main ? {width: main.width, height: main.height} : undefined;\n const renderInfoContent = content ? {width: content.width, height: content.height} : undefined;\n\n const layoutParams =\n renderInfoMain || renderInfoContent\n ? {\n renderInfo: {\n main: renderInfoMain,\n content: renderInfoContent,\n },\n }\n : undefined;\n\n // @ts-ignore\n return this.locusDeltaRequest({\n method: HTTP_VERBS.PUT,\n uri: `${locusUrl}/${CONTROLS}`,\n body: {\n layout: {\n deviceUrl,\n type: layoutType,\n layoutParams,\n },\n },\n });\n }\n\n /**\n * Make a network request to end meeting for all\n * @param {Object} options\n * @param {Url} options.locusUrl\n * @returns {Promise}\n */\n endMeetingForAll({locusUrl}: {locusUrl: string}) {\n const uri = `${locusUrl}/${END}`;\n\n // @ts-ignore\n return this.locusDeltaRequest({\n method: HTTP_VERBS.POST,\n uri,\n });\n }\n\n /**\n * Send a locus keepAlive (used in lobby)\n * @param {Object} options\n * @param {Url} options.keepAliveUrl\n * @returns {Promise}\n */\n keepAlive({keepAliveUrl}: {keepAliveUrl: string}) {\n // @ts-ignore\n return this.request({\n method: HTTP_VERBS.GET,\n uri: keepAliveUrl,\n });\n }\n\n /**\n * Make a network request to send a reaction.\n * @param {Object} options\n * @param {Url} options.reactionChannelUrl\n * @param {Reaction} options.reaction\n * @param {string} options.senderID\n * @returns {Promise}\n */\n sendReaction({reactionChannelUrl, reaction, participantId}: SendReactionOptions) {\n const uri = reactionChannelUrl;\n\n // @ts-ignore\n return this.request({\n method: HTTP_VERBS.POST,\n uri,\n body: {\n sender: {participantId},\n reaction,\n },\n });\n }\n\n /**\n * Make a network request to enable or disable reactions.\n * @param {boolean} options.enable - determines if we need to enable or disable.\n * @param {locusUrl} options.locusUrl\n * @returns {Promise}\n */\n toggleReactions({enable, locusUrl, requestingParticipantId}: ToggleReactionsOptions) {\n const uri = `${locusUrl}/${CONTROLS}`;\n\n // @ts-ignore\n return this.locusDeltaRequest({\n method: HTTP_VERBS.PUT,\n uri,\n body: {\n reactions: {\n enabled: enable,\n },\n requestingParticipantId,\n },\n });\n }\n\n getLocusStatusByUrl(locusUrl: string) {\n // @ts-ignore\n return this.request({\n method: HTTP_VERBS.GET,\n uri: locusUrl,\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAGA;AAEA;AAEA;AACA;AAsBA;AAAiC;AAAA;AAAA;AAAA;AAAA;AAGjC;AACA;AACA;AAFA,IAGqBA,cAAc;EAAA;EAAA;EAKjC;AACF;AACA;AACA;AACA;EACE,wBAAYC,KAAU,EAAEC,OAAY,EAAE;IAAA;IAAA;IACpC,IAAOC,OAAO,GAAmBF,KAAK,CAA/BE,OAAO;MAAKC,UAAU,0CAAIH,KAAK;IAEtC,0BAAMG,UAAU,EAAEF,OAAO;IAAE;IAAA;IAAA;IAAA,iLAcL;MAAA;MAAA;QAAA;UAAA;YAAA;YAAA,OAEM,MAAKG,KAAK,CAACC,cAAc,CAClDC,GAAG,CAACC,uBAAY,CAACC,SAAS,EAAED,uBAAY,CAACE,sBAAsB,CAAC,CAChEC,KAAK,CAAC,YAAM,CAAC,CAAC,CAAC;UAAA;YAFZC,aAAa;YAAA,KAIfA,aAAa;cAAA;cAAA;YAAA;YAAA;YAEPC,UAAU,GAAGC,IAAI,CAACC,KAAK,CAACH,aAAa,CAAC;YAAA,KACxCC,UAAU;cAAA;cAAA;YAAA;YAAA,iCACLA,UAAU;UAAA;YAAA;YAAA;UAAA;YAAA;YAAA;YAGnBG,oBAAW,CAACC,MAAM,CAACC,KAAK,0FAEvB;UAAC;YAAA,iCAIC,IAAI;UAAA;UAAA;YAAA;QAAA;MAAA;IAAA,CACZ;IAhCC,MAAKC,iBAAiB,GAAGC,aAAW,CAACC,yBAAyB,CAAClB,OAAO,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;YACTC,OAAO,EAAEH;UACX,CAAC;UACDC,uBAAuB,EAAvBA;QACF;MACF,CAAC,CAAC;IACJ;EAAC;IAAA;IAAA,OAED,6BAAoB3H,QAAgB,EAAE;MACpC;MACA,OAAO,IAAI,CAACmD,OAAO,CAAC;QAClBC,MAAM,EAAEC,qBAAU,CAACoB,GAAG;QACtBlB,GAAG,EAAEvD;MACP,CAAC,CAAC;IACJ;EAAC;EAAA;AAAA,EA3zByC8H,+BAAoB;AAAA"}
|
|
1
|
+
{"version":3,"names":["MeetingRequest","attrs","options","meeting","otherAttrs","webex","boundedStorage","get","REACHABILITY","namespace","localStorageJoinCookie","catch","joinCookieRaw","joinCookie","JSON","parse","LoggerProxy","logger","error","locusDeltaRequest","MeetingUtil","generateLocusDeltaRequest","changeVideoLayoutDebounced","changeVideoLayout","leading","trailing","asResourceOccupant","inviteeAddress","meetingNumber","permissionToken","deviceUrl","locusUrl","resourceId","correlationId","ensureConversation","moderator","pin","moveToResource","roapMessage","preferTranscoding","breakoutsSupported","locale","deviceCapabilities","liveAnnotationSupported","info","url","getJoinCookie","body","device","deviceType","config","meetings","usingResource","moveMediaToResource","respOnlySdp","allowMultiDevice","supportsNativeLobby","clientMediaPreferences","push","BREAKOUTS","BREAKOUTS_SUPPORTED","ANNOTATION","ANNOTATION_ON_SHARE_SUPPORTED","length","clientRegion","countryCode","regionCode","undefined","PARTICIPANT","internal","services","waitForCatalog","LOCI","CALL","invitee","address","concat","ALTERNATE_REDIRECT_TRUE","callPreferences","requestedMedia","_SLIDES_","localMedias","request","method","HTTP_VERBS","POST","uri","captchaRefreshUrl","captchaId","err","dialInUrl","clientUrl","PROVISIONAL","provisionalType","PROVISIONAL_TYPE_DIAL_IN","dialOutUrl","phoneNumber","PROVISIONAL_TYPE_DIAL_OUT","dialoutAddress","GET","reject","phoneUrl","selfId","LEAVE","PUT","ALERT","CONTROLS","lock","locked","PATCH","DECLINE","reason","floorReq","disposition","FLOOR_ACTION","GRANTED","beneficiary","personUrl","devices","requester","floor","resourceUrl","resourceToken","annotationInfo","annotation","tones","SEND_DTMF_ENDPOINT","dtmf","uuid","v4","layoutType","main","content","width","height","Error","renderInfoMain","renderInfoContent","layoutParams","renderInfo","layout","type","END","keepAliveUrl","reactionChannelUrl","reaction","participantId","sender","enable","requestingParticipantId","reactions","enabled","StatelessWebexPlugin"],"sources":["request.ts"],"sourcesContent":["import uuid from 'uuid';\nimport {debounce} from 'lodash';\n// @ts-ignore\nimport {StatelessWebexPlugin} from '@webex/webex-core';\n// @ts-ignore\nimport {deviceType} from '@webex/common';\n\nimport LoggerProxy from '../common/logs/logger-proxy';\nimport {\n ALERT,\n ALTERNATE_REDIRECT_TRUE,\n BREAKOUTS,\n CALL,\n CONTROLS,\n DECLINE,\n END,\n FLOOR_ACTION,\n HTTP_VERBS,\n LEAVE,\n LOCI,\n PARTICIPANT,\n PROVISIONAL_TYPE_DIAL_IN,\n PROVISIONAL_TYPE_DIAL_OUT,\n REACHABILITY,\n SEND_DTMF_ENDPOINT,\n _SLIDES_,\n ANNOTATION,\n} from '../constants';\nimport {SendReactionOptions, ToggleReactionsOptions} from './request.type';\nimport MeetingUtil from './util';\nimport {AnnotationInfo} from '../annotation/annotation.types';\n\n/**\n * @class MeetingRequest\n */\nexport default class MeetingRequest extends StatelessWebexPlugin {\n changeVideoLayoutDebounced: any;\n meetingRef: WeakRef<any>;\n locusDeltaRequest: (options: object) => Promise<any>;\n\n /**\n * Constructor\n * @param {Object} attrs\n * @param {Object} options\n */\n constructor(attrs: any, options: any) {\n const {meeting, ...otherAttrs} = attrs;\n\n super(otherAttrs, options);\n\n this.locusDeltaRequest = MeetingUtil.generateLocusDeltaRequest(meeting);\n\n this.changeVideoLayoutDebounced = debounce(this.changeVideoLayout, 2000, {\n leading: true,\n trailing: true,\n });\n }\n\n /**\n * Returns joinCookie from boundedStorage if present.\n * @returns {Object} joinCookie\n */\n private getJoinCookie = async () => {\n // @ts-ignore\n const joinCookieRaw = await this.webex.boundedStorage\n .get(REACHABILITY.namespace, REACHABILITY.localStorageJoinCookie)\n .catch(() => {});\n\n if (joinCookieRaw) {\n try {\n const joinCookie = JSON.parse(joinCookieRaw);\n if (joinCookie) {\n return joinCookie;\n }\n } catch (e) {\n LoggerProxy.logger.error(\n `MeetingRequest#constructor --> Error in parsing join cookie data: ${e}`\n );\n }\n }\n\n return null;\n };\n\n /**\n * Make a network request to join a meeting\n * @param {Object} options\n * @param {String} options.sipUri\n * @param {String} options.deviceUrl\n * @param {String} options.locusUrl\n * @param {String} options.resourceId,\n * @param {String} options.correlationId\n * @param {boolean} options.ensureConversation\n * @param {boolean} options.moderator\n * @param {boolean} options.pin\n * @param {boolean} options.moveToResource\n * @param {Object} options.roapMessage\n * @param {boolean} options.breakoutsSupported\n * @param {String} options.locale,\n * @param {Array} options.deviceCapabilities\n * @param {boolean} options.liveAnnotationSupported\n * @returns {Promise}\n */\n async joinMeeting(options: {\n sipUri: string;\n deviceUrl: string;\n locusUrl: string;\n resourceId: string;\n correlationId: string;\n ensureConversation: boolean;\n moderator: boolean;\n pin: boolean;\n moveToResource: boolean;\n roapMessage: any;\n asResourceOccupant: any;\n inviteeAddress: any;\n meetingNumber: any;\n permissionToken: any;\n preferTranscoding: any;\n breakoutsSupported: boolean;\n locale?: string;\n deviceCapabilities?: Array<string>;\n liveAnnotationSupported: boolean;\n }) {\n const {\n asResourceOccupant,\n inviteeAddress,\n meetingNumber,\n permissionToken,\n deviceUrl,\n locusUrl,\n resourceId,\n correlationId,\n ensureConversation,\n moderator,\n pin,\n moveToResource,\n roapMessage,\n preferTranscoding,\n breakoutsSupported,\n locale,\n deviceCapabilities = [],\n liveAnnotationSupported,\n } = options;\n\n LoggerProxy.logger.info('Meeting:request#joinMeeting --> Joining a meeting', correlationId);\n\n let url = '';\n\n const joinCookie = await this.getJoinCookie();\n\n const body: any = {\n asResourceOccupant,\n device: {\n url: deviceUrl,\n // @ts-ignore - config comes from registerPlugin\n deviceType: this.config.meetings.deviceType,\n },\n usingResource: resourceId || null,\n moveMediaToResource: (resourceId && moveToResource) || false,\n correlationId,\n respOnlySdp: true,\n allowMultiDevice: true,\n ensureConversation: ensureConversation || false,\n supportsNativeLobby: 1,\n clientMediaPreferences: {\n preferTranscoding: preferTranscoding ?? true,\n joinCookie,\n },\n };\n\n if (breakoutsSupported) {\n deviceCapabilities.push(BREAKOUTS.BREAKOUTS_SUPPORTED);\n }\n if (liveAnnotationSupported) {\n deviceCapabilities.push(ANNOTATION.ANNOTATION_ON_SHARE_SUPPORTED);\n }\n\n if (locale) {\n body.locale = locale;\n }\n\n // add deviceCapabilities prop\n if (deviceCapabilities.length) {\n body.deviceCapabilities = deviceCapabilities;\n }\n // @ts-ignore\n if (this.webex.meetings.clientRegion) {\n // @ts-ignore\n body.device.countryCode = this.webex.meetings.clientRegion.countryCode;\n // @ts-ignore\n body.device.regionCode = this.webex.meetings.clientRegion.regionCode;\n }\n\n if (moderator !== undefined) {\n body.moderator = moderator;\n }\n\n if (permissionToken) {\n body.permissionToken = permissionToken;\n }\n\n if (pin !== undefined) {\n body.pin = pin;\n }\n\n if (locusUrl) {\n url = `${locusUrl}/${PARTICIPANT}`;\n } else if (inviteeAddress || meetingNumber) {\n try {\n // @ts-ignore\n await this.webex.internal.services.waitForCatalog('postauth');\n // @ts-ignore\n url = `${this.webex.internal.services.get('locus')}/${LOCI}/${CALL}`;\n body.invitee = {\n address: inviteeAddress || `wbxmn:${meetingNumber}`,\n };\n } catch (e) {\n LoggerProxy.logger.error(\n `Meeting:request#joinMeeting Error Joining ${inviteeAddress || meetingNumber} --> ${e}`\n );\n throw e;\n }\n }\n\n // TODO: -- this will be resolved in SDK request\n url = url.concat(`?${ALTERNATE_REDIRECT_TRUE}`);\n\n if (resourceId === inviteeAddress) {\n body.callPreferences = {\n requestedMedia: [_SLIDES_],\n };\n }\n\n if (roapMessage) {\n body.localMedias = roapMessage.localMedias;\n }\n\n /// @ts-ignore\n return this.request({\n method: HTTP_VERBS.POST,\n uri: url,\n body,\n });\n }\n\n /**\n * Send a request to refresh the captcha\n * @param {Object} options\n * @param {String} options.captchaRefreshUrl\n * @param {String} options.captchaId\n * @returns {Promise}\n * @private\n */\n private refreshCaptcha({\n captchaRefreshUrl,\n captchaId,\n }: {\n captchaRefreshUrl: string;\n captchaId: string;\n }) {\n const body = {\n captchaId,\n };\n\n // @ts-ignore\n return this.request({\n method: HTTP_VERBS.POST,\n uri: captchaRefreshUrl,\n body,\n }).catch((err) => {\n LoggerProxy.logger.error(`Meeting:request#refreshCaptcha --> Error: ${err}`);\n\n throw err;\n });\n }\n\n /**\n * Make a network request to add a dial in device\n * @param {Object} options\n * @param {String} options.correlationId\n * @param {String} options.locusUrl url for the meeting\n * @param {String} options.dialInUrl identifier for the to-be provisioned device\n * @param {String} options.clientUrl identifier for the web device\n * @returns {Promise}\n * @private\n */\n private dialIn({\n locusUrl,\n dialInUrl,\n clientUrl,\n correlationId,\n }: {\n correlationId: string;\n locusUrl: string;\n dialInUrl: string;\n clientUrl: string;\n }) {\n LoggerProxy.logger.info(\n 'Meeting:request#dialIn --> Provisioning a dial in device',\n correlationId\n );\n const uri = `${locusUrl}/${PARTICIPANT}`;\n\n const body = {\n device: {\n deviceType: deviceType.PROVISIONAL,\n provisionalType: PROVISIONAL_TYPE_DIAL_IN,\n url: dialInUrl,\n clientUrl,\n },\n correlationId,\n };\n\n // @ts-ignore\n return this.locusDeltaRequest({\n method: HTTP_VERBS.POST,\n uri,\n body,\n }).catch((err) => {\n LoggerProxy.logger.error(\n `Meeting:request#dialIn --> Error provisioning a dial in device, error ${err}`\n );\n\n throw err;\n });\n }\n\n /**\n * Make a network request to add a dial out device\n * @param {Object} options\n * @param {String} options.correlationId\n * @param {String} options.locusUrl url for the meeting\n * @param {String} options.dialOutUrl identifier for the to-be provisioned device\n * @param {String} options.phoneNumber phone number to dial out to\n * @param {String} options.clientUrl identifier for the web device\n * @returns {Promise}\n * @private\n */\n private dialOut({\n locusUrl,\n dialOutUrl,\n phoneNumber,\n clientUrl,\n correlationId,\n }: {\n correlationId: string;\n locusUrl: string;\n dialOutUrl: string;\n phoneNumber: string;\n clientUrl: string;\n }) {\n LoggerProxy.logger.info(\n 'Meeting:request#dialOut --> Provisioning a dial out device',\n correlationId\n );\n const uri = `${locusUrl}/${PARTICIPANT}`;\n\n const body = {\n device: {\n deviceType: deviceType.PROVISIONAL,\n provisionalType: PROVISIONAL_TYPE_DIAL_OUT,\n url: dialOutUrl,\n dialoutAddress: phoneNumber,\n clientUrl,\n },\n correlationId,\n };\n\n // @ts-ignore\n return this.locusDeltaRequest({\n method: HTTP_VERBS.POST,\n uri,\n body,\n }).catch((err) => {\n LoggerProxy.logger.error(\n `Meeting:request#dialOut --> Error provisioning a dial out device, error ${err}`\n );\n\n throw err;\n });\n }\n\n /**\n * Sends a requests to get the latest locus DTO, it might be a full Locus or a delta, depending on the url provided\n * @param {Object} options\n * @param {String} options.locusUrl sync url to get ht elatest locus delta\n * @returns {Promise}\n */\n getLocusDTO(options: {url: string}) {\n const {url} = options;\n\n if (url) {\n // @ts-ignore\n return this.request({\n method: HTTP_VERBS.GET,\n uri: url,\n }).catch((err) => {\n LoggerProxy.logger.error(\n `Meeting:request#getLocusDTO --> Error getting latest locus, error ${err}`\n );\n\n return err;\n });\n }\n\n return Promise.reject();\n }\n\n /**\n * Make a network request to make a provisioned phone leave the meeting\n * @param {Object} options\n * @param {String} options.locusUrl\n * @param {String} options.phoneUrl\n * @param {String} options.correlationId\n * @param {String} options.selfId\n * @returns {Promise}\n * @private\n */\n private disconnectPhoneAudio({\n locusUrl,\n phoneUrl,\n correlationId,\n selfId,\n }: {\n locusUrl: string;\n phoneUrl: string;\n correlationId: string;\n selfId: string;\n }) {\n LoggerProxy.logger.info(\n `Meeting:request#disconnectPhoneAudio --> request phone ${phoneUrl} to leave`,\n correlationId\n );\n const uri = `${locusUrl}/${PARTICIPANT}/${selfId}/${LEAVE}`;\n\n const body = {\n device: {\n deviceType: deviceType.PROVISIONAL,\n url: phoneUrl,\n },\n correlationId,\n };\n\n // @ts-ignore\n return this.locusDeltaRequest({\n method: HTTP_VERBS.PUT,\n uri,\n body,\n }).catch((err) => {\n LoggerProxy.logger.error(\n `Meeting:request#disconnectPhoneAudio --> Error when requesting phone ${phoneUrl} to leave, error ${err}`\n );\n\n throw err;\n });\n }\n\n /**\n * Make a network request to leave a meeting\n * @param {Object} options\n * @param {Url} options.locusUrl\n * @param {String} options.selfId\n * @param {Url} options.deviceUrl\n * @param {String} options.resourceId,\n * @param {String} options.correlationId\n * @returns {Promise}\n */\n leaveMeeting({\n locusUrl,\n selfId,\n deviceUrl: url,\n resourceId,\n correlationId,\n }: {\n locusUrl: string;\n selfId: string;\n deviceUrl: string;\n resourceId: string;\n correlationId: string;\n }) {\n LoggerProxy.logger.info('Meeting:request#leaveMeeting --> Leaving a meeting', correlationId);\n\n const uri = `${locusUrl}/${PARTICIPANT}/${selfId}/${LEAVE}`;\n const body = {\n device: {\n // @ts-ignore\n deviceType: this.config.meetings.deviceType,\n url,\n },\n usingResource: resourceId || null,\n correlationId,\n };\n\n return this.locusDeltaRequest({\n method: HTTP_VERBS.PUT,\n uri,\n body,\n });\n }\n\n /**\n * Make a network request to acknowledge a meeting\n * @param {Object} options\n * @param {String} options.locusUrl\n * @param {String} options.deviceUrl\n * @param {String} options.correlationId\n * @returns {Promise}\n */\n acknowledgeMeeting(options: {locusUrl: string; deviceUrl: string; correlationId: string}) {\n const uri = `${options.locusUrl}/${PARTICIPANT}/${ALERT}`;\n const body = {\n device: {\n // @ts-ignore\n deviceType: this.config.meetings.deviceType,\n url: options.deviceUrl,\n },\n correlationId: options.correlationId,\n };\n\n return this.locusDeltaRequest({\n method: HTTP_VERBS.PUT,\n uri,\n body,\n });\n }\n\n /**\n * Makes a network request to lock the meeting\n * @param {Object} options\n * @param {Boolean} options.lock Whether it is locked or not\n * @returns {Promise}\n */\n lockMeeting(options) {\n const uri = `${options.locusUrl}/${CONTROLS}`;\n const body = {\n lock: {\n locked: options.lock,\n },\n };\n\n return this.locusDeltaRequest({\n method: HTTP_VERBS.PATCH,\n uri,\n body,\n });\n }\n\n /**\n * Make a network request to decline a meeting\n * @param {Object} options\n * @param {String} options.locusUrl\n * @param {String} options.deviceUrl\n * @param {String} options.reason\n * @returns {Promise}\n */\n declineMeeting(options: {locusUrl: string; deviceUrl: string; reason: string}) {\n const uri = `${options.locusUrl}/${PARTICIPANT}/${DECLINE}`;\n const body = {\n device: {\n // @ts-ignore\n deviceType: this.config.meetings.deviceType,\n url: options.deviceUrl,\n },\n ...(options.reason && {reason: options.reason}),\n };\n\n return this.locusDeltaRequest({\n method: HTTP_VERBS.PUT,\n uri,\n body,\n });\n }\n\n /**\n * change the content floor grant\n * @param {Object} options options for floor grant\n * @param {String} options.disposition floor action (granted/released)\n * @param {String} options.personUrl personUrl who is requesting floor\n * @param {String} options.deviceUrl Url of a device\n * @param {String} options.resourceId Populated if you are paired to a device\n * @param {String} options.uri floor grant uri\n * @returns {Promise}\n */\n changeMeetingFloor(\n options:\n | {\n disposition: string;\n personUrl: string;\n deviceUrl: string;\n resourceId: string;\n uri: string;\n annotationInfo: AnnotationInfo;\n }\n | any\n ) {\n let floorReq: any = {disposition: options.disposition};\n\n /* istanbul ignore else */\n if (options.disposition === FLOOR_ACTION.GRANTED) {\n floorReq = {\n beneficiary: {\n url: options.personUrl,\n devices: [\n {\n // @ts-ignore\n deviceType: this.config.meetings.deviceType,\n url: options.deviceUrl,\n },\n ],\n },\n disposition: options.disposition,\n requester: {\n url: options.personUrl,\n },\n };\n }\n\n const body: any = {\n floor: floorReq,\n resourceUrl: options.resourceUrl,\n };\n\n if (options?.resourceToken) {\n body.resourceToken = options?.resourceToken;\n }\n if (options?.annotationInfo) {\n body.annotation = options?.annotationInfo;\n }\n\n // @ts-ignore\n return this.request({\n uri: options.uri,\n method: HTTP_VERBS.PUT,\n body,\n });\n }\n\n /**\n * Sends a request to the DTMF endpoint to send tones\n * @param {Object} options\n * @param {String} options.locusUrl\n * @param {String} options.deviceUrl\n * @param {String} options.tones a string of one or more DTMF tones to send\n * @returns {Promise}\n */\n sendDTMF({locusUrl, deviceUrl, tones}: {locusUrl: string; deviceUrl: string; tones: string}) {\n // @ts-ignore\n return this.locusDeltaRequest({\n method: HTTP_VERBS.POST,\n uri: `${locusUrl}/${SEND_DTMF_ENDPOINT}`,\n body: {\n deviceUrl,\n dtmf: {\n correlationId: uuid.v4(),\n tones,\n },\n },\n });\n }\n\n /**\n * Sends a request to the controls endpoint to set the video layout\n * @param {Object} options\n * @param {String} options.locusUrl\n * @param {String} options.deviceUrl\n * @param {String} options.layoutType a layout type that should be available in meeting constants {@link #layout_types}\n * @param {Object} options.main preferred dimensions for the remote main video stream\n * @param {Number} options.main.width preferred width of main video stream\n * @param {Number} options.main.height preferred height of main video stream\n * @param {Object} options.content preferred dimensions for the remote content share stream\n * @param {Number} options.content.width preferred width of content share stream\n * @param {Number} options.content.height preferred height of content share stream\n * @returns {Promise}\n */\n changeVideoLayout({\n locusUrl,\n deviceUrl,\n layoutType,\n main,\n content,\n }: {\n locusUrl: string;\n deviceUrl: string;\n layoutType: string;\n main: {\n width: number;\n height: number;\n };\n content: {\n width: number;\n height: number;\n };\n }) {\n // send main/content renderInfo only if both width and height are specified\n if (main && (!main.width || !main.height)) {\n return Promise.reject(\n new Error(\n `Both width and height must be specified. One of them is missing for main: ${JSON.stringify(\n main\n )}`\n )\n );\n }\n\n if (content && (!content.width || !content.height)) {\n return Promise.reject(\n new Error(\n `Both width and height must be specified. One of them is missing for content: ${JSON.stringify(\n content\n )}`\n )\n );\n }\n\n const renderInfoMain = main ? {width: main.width, height: main.height} : undefined;\n const renderInfoContent = content ? {width: content.width, height: content.height} : undefined;\n\n const layoutParams =\n renderInfoMain || renderInfoContent\n ? {\n renderInfo: {\n main: renderInfoMain,\n content: renderInfoContent,\n },\n }\n : undefined;\n\n // @ts-ignore\n return this.locusDeltaRequest({\n method: HTTP_VERBS.PUT,\n uri: `${locusUrl}/${CONTROLS}`,\n body: {\n layout: {\n deviceUrl,\n type: layoutType,\n layoutParams,\n },\n },\n });\n }\n\n /**\n * Make a network request to end meeting for all\n * @param {Object} options\n * @param {Url} options.locusUrl\n * @returns {Promise}\n */\n endMeetingForAll({locusUrl}: {locusUrl: string}) {\n const uri = `${locusUrl}/${END}`;\n\n // @ts-ignore\n return this.locusDeltaRequest({\n method: HTTP_VERBS.POST,\n uri,\n });\n }\n\n /**\n * Send a locus keepAlive (used in lobby)\n * @param {Object} options\n * @param {Url} options.keepAliveUrl\n * @returns {Promise}\n */\n keepAlive({keepAliveUrl}: {keepAliveUrl: string}) {\n // @ts-ignore\n return this.request({\n method: HTTP_VERBS.GET,\n uri: keepAliveUrl,\n });\n }\n\n /**\n * Make a network request to send a reaction.\n * @param {Object} options\n * @param {Url} options.reactionChannelUrl\n * @param {Reaction} options.reaction\n * @param {string} options.senderID\n * @returns {Promise}\n */\n sendReaction({reactionChannelUrl, reaction, participantId}: SendReactionOptions) {\n const uri = reactionChannelUrl;\n\n // @ts-ignore\n return this.request({\n method: HTTP_VERBS.POST,\n uri,\n body: {\n sender: {participantId},\n reaction,\n },\n });\n }\n\n /**\n * Make a network request to enable or disable reactions.\n * @param {boolean} options.enable - determines if we need to enable or disable.\n * @param {locusUrl} options.locusUrl\n * @returns {Promise}\n */\n toggleReactions({enable, locusUrl, requestingParticipantId}: ToggleReactionsOptions) {\n const uri = `${locusUrl}/${CONTROLS}`;\n\n // @ts-ignore\n return this.locusDeltaRequest({\n method: HTTP_VERBS.PUT,\n uri,\n body: {\n reactions: {\n enabled: enable,\n },\n requestingParticipantId,\n },\n });\n }\n\n getLocusStatusByUrl(locusUrl: string) {\n // @ts-ignore\n return this.request({\n method: HTTP_VERBS.GET,\n uri: locusUrl,\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAGA;AAEA;AAEA;AACA;AAqBA;AAAiC;AAAA;AAAA;AAAA;AAAA;AAGjC;AACA;AACA;AAFA,IAGq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AuB,EAAvBA;QACF;MACF,CAAC,CAAC;IACJ;EAAC;IAAA;IAAA,OAED,6BAAoBtH,QAAgB,EAAE;MACpC;MACA,OAAO,IAAI,CAACmD,OAAO,CAAC;QAClBC,MAAM,EAAEC,qBAAU,CAACe,GAAG;QACtBb,GAAG,EAAEvD;MACP,CAAC,CAAC;IACJ;EAAC;EAAA;AAAA,EAnxByCyH,+BAAoB;AAAA"}
|
package/dist/meeting/util.js
CHANGED
|
@@ -505,7 +505,7 @@ var MeetingUtil = {
|
|
|
505
505
|
}
|
|
506
506
|
var locus = response === null || response === void 0 ? void 0 : (_response$body2 = response.body) === null || _response$body2 === void 0 ? void 0 : _response$body2.locus;
|
|
507
507
|
if (locus) {
|
|
508
|
-
meeting.locusInfo.
|
|
508
|
+
meeting.locusInfo.handleLocusDelta(locus, meeting);
|
|
509
509
|
}
|
|
510
510
|
return response;
|
|
511
511
|
},
|