@azure/communication-react 1.19.0-alpha-202408030014 → 1.19.0-alpha-202408080015

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/dist/communication-react.d.ts +21 -0
  2. package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-BBTJIosO.js → ChatMessageComponentAsRichTextEditBox-Cp4U9Zwl.js} +2 -2
  3. package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-BBTJIosO.js.map → ChatMessageComponentAsRichTextEditBox-Cp4U9Zwl.js.map} +1 -1
  4. package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-C1Ev6MKx.js → RichTextSendBoxWrapper-CSccLHCZ.js} +2 -2
  5. package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-C1Ev6MKx.js.map → RichTextSendBoxWrapper-CSccLHCZ.js.map} +1 -1
  6. package/dist/dist-cjs/communication-react/{index-B74o7NiP.js → index-C66O_9xV.js} +165 -113
  7. package/dist/dist-cjs/communication-react/index-C66O_9xV.js.map +1 -0
  8. package/dist/dist-cjs/communication-react/index.js +1 -1
  9. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  10. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  11. package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +15 -0
  12. package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
  13. package/dist/dist-esm/calling-stateful-client/src/UserFacingDiagnosticsSubscriber.d.ts +1 -0
  14. package/dist/dist-esm/calling-stateful-client/src/UserFacingDiagnosticsSubscriber.js +29 -0
  15. package/dist/dist-esm/calling-stateful-client/src/UserFacingDiagnosticsSubscriber.js.map +1 -1
  16. package/dist/dist-esm/calling-stateful-client/src/index-public.d.ts +1 -0
  17. package/dist/dist-esm/calling-stateful-client/src/index-public.js.map +1 -1
  18. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.d.ts +2 -5
  19. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.js +48 -31
  20. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.js.map +1 -1
  21. package/dist/dist-esm/react-components/src/components/utils/RichTextEditorUtils.d.ts +1 -0
  22. package/dist/dist-esm/react-components/src/components/utils/RichTextEditorUtils.js +1 -0
  23. package/dist/dist-esm/react-components/src/components/utils/RichTextEditorUtils.js.map +1 -1
  24. package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js +7 -3
  25. package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js.map +1 -1
  26. package/dist/dist-esm/react-components/src/localization/locales/ar-SA/strings.json +6 -2
  27. package/dist/dist-esm/react-components/src/localization/locales/cs-CZ/strings.json +6 -2
  28. package/dist/dist-esm/react-components/src/localization/locales/de-DE/strings.json +6 -2
  29. package/dist/dist-esm/react-components/src/localization/locales/en-GB/strings.json +6 -2
  30. package/dist/dist-esm/react-components/src/localization/locales/es-ES/strings.json +6 -2
  31. package/dist/dist-esm/react-components/src/localization/locales/fi-FI/strings.json +6 -2
  32. package/dist/dist-esm/react-components/src/localization/locales/fr-FR/strings.json +6 -2
  33. package/dist/dist-esm/react-components/src/localization/locales/he-IL/strings.json +6 -2
  34. package/dist/dist-esm/react-components/src/localization/locales/it-IT/strings.json +6 -2
  35. package/dist/dist-esm/react-components/src/localization/locales/ja-JP/strings.json +6 -2
  36. package/dist/dist-esm/react-components/src/localization/locales/ko-KR/strings.json +6 -2
  37. package/dist/dist-esm/react-components/src/localization/locales/nb-NO/strings.json +6 -2
  38. package/dist/dist-esm/react-components/src/localization/locales/nl-NL/strings.json +6 -2
  39. package/dist/dist-esm/react-components/src/localization/locales/pl-PL/strings.json +6 -2
  40. package/dist/dist-esm/react-components/src/localization/locales/pt-BR/strings.json +6 -2
  41. package/dist/dist-esm/react-components/src/localization/locales/ru-RU/strings.json +6 -2
  42. package/dist/dist-esm/react-components/src/localization/locales/sv-SE/strings.json +6 -2
  43. package/dist/dist-esm/react-components/src/localization/locales/tr-TR/strings.json +6 -2
  44. package/dist/dist-esm/react-components/src/localization/locales/zh-CN/strings.json +6 -2
  45. package/dist/dist-esm/react-components/src/localization/locales/zh-TW/strings.json +6 -2
  46. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadUtils.js +4 -2
  47. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ImageUpload/ImageUploadUtils.js.map +1 -1
  48. package/package.json +1 -1
  49. package/dist/dist-cjs/communication-react/index-B74o7NiP.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"RichTextEditorUtils.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/utils/RichTextEditorUtils.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC;;;GAGG;AACH,MAAM,CAAN,IAAY,eAUX;AAVD,WAAY,eAAe;IACzB,8CAA2B,CAAA;IAC3B,kDAA+B,CAAA;IAC/B,oDAAiC,CAAA;IACjC,wDAAqC,CAAA;IACrC,kCAAe,CAAA;IACf,sCAAmB,CAAA;IACnB,8CAA2B,CAAA;IAC3B,8CAA2B,CAAA;IAC3B,sCAAmB,CAAA;AACrB,CAAC,EAVW,eAAe,KAAf,eAAe,QAU1B;AAED;;;GAGG;AACH,MAAM,CAAN,IAAY,yBAEX;AAFD,WAAY,yBAAyB;IACnC,4CAAe,CAAA;AACjB,CAAC,EAFW,yBAAyB,KAAzB,yBAAyB,QAEpC;AAED;;;;;GAKG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,MAAoB,EAAE,OAAoB,EAAE,OAA0B,EAAQ,EAAE;IAC5G,IAAI,OAAO,YAAY,oBAAoB,EAAE,CAAC;QAC5C,kCAAkC;QAClC,wCAAwC;QACxC,iCAAiC;IACnC,CAAC;SAAM,IAAI,OAAO,CAAC,qBAAqB,CAAC,MAAM,EAAE,CAAC;QA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AU,CAAC,WAAW,CAAC,CAAC;IAC9B,yCAAyC;IACzC,8HAA8H;IAC9H,WAAW,CAAC,cAAc,CAAC;QACzB,KAAK,EAAE,QAAQ;KAChB,CAAC,CAAC;IACH,WAAW,CAAC,MAAM,EAAE,CAAC;AACvB,CAAC,CAAC;AAEF,gEAAgE;AAChE;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAC9B,mBAA2C,EAC3C,mBAA6C,EACvC,EAAE;IACR,mBAAmB,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;QACpC,qBAAqB,CAAC,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC;IACvD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,gEAAgE;AAChE;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,mBAA2C,EAAQ,EAAE;IACtF,MAAM,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QACnD,qBAAqB,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAC;IACtD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,gEAAgE;AAChE,MAAM,qBAAqB,GAAG,CAAC,mBAA2C,EAAE,OAAe,EAAQ,EAAE;IACnG,MAAM,OAAO,GAAG,mBAAmB,CAAC,OAAO,CAAC,CAAC;IAC7C,IAAI,OAAO,EAAE,CAAC;QACZ,GAAG,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;QAC7B,OAAO,mBAAmB,CAAC,OAAO,CAAC,CAAC;IACtC,CAAC;AACH,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { BorderFormat, DatasetFormat, ModelToDomContext } from 'roosterjs-content-model-types';\n\n/**\n * Plugin event type for RoosterJS plugins\n * @private\n */\nexport enum PluginEventType {\n EditorReady = 'editorReady',\n BeforeDispose = 'beforeDispose',\n ContentChanged = 'contentChanged',\n BeforeSetContent = 'beforeSetContent',\n Input = 'input',\n KeyDown = 'keyDown',\n BeforePaste = 'beforePaste',\n ZoomChanged = 'zoomChanged',\n MouseUp = 'mouseUp'\n}\n\n/**\n * ContentChanged event source for RoosterJS\n * @private\n */\nexport enum ContentChangedEventSource {\n Paste = 'Paste'\n}\n\n/**\n * Applies the border format to the specified element.\n * If the element is an HTMLTableCellElement, it skips setting editing info\n * and to use classes instead of inline styles.\n * For all other cases, the default format applier is used.\n */\nexport const borderApplier = (format: BorderFormat, element: HTMLElement, context: ModelToDomContext): void => {\n if (element instanceof HTMLTableCellElement) {\n // don't set format for table cell\n // as it will set inline styles for them\n // we want to use classes instead\n } else if (context.defaultFormatAppliers.border) {\n // apply default formats for all other cases\n context.defaultFormatAppliers.border(format, element, context);\n }\n};\n\n/**\n * Applies the dataset format to the given HTML element.\n * If the element is an HTMLTableElement, it skips setting editing info\n * and to use classes instead of inline styles.\n * For all other cases, it applies the default formats.\n */\nexport const dataSetApplier = (format: DatasetFormat, element: HTMLElement, context: ModelToDomContext): void => {\n if (element instanceof HTMLTableElement) {\n // don't set editing info for tables\n // as it will set inline styles for them\n // we want to use classes instead\n } else if (context.defaultFormatAppliers.dataset) {\n // apply default formats for all other cases\n context.defaultFormatAppliers.dataset(format, element, context);\n }\n};\n\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\n/**\n * @internal\n */\nexport const getPreviousInlineImages = (content?: string): Record<string, string>[] => {\n if (!content) {\n return [];\n }\n const previousInlineImages: Record<string, string>[] = [];\n const document = new DOMParser().parseFromString(content ?? '', 'text/html');\n document.querySelectorAll('img').forEach((img) => {\n const imageAttributes = getInlineImageAttributes(img);\n previousInlineImages.push(imageAttributes);\n });\n return previousInlineImages;\n};\n\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\n/**\n * @internal\n */\nexport const getRemovedInlineImages = (\n content: string,\n previousInlineImages: Record<string, string>[]\n): Record<string, string>[] => {\n const document = new DOMParser().parseFromString(content ?? '', 'text/html');\n const currentContentIds = Array.from(document.querySelectorAll('img')).map((img) => img.id);\n previousInlineImages = previousInlineImages?.filter((img) => !currentContentIds?.includes(img.id));\n\n const removedInlineImages = [...previousInlineImages];\n return removedInlineImages;\n};\n\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\n/**\n * @internal\n */\nexport const getInsertedInlineImages = (\n content: string,\n previousInlineImages: NodeListOf<HTMLImageElement>\n): HTMLImageElement[] => {\n const document = new DOMParser().parseFromString(content ?? '', 'text/html');\n const currentContentInlineImages = Array.from(document.querySelectorAll('img'));\n const previousContentIds = Array.from(previousInlineImages).map((img) => img.id);\n // if check is updated, also update getRemovedInlineImages\n const insertedInlineImages = currentContentInlineImages.filter((img) => !previousContentIds.includes(img.id));\n return insertedInlineImages;\n};\n\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\n/**\n * @internal\n */\nexport const getInlineImageAttributes = (image: HTMLImageElement): Record<string, string> => {\n const imageAttributes: Record<string, string> = {};\n image.getAttributeNames().forEach((attrName) => {\n const attrValue = image.getAttribute(attrName);\n if (attrValue) {\n imageAttributes[attrName] = attrValue;\n }\n });\n return imageAttributes;\n};\n\n/* @conditional-compile-remove(rich-text-editor) */\n/**\n * @internal\n */\n/**\n * Update the scroll position of the editor to ensure the content is visible.\n */\nexport const scrollToBottomRichTextEditor = (): void => {\n // Get the current selection in the document\n const selection = document.getSelection();\n\n // Check if a selection exists and it has at least one range\n if (!selection || selection.rangeCount <= 0) {\n // If no selection or range, exit the function\n return;\n }\n\n // Get the first range of the selection\n // A user can normally only select one range at a time, so the rangeCount will usually be 1\n const range = selection.getRangeAt(0);\n\n // If the common ancestor container of the range is the document itself,\n // it might mean that the editable element is getting removed from the DOM\n // In such cases, especially in Safari, trying to modify the range might throw a HierarchyRequest error\n if (range.commonAncestorContainer === document) {\n return;\n }\n\n // Create a temporary span element to use as an anchor for scrolling\n // We can't use the anchor node directly because if it's a Text node, calling scrollIntoView() on it will throw an error\n const tempElement = document.createElement('span');\n // Collapse the range to its end point\n // This means the start and end points of the range will be the same, and it will not contain any content\n range.collapse(false);\n // Insert the temporary element at the cursor's position at the end of the range\n range.insertNode(tempElement);\n // Scroll the temporary element into view\n // the element will be aligned at the center of the scroll container, otherwise, text and images may be positioned incorrectly\n tempElement.scrollIntoView({\n block: 'center'\n });\n tempElement.remove();\n};\n\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\n/**\n * Revoke the blob urls in the removedInlineImages and remove them from the currentLocalBlobMap\n * @internal\n */\nexport const removeLocalBlobs = (\n currentLocalBlobMap: Record<string, string>,\n removedInlineImages: Record<string, string>[]\n): void => {\n removedInlineImages.forEach((image) => {\n removeSingleLocalBlob(currentLocalBlobMap, image.id);\n });\n};\n\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\n/**\n * Revoke all the blob urls in the currentLocalBlobMap and clean up the currentLocalBlobMap\n * @internal\n */\nexport const cleanAllLocalBlobs = (currentLocalBlobMap: Record<string, string>): void => {\n Object.keys(currentLocalBlobMap).forEach((imageId) => {\n removeSingleLocalBlob(currentLocalBlobMap, imageId);\n });\n};\n\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nconst removeSingleLocalBlob = (currentLocalBlobMap: Record<string, string>, imageId: string): void => {\n const blobUrl = currentLocalBlobMap[imageId];\n if (blobUrl) {\n URL.revokeObjectURL(blobUrl);\n delete currentLocalBlobMap[imageId];\n }\n};\n"]}
1
+ {"version":3,"file":"RichTextEditorUtils.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/utils/RichTextEditorUtils.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC;;;GAGG;AACH,MAAM,CAAN,IAAY,eAWX;AAXD,WAAY,eAAe;IACzB,8CAA2B,CAAA;IAC3B,kDAA+B,CAAA;IAC/B,oDAAiC,CAAA;IACjC,wDAAqC,CAAA;IACrC,kCAAe,CAAA;IACf,sCAAmB,CAAA;IACnB,kDAA+B,CAAA;IAC/B,8CAA2B,CAAA;I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,MAAM,qBAAqB,GAAG,CAAC,mBAA2C,EAAE,OAAe,EAAQ,EAAE;IACnG,MAAM,OAAO,GAAG,mBAAmB,CAAC,OAAO,CAAC,CAAC;IAC7C,IAAI,OAAO,EAAE,CAAC;QACZ,GAAG,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;QAC7B,OAAO,mBAAmB,CAAC,OAAO,CAAC,CAAC;IACtC,CAAC;AACH,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { BorderFormat, DatasetFormat, ModelToDomContext } from 'roosterjs-content-model-types';\n\n/**\n * Plugin event type for RoosterJS plugins\n * @private\n */\nexport enum PluginEventType {\n EditorReady = 'editorReady',\n BeforeDispose = 'beforeDispose',\n ContentChanged = 'contentChanged',\n BeforeSetContent = 'beforeSetContent',\n Input = 'input',\n KeyDown = 'keyDown',\n BeforeCutCopy = 'beforeCutCopy',\n BeforePaste = 'beforePaste',\n ZoomChanged = 'zoomChanged',\n MouseUp = 'mouseUp'\n}\n\n/**\n * ContentChanged event source for RoosterJS\n * @private\n */\nexport enum ContentChangedEventSource {\n Paste = 'Paste'\n}\n\n/**\n * Applies the border format to the specified element.\n * If the element is an HTMLTableCellElement, it skips setting editing info\n * and to use classes instead of inline styles.\n * For all other cases, the default format applier is used.\n */\nexport const borderApplier = (format: BorderFormat, element: HTMLElement, context: ModelToDomContext): void => {\n if (element instanceof HTMLTableCellElement) {\n // don't set format for table cell\n // as it will set inline styles for them\n // we want to use classes instead\n } else if (context.defaultFormatAppliers.border) {\n // apply default formats for all other cases\n context.defaultFormatAppliers.border(format, element, context);\n }\n};\n\n/**\n * Applies the dataset format to the given HTML element.\n * If the element is an HTMLTableElement, it skips setting editing info\n * and to use classes instead of inline styles.\n * For all other cases, it applies the default formats.\n */\nexport const dataSetApplier = (format: DatasetFormat, element: HTMLElement, context: ModelToDomContext): void => {\n if (element instanceof HTMLTableElement) {\n // don't set editing info for tables\n // as it will set inline styles for them\n // we want to use classes instead\n } else if (context.defaultFormatAppliers.dataset) {\n // apply default formats for all other cases\n context.defaultFormatAppliers.dataset(format, element, context);\n }\n};\n\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\n/**\n * @internal\n */\nexport const getPreviousInlineImages = (content?: string): Record<string, string>[] => {\n if (!content) {\n return [];\n }\n const previousInlineImages: Record<string, string>[] = [];\n const document = new DOMParser().parseFromString(content ?? '', 'text/html');\n document.querySelectorAll('img').forEach((img) => {\n const imageAttributes = getInlineImageAttributes(img);\n previousInlineImages.push(imageAttributes);\n });\n return previousInlineImages;\n};\n\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\n/**\n * @internal\n */\nexport const getRemovedInlineImages = (\n content: string,\n previousInlineImages: Record<string, string>[]\n): Record<string, string>[] => {\n const document = new DOMParser().parseFromString(content ?? '', 'text/html');\n const currentContentIds = Array.from(document.querySelectorAll('img')).map((img) => img.id);\n previousInlineImages = previousInlineImages?.filter((img) => !currentContentIds?.includes(img.id));\n\n const removedInlineImages = [...previousInlineImages];\n return removedInlineImages;\n};\n\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\n/**\n * @internal\n */\nexport const getInsertedInlineImages = (\n content: string,\n previousInlineImages: NodeListOf<HTMLImageElement>\n): HTMLImageElement[] => {\n const document = new DOMParser().parseFromString(content ?? '', 'text/html');\n const currentContentInlineImages = Array.from(document.querySelectorAll('img'));\n const previousContentIds = Array.from(previousInlineImages).map((img) => img.id);\n // if check is updated, also update getRemovedInlineImages\n const insertedInlineImages = currentContentInlineImages.filter((img) => !previousContentIds.includes(img.id));\n return insertedInlineImages;\n};\n\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\n/**\n * @internal\n */\nexport const getInlineImageAttributes = (image: HTMLImageElement): Record<string, string> => {\n const imageAttributes: Record<string, string> = {};\n image.getAttributeNames().forEach((attrName) => {\n const attrValue = image.getAttribute(attrName);\n if (attrValue) {\n imageAttributes[attrName] = attrValue;\n }\n });\n return imageAttributes;\n};\n\n/* @conditional-compile-remove(rich-text-editor) */\n/**\n * @internal\n */\n/**\n * Update the scroll position of the editor to ensure the content is visible.\n */\nexport const scrollToBottomRichTextEditor = (): void => {\n // Get the current selection in the document\n const selection = document.getSelection();\n\n // Check if a selection exists and it has at least one range\n if (!selection || selection.rangeCount <= 0) {\n // If no selection or range, exit the function\n return;\n }\n\n // Get the first range of the selection\n // A user can normally only select one range at a time, so the rangeCount will usually be 1\n const range = selection.getRangeAt(0);\n\n // If the common ancestor container of the range is the document itself,\n // it might mean that the editable element is getting removed from the DOM\n // In such cases, especially in Safari, trying to modify the range might throw a HierarchyRequest error\n if (range.commonAncestorContainer === document) {\n return;\n }\n\n // Create a temporary span element to use as an anchor for scrolling\n // We can't use the anchor node directly because if it's a Text node, calling scrollIntoView() on it will throw an error\n const tempElement = document.createElement('span');\n // Collapse the range to its end point\n // This means the start and end points of the range will be the same, and it will not contain any content\n range.collapse(false);\n // Insert the temporary element at the cursor's position at the end of the range\n range.insertNode(tempElement);\n // Scroll the temporary element into view\n // the element will be aligned at the center of the scroll container, otherwise, text and images may be positioned incorrectly\n tempElement.scrollIntoView({\n block: 'center'\n });\n tempElement.remove();\n};\n\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\n/**\n * Revoke the blob urls in the removedInlineImages and remove them from the currentLocalBlobMap\n * @internal\n */\nexport const removeLocalBlobs = (\n currentLocalBlobMap: Record<string, string>,\n removedInlineImages: Record<string, string>[]\n): void => {\n removedInlineImages.forEach((image) => {\n removeSingleLocalBlob(currentLocalBlobMap, image.id);\n });\n};\n\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\n/**\n * Revoke all the blob urls in the currentLocalBlobMap and clean up the currentLocalBlobMap\n * @internal\n */\nexport const cleanAllLocalBlobs = (currentLocalBlobMap: Record<string, string>): void => {\n Object.keys(currentLocalBlobMap).forEach((imageId) => {\n removeSingleLocalBlob(currentLocalBlobMap, imageId);\n });\n};\n\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nconst removeSingleLocalBlob = (currentLocalBlobMap: Record<string, string>, imageId: string): void => {\n const blobUrl = currentLocalBlobMap[imageId];\n if (blobUrl) {\n URL.revokeObjectURL(blobUrl);\n delete currentLocalBlobMap[imageId];\n }\n};\n"]}
@@ -77,8 +77,7 @@ export const updateStylesOfInlineImages = (message, initialInlineImages) => __aw
77
77
  resolve();
78
78
  };
79
79
  imageElement.onerror = () => {
80
- console.log('Error loading image', img.src);
81
- rejects();
80
+ rejects(`Error loading image ${img.id}`);
82
81
  };
83
82
  });
84
83
  });
@@ -145,7 +144,12 @@ export const toAttachmentMetadata = (attachmentsWithProgress) => {
145
144
  export const modifyInlineImagesInContentString = (content, initialInlineImages, onCompleted) => __awaiter(void 0, void 0, void 0, function* () {
146
145
  let newContent = content;
147
146
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
148
- newContent = yield updateStylesOfInlineImages(content, initialInlineImages);
147
+ try {
148
+ newContent = yield updateStylesOfInlineImages(content, initialInlineImages);
149
+ }
150
+ catch (error) {
151
+ console.error('Error updating inline images: ', error);
152
+ }
149
153
  onCompleted === null || onCompleted === void 0 ? void 0 : onCompleted(newContent);
150
154
  });
151
155
  /* @conditional-compile-remove(rich-text-editor-image-upload) */
@@ -1 +1 @@
1
- {"version":3,"file":"SendBoxUtils.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/utils/SendBoxUtils.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAOlC;;GAEG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,IAAI,CAAC;AAC9C,MAAM,mBAAmB,GAAG,OAAO,CAAC;AAEpC,mDAAmD;AACnD;;GAEG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAC5C,uBAAmE,EAC1D,EAAE;IACX,OAAO,CAAC,CAAC,CACP,CAAA,uBAAuB,aAAvB,uBAAuB,uBAAvB,uBAAuB,CAAE,MAAM;QAC/B,CAAC,uBAAuB;aACrB,MAAM,CAAC,C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gEAAgE;AAChE;;GAEG;AACH,MAAM,CAAC,MAAM,qCAAqC,GAAG,CACnD,OAAe,EACf,uBAAuD,EAC/C,EAAE;IACV,IAAI,CAAC,uBAAuB,IAAI,uBAAuB,CAAC,MAAM,IAAI,CAAC,EAAE,CAAC;QACpE,OAAO,OAAO,CAAC;IACjB,CAAC;IACD,MAAM,QAAQ,GAAG,IAAI,SAAS,EAAE,CAAC,eAAe,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;IACvE,QAAQ,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;QAC/C,MAAM,OAAO,GAAG,GAAG,CAAC,EAAE,CAAC;QACvB,MAAM,WAAW,GAAG,uBAAuB,CAAC,IAAI,CAC9C,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC,QAAQ,KAAK,CAAC,IAAI,KAAK,CAAC,EAAE,KAAK,OAAO,CACxE,CAAC;QACF,IAAI,WAAW,EAAE,CAAC;YAChB,GAAG,CAAC,EAAE,GAAG,WAAW,CAAC,EAAE,CAAC;YACxB,GAAG,CAAC,GAAG,GAAG,WAAW,CAAC,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC;QACvC,CAAC;IACH,CAAC,CAAC,CAAC;IACH,OAAO,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC;AACjC,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { AttachmentMetadataInProgress } from '@internal/acs-ui-common';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { AttachmentMetadata } from '@internal/acs-ui-common';\n\n/**\n * @private\n */\nexport const MAXIMUM_LENGTH_OF_MESSAGE = 8000;\nconst EMPTY_MESSAGE_REGEX = /^\\s*$/;\n\n/* @conditional-compile-remove(file-sharing-acs) */\n/**\n * @private\n */\nexport const hasIncompleteAttachmentUploads = (\n attachmentsWithProgress: AttachmentMetadataInProgress[] | undefined\n): boolean => {\n return !!(\n attachmentsWithProgress?.length &&\n !attachmentsWithProgress\n .filter((attachmentUpload) => !attachmentUpload.error)\n .every((attachmentUpload) => attachmentUpload.progress === 1 && attachmentUpload.progress !== undefined)\n );\n};\n\n/* @conditional-compile-remove(file-sharing-acs) */\n/**\n * @private\n */\nexport const isAttachmentUploadCompleted = (\n attachmentsWithProgress: AttachmentMetadataInProgress[] | undefined\n): boolean => {\n return !!attachmentsWithProgress?.find((attachment) => !attachment.error);\n};\n\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\n/**\n * Check if the content has inline image.\n * @internal\n */\nexport const hasInlineImageContent = (content: string): boolean => {\n const document = new DOMParser().parseFromString(content, 'text/html');\n return !!document.querySelector('img');\n};\n\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\n/**\n * @internal\n *\n * @param message - The message content to update.\n * @param initialInlineImages - The initial inline images that comes with the message before editing.\n *\n * @returns The updated message content.\n */\nexport const updateStylesOfInlineImages = async (\n message: string,\n initialInlineImages: Record<string, string>[]\n): Promise<string> => {\n if (message === '') {\n return message;\n }\n const initialInlineImagesIds = initialInlineImages.map((initialInlineImage) => initialInlineImage.id);\n const document = new DOMParser().parseFromString(message ?? '', 'text/html');\n const imagesPromise = Array.from(document.querySelectorAll('img')).map((img) => {\n return new Promise<void>((resolve, rejects) => {\n // The message might content images that comes with the message before editing.\n // This function should only modify the message content for images that are newly added.\n if (initialInlineImagesIds.includes(img.id)) {\n resolve();\n return;\n }\n const imageElement = new Image();\n imageElement.src = img.src;\n imageElement.onload = () => {\n // imageElement is a copy of original img element, so changes need to be made to the original img element\n img.width = imageElement.width;\n img.height = imageElement.height;\n img.style.aspectRatio = `${imageElement.width} / ${imageElement.height}`;\n // Clear maxWidth and maxHeight styles that are set by roosterJS.\n // This is so that they can be set in messageThread styles without using the important flag.\n img.style.maxWidth = '';\n img.style.maxHeight = '';\n resolve();\n };\n imageElement.onerror = () => {\n console.log('Error loading image', img.src);\n rejects();\n };\n });\n });\n await Promise.all(imagesPromise);\n const newMessage = document.body.innerHTML;\n return newMessage;\n};\n\n/**\n * @private\n */\nexport const isMessageTooLong = (valueLength: number): boolean => {\n return valueLength > MAXIMUM_LENGTH_OF_MESSAGE;\n};\n\n/**\n * @private\n */\nexport const sanitizeText = (message: string): string => {\n if (EMPTY_MESSAGE_REGEX.test(message)) {\n return '';\n } else {\n return message;\n }\n};\n\n/**\n * Determines whether the send box should be disabled for ARIA accessibility.\n *\n * @param hasContent - Indicates whether the send box has content.\n * @param hasCompletedAttachmentUploads - Indicates whether attachment uploads have completed.\n * @param hasError - Indicates whether there is an error.\n * @param disabled - Indicates whether the send box is disabled.\n * @returns A boolean value indicating whether the send box should be disabled for ARIA accessibility.\n */\nexport const isSendBoxButtonAriaDisabled = ({\n hasContent,\n /* @conditional-compile-remove(file-sharing-acs) */\n hasCompletedAttachmentUploads,\n hasError,\n disabled\n}: {\n hasContent: boolean;\n /* @conditional-compile-remove(file-sharing-acs) */\n hasCompletedAttachmentUploads: boolean;\n hasError: boolean;\n disabled: boolean;\n}): boolean => {\n return (\n // no content\n !(hasContent || /* @conditional-compile-remove(file-sharing-acs) */ hasCompletedAttachmentUploads) ||\n //error message exists\n hasError ||\n disabled\n );\n};\n\n/* @conditional-compile-remove(file-sharing-acs) */\n/**\n * @internal\n */\nexport const toAttachmentMetadata = (\n attachmentsWithProgress: AttachmentMetadataInProgress[] | undefined\n): AttachmentMetadata[] | undefined => {\n return attachmentsWithProgress\n ?.filter((attachment) => {\n return !('error' in attachment) && !attachment.error?.message;\n })\n .map((attachment) => {\n return {\n id: attachment.id,\n name: attachment.name,\n url: attachment.url ?? ''\n };\n });\n};\n\n/**\n * @internal\n */\nexport const modifyInlineImagesInContentString = async (\n content: string,\n initialInlineImages: Record<string, string>[],\n onCompleted?: (content: string) => void\n): Promise<void> => {\n let newContent = content;\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n newContent = await updateStylesOfInlineImages(content, initialInlineImages);\n onCompleted?.(newContent);\n};\n\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\n/**\n * @internal\n */\nexport const removeBrokenImageContentAndClearImageSizeStyles = (content: string): string => {\n const document = new DOMParser().parseFromString(content, 'text/html');\n document.querySelectorAll('img').forEach((img) => {\n // Before submitting/resend the message, we need to trim the unnecessary attributes such as src,\n // which is set to a local svg of a broken image icon at this point.\n // Once message is submitted/resent, it will be fetched again and might not be a broken image anymore,\n // That's why we need to remove the class and data-ui-id attribute of 'broken-image-wrapper'\n if (img.className === 'broken-image-wrapper') {\n img.removeAttribute('class');\n img.removeAttribute('src');\n img.removeAttribute('data-ui-id');\n }\n // Clear maxWidth and maxHeight styles that are set by roosterJS.\n // Clear width and height styles as the width and height is set in attributes\n // This is so that they can be set in messageThread styles without using the important flag.\n img.style.width = '';\n img.style.height = '';\n img.style.maxWidth = '';\n img.style.maxHeight = '';\n });\n return document.body.innerHTML;\n};\n\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\n/**\n * @internal\n */\nexport const getContentWithUpdatedInlineImagesInfo = (\n content: string,\n inlineImageWithProgress: AttachmentMetadataInProgress[]\n): string => {\n if (!inlineImageWithProgress || inlineImageWithProgress.length <= 0) {\n return content;\n }\n const document = new DOMParser().parseFromString(content, 'text/html');\n document.querySelectorAll('img').forEach((img) => {\n const imageId = img.id;\n const inlineImage = inlineImageWithProgress.find(\n (image) => !image.error && image.progress === 1 && image.id === imageId\n );\n if (inlineImage) {\n img.id = inlineImage.id;\n img.src = inlineImage.url || img.src;\n }\n });\n return document.body.innerHTML;\n};\n"]}
1
+ {"version":3,"file":"SendBoxUtils.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/utils/SendBoxUtils.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAOlC;;GAEG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,IAAI,CAAC;AAC9C,MAAM,mBAAmB,G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["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { AttachmentMetadataInProgress } from '@internal/acs-ui-common';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { AttachmentMetadata } from '@internal/acs-ui-common';\n\n/**\n * @private\n */\nexport const MAXIMUM_LENGTH_OF_MESSAGE = 8000;\nconst EMPTY_MESSAGE_REGEX = /^\\s*$/;\n\n/* @conditional-compile-remove(file-sharing-acs) */\n/**\n * @private\n */\nexport const hasIncompleteAttachmentUploads = (\n attachmentsWithProgress: AttachmentMetadataInProgress[] | undefined\n): boolean => {\n return !!(\n attachmentsWithProgress?.length &&\n !attachmentsWithProgress\n .filter((attachmentUpload) => !attachmentUpload.error)\n .every((attachmentUpload) => attachmentUpload.progress === 1 && attachmentUpload.progress !== undefined)\n );\n};\n\n/* @conditional-compile-remove(file-sharing-acs) */\n/**\n * @private\n */\nexport const isAttachmentUploadCompleted = (\n attachmentsWithProgress: AttachmentMetadataInProgress[] | undefined\n): boolean => {\n return !!attachmentsWithProgress?.find((attachment) => !attachment.error);\n};\n\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\n/**\n * Check if the content has inline image.\n * @internal\n */\nexport const hasInlineImageContent = (content: string): boolean => {\n const document = new DOMParser().parseFromString(content, 'text/html');\n return !!document.querySelector('img');\n};\n\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\n/**\n * @internal\n *\n * @param message - The message content to update.\n * @param initialInlineImages - The initial inline images that comes with the message before editing.\n *\n * @returns The updated message content.\n */\nexport const updateStylesOfInlineImages = async (\n message: string,\n initialInlineImages: Record<string, string>[]\n): Promise<string> => {\n if (message === '') {\n return message;\n }\n const initialInlineImagesIds = initialInlineImages.map((initialInlineImage) => initialInlineImage.id);\n const document = new DOMParser().parseFromString(message ?? '', 'text/html');\n const imagesPromise = Array.from(document.querySelectorAll('img')).map((img) => {\n return new Promise<void>((resolve, rejects) => {\n // The message might content images that comes with the message before editing.\n // This function should only modify the message content for images that are newly added.\n if (initialInlineImagesIds.includes(img.id)) {\n resolve();\n return;\n }\n const imageElement = new Image();\n imageElement.src = img.src;\n imageElement.onload = () => {\n // imageElement is a copy of original img element, so changes need to be made to the original img element\n img.width = imageElement.width;\n img.height = imageElement.height;\n img.style.aspectRatio = `${imageElement.width} / ${imageElement.height}`;\n // Clear maxWidth and maxHeight styles that are set by roosterJS.\n // This is so that they can be set in messageThread styles without using the important flag.\n img.style.maxWidth = '';\n img.style.maxHeight = '';\n resolve();\n };\n imageElement.onerror = () => {\n rejects(`Error loading image ${img.id}`);\n };\n });\n });\n await Promise.all(imagesPromise);\n const newMessage = document.body.innerHTML;\n return newMessage;\n};\n\n/**\n * @private\n */\nexport const isMessageTooLong = (valueLength: number): boolean => {\n return valueLength > MAXIMUM_LENGTH_OF_MESSAGE;\n};\n\n/**\n * @private\n */\nexport const sanitizeText = (message: string): string => {\n if (EMPTY_MESSAGE_REGEX.test(message)) {\n return '';\n } else {\n return message;\n }\n};\n\n/**\n * Determines whether the send box should be disabled for ARIA accessibility.\n *\n * @param hasContent - Indicates whether the send box has content.\n * @param hasCompletedAttachmentUploads - Indicates whether attachment uploads have completed.\n * @param hasError - Indicates whether there is an error.\n * @param disabled - Indicates whether the send box is disabled.\n * @returns A boolean value indicating whether the send box should be disabled for ARIA accessibility.\n */\nexport const isSendBoxButtonAriaDisabled = ({\n hasContent,\n /* @conditional-compile-remove(file-sharing-acs) */\n hasCompletedAttachmentUploads,\n hasError,\n disabled\n}: {\n hasContent: boolean;\n /* @conditional-compile-remove(file-sharing-acs) */\n hasCompletedAttachmentUploads: boolean;\n hasError: boolean;\n disabled: boolean;\n}): boolean => {\n return (\n // no content\n !(hasContent || /* @conditional-compile-remove(file-sharing-acs) */ hasCompletedAttachmentUploads) ||\n //error message exists\n hasError ||\n disabled\n );\n};\n\n/* @conditional-compile-remove(file-sharing-acs) */\n/**\n * @internal\n */\nexport const toAttachmentMetadata = (\n attachmentsWithProgress: AttachmentMetadataInProgress[] | undefined\n): AttachmentMetadata[] | undefined => {\n return attachmentsWithProgress\n ?.filter((attachment) => {\n return !('error' in attachment) && !attachment.error?.message;\n })\n .map((attachment) => {\n return {\n id: attachment.id,\n name: attachment.name,\n url: attachment.url ?? ''\n };\n });\n};\n\n/**\n * @internal\n */\nexport const modifyInlineImagesInContentString = async (\n content: string,\n initialInlineImages: Record<string, string>[],\n onCompleted?: (content: string) => void\n): Promise<void> => {\n let newContent = content;\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n try {\n newContent = await updateStylesOfInlineImages(content, initialInlineImages);\n } catch (error) {\n console.error('Error updating inline images: ', error);\n }\n onCompleted?.(newContent);\n};\n\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\n/**\n * @internal\n */\nexport const removeBrokenImageContentAndClearImageSizeStyles = (content: string): string => {\n const document = new DOMParser().parseFromString(content, 'text/html');\n document.querySelectorAll('img').forEach((img) => {\n // Before submitting/resend the message, we need to trim the unnecessary attributes such as src,\n // which is set to a local svg of a broken image icon at this point.\n // Once message is submitted/resent, it will be fetched again and might not be a broken image anymore,\n // That's why we need to remove the class and data-ui-id attribute of 'broken-image-wrapper'\n if (img.className === 'broken-image-wrapper') {\n img.removeAttribute('class');\n img.removeAttribute('src');\n img.removeAttribute('data-ui-id');\n }\n // Clear maxWidth and maxHeight styles that are set by roosterJS.\n // Clear width and height styles as the width and height is set in attributes\n // This is so that they can be set in messageThread styles without using the important flag.\n img.style.width = '';\n img.style.height = '';\n img.style.maxWidth = '';\n img.style.maxHeight = '';\n });\n return document.body.innerHTML;\n};\n\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\n/**\n * @internal\n */\nexport const getContentWithUpdatedInlineImagesInfo = (\n content: string,\n inlineImageWithProgress: AttachmentMetadataInProgress[]\n): string => {\n if (!inlineImageWithProgress || inlineImageWithProgress.length <= 0) {\n return content;\n }\n const document = new DOMParser().parseFromString(content, 'text/html');\n document.querySelectorAll('img').forEach((img) => {\n const imageId = img.id;\n const inlineImage = inlineImageWithProgress.find(\n (image) => !image.error && image.progress === 1 && image.id === imageId\n );\n if (inlineImage) {\n img.id = inlineImage.id;\n img.src = inlineImage.url || img.src;\n }\n });\n return document.body.innerHTML;\n};\n"]}
@@ -457,6 +457,7 @@
457
457
  "videoGallery": {
458
458
  "screenIsBeingSharedMessage": "أنت تشارك شاشتك",
459
459
  "screenShareLoadingMessage": "يتم الآن تحميل شاشة {participant}",
460
+ "localScreenShareLoadingMessage": "تحميل الشاشة",
460
461
  "localVideoLabel": "أنت",
461
462
  "localVideoCameraSwitcherLabel": "تبديل الكاميرا",
462
463
  "localVideoMovementLabel": "لوحة فيديو محلية قابلة للنقل",
@@ -626,9 +627,12 @@
626
627
  },
627
628
  "IncomingCallNotification": {
628
629
  "incomingCallNotificationPlaceholderId": "مستخدم غير معروف",
629
- "incomingCallNotificationPlaceholderAlert": "مكالمة واردة",
630
+ "incomingCallNotificationPlaceholderAlert": "{callerName} يتصل",
630
631
  "incomingCallNoticicationAcceptWithAudioAriaLabel": "قبول مع الصوت",
631
632
  "incomingCallNoticicationAcceptWithVideoAriaLabel": "قبول مع الفيديو",
632
- "incomingCallNoticicationRejectAriaLabel": "رفض"
633
+ "incomingCallNoticicationRejectAriaLabel": "رفض",
634
+ "incomingCallNotificationAcceptButtonLabel": "قبول",
635
+ "incomingCallNotificationRejectButtonLabel": "رفض",
636
+ "incomingCallNotificationAccceptWithVideoButtonLabel": "قبول مع الفيديو"
633
637
  }
634
638
  }
@@ -457,6 +457,7 @@
457
457
  "videoGallery": {
458
458
  "screenIsBeingSharedMessage": "Sdílíte obrazovku",
459
459
  "screenShareLoadingMessage": "Načítání obrazovky {participant}",
460
+ "localScreenShareLoadingMessage": "Načítá se obrazovka",
460
461
  "localVideoLabel": "Vy",
461
462
  "localVideoCameraSwitcherLabel": "Přepnout kameru",
462
463
  "localVideoMovementLabel": "Dlaždice s místním videem s možností přesunutí",
@@ -626,9 +627,12 @@
626
627
  },
627
628
  "IncomingCallNotification": {
628
629
  "incomingCallNotificationPlaceholderId": "Neznámý uživatel",
629
- "incomingCallNotificationPlaceholderAlert": "Příchozí hovor",
630
+ "incomingCallNotificationPlaceholderAlert": "Volá {callerName}",
630
631
  "incomingCallNoticicationAcceptWithAudioAriaLabel": "Přijmout se zvukem",
631
632
  "incomingCallNoticicationAcceptWithVideoAriaLabel": "Přijmout s videem",
632
- "incomingCallNoticicationRejectAriaLabel": "Odmítnout"
633
+ "incomingCallNoticicationRejectAriaLabel": "Odmítnout",
634
+ "incomingCallNotificationAcceptButtonLabel": "Přijmout",
635
+ "incomingCallNotificationRejectButtonLabel": "Odmítnout",
636
+ "incomingCallNotificationAccceptWithVideoButtonLabel": "Přijmout s videem"
633
637
  }
634
638
  }
@@ -457,6 +457,7 @@
457
457
  "videoGallery": {
458
458
  "screenIsBeingSharedMessage": "Sie teilen Ihren Bildschirm",
459
459
  "screenShareLoadingMessage": "Der Bildschirm von {participant} wird geladen",
460
+ "localScreenShareLoadingMessage": "Ihr Bildschirm wird geladen.",
460
461
  "localVideoLabel": "Sie",
461
462
  "localVideoCameraSwitcherLabel": "Kamera wechseln",
462
463
  "localVideoMovementLabel": "Verschiebbare lokale Videokachel",
@@ -626,9 +627,12 @@
626
627
  },
627
628
  "IncomingCallNotification": {
628
629
  "incomingCallNotificationPlaceholderId": "Unbekannter Benutzer",
629
- "incomingCallNotificationPlaceholderAlert": "Eingehender Anruf",
630
+ "incomingCallNotificationPlaceholderAlert": "{callerName} ruft an",
630
631
  "incomingCallNoticicationAcceptWithAudioAriaLabel": "Mit Audio annehmen",
631
632
  "incomingCallNoticicationAcceptWithVideoAriaLabel": "Mit Video annehmen",
632
- "incomingCallNoticicationRejectAriaLabel": "Ablehnen"
633
+ "incomingCallNoticicationRejectAriaLabel": "Ablehnen",
634
+ "incomingCallNotificationAcceptButtonLabel": "Akzeptieren",
635
+ "incomingCallNotificationRejectButtonLabel": "Ablehnen",
636
+ "incomingCallNotificationAccceptWithVideoButtonLabel": "Mit Video annehmen"
633
637
  }
634
638
  }
@@ -457,6 +457,7 @@
457
457
  "videoGallery": {
458
458
  "screenIsBeingSharedMessage": "You are sharing your screen",
459
459
  "screenShareLoadingMessage": "Loading {participant}'s screen",
460
+ "localScreenShareLoadingMessage": "Loading your screen",
460
461
  "localVideoLabel": "You",
461
462
  "localVideoCameraSwitcherLabel": "Switch camera",
462
463
  "localVideoMovementLabel": "Movable Local Video Tile",
@@ -626,9 +627,12 @@
626
627
  },
627
628
  "IncomingCallNotification": {
628
629
  "incomingCallNotificationPlaceholderId": "Unknown User",
629
- "incomingCallNotificationPlaceholderAlert": "Incoming call",
630
+ "incomingCallNotificationPlaceholderAlert": "{callerName} is calling",
630
631
  "incomingCallNoticicationAcceptWithAudioAriaLabel": "Accept with audio",
631
632
  "incomingCallNoticicationAcceptWithVideoAriaLabel": "Accept with video",
632
- "incomingCallNoticicationRejectAriaLabel": "Reject"
633
+ "incomingCallNoticicationRejectAriaLabel": "Reject",
634
+ "incomingCallNotificationAcceptButtonLabel": "Accept",
635
+ "incomingCallNotificationRejectButtonLabel": "Decline",
636
+ "incomingCallNotificationAccceptWithVideoButtonLabel": "Accept with Video"
633
637
  }
634
638
  }
@@ -457,6 +457,7 @@
457
457
  "videoGallery": {
458
458
  "screenIsBeingSharedMessage": "Está compartiendo su pantalla",
459
459
  "screenShareLoadingMessage": "Cargando la pantalla de {participant}",
460
+ "localScreenShareLoadingMessage": "Cargando la pantalla",
460
461
  "localVideoLabel": "Tú",
461
462
  "localVideoCameraSwitcherLabel": "Cambiar de cámara",
462
463
  "localVideoMovementLabel": "Mosaico de vídeo local movible",
@@ -626,9 +627,12 @@
626
627
  },
627
628
  "IncomingCallNotification": {
628
629
  "incomingCallNotificationPlaceholderId": "Usuario desconocido",
629
- "incomingCallNotificationPlaceholderAlert": "Llamada entrante",
630
+ "incomingCallNotificationPlaceholderAlert": "{callerName} está llamando",
630
631
  "incomingCallNoticicationAcceptWithAudioAriaLabel": "Aceptar con audio",
631
632
  "incomingCallNoticicationAcceptWithVideoAriaLabel": "Aceptar con vídeo",
632
- "incomingCallNoticicationRejectAriaLabel": "Rechazar"
633
+ "incomingCallNoticicationRejectAriaLabel": "Rechazar",
634
+ "incomingCallNotificationAcceptButtonLabel": "Aceptar",
635
+ "incomingCallNotificationRejectButtonLabel": "Rechazar",
636
+ "incomingCallNotificationAccceptWithVideoButtonLabel": "Aceptar con vídeo"
633
637
  }
634
638
  }
@@ -457,6 +457,7 @@
457
457
  "videoGallery": {
458
458
  "screenIsBeingSharedMessage": "Näyttösi jaetaan parhaillaan",
459
459
  "screenShareLoadingMessage": "Ladataan käyttäjän {participant} näyttöä",
460
+ "localScreenShareLoadingMessage": "Ladataan näyttöä",
460
461
  "localVideoLabel": "Sinä",
461
462
  "localVideoCameraSwitcherLabel": "Vaihda kameraa",
462
463
  "localVideoMovementLabel": "Siirrettävä paikallisen videon ruutu",
@@ -626,9 +627,12 @@
626
627
  },
627
628
  "IncomingCallNotification": {
628
629
  "incomingCallNotificationPlaceholderId": "Tuntematon käyttäjä",
629
- "incomingCallNotificationPlaceholderAlert": "Saapuva puhelu",
630
+ "incomingCallNotificationPlaceholderAlert": "{callerName} soittaa",
630
631
  "incomingCallNoticicationAcceptWithAudioAriaLabel": "Vastaa äänipuhelulla",
631
632
  "incomingCallNoticicationAcceptWithVideoAriaLabel": "Vastaa videopuhelulla",
632
- "incomingCallNoticicationRejectAriaLabel": "Hylkää"
633
+ "incomingCallNoticicationRejectAriaLabel": "Hylkää",
634
+ "incomingCallNotificationAcceptButtonLabel": "Hyväksy",
635
+ "incomingCallNotificationRejectButtonLabel": "Hylkää",
636
+ "incomingCallNotificationAccceptWithVideoButtonLabel": "Vastaa videopuhelulla"
633
637
  }
634
638
  }
@@ -457,6 +457,7 @@
457
457
  "videoGallery": {
458
458
  "screenIsBeingSharedMessage": "Vous partagez votre écran.",
459
459
  "screenShareLoadingMessage": "Chargement de l’écran de {participant}",
460
+ "localScreenShareLoadingMessage": "Chargement de votre écran",
460
461
  "localVideoLabel": "Vous",
461
462
  "localVideoCameraSwitcherLabel": "Changer de caméra",
462
463
  "localVideoMovementLabel": "Vignette de vidéo locale déplaçable",
@@ -626,9 +627,12 @@
626
627
  },
627
628
  "IncomingCallNotification": {
628
629
  "incomingCallNotificationPlaceholderId": "Utilisateur inconnu",
629
- "incomingCallNotificationPlaceholderAlert": "Appel entrant",
630
+ "incomingCallNotificationPlaceholderAlert": "{callerName} appelle",
630
631
  "incomingCallNoticicationAcceptWithAudioAriaLabel": "Accepter avec l'audio",
631
632
  "incomingCallNoticicationAcceptWithVideoAriaLabel": "Accepter avec la vidéo",
632
- "incomingCallNoticicationRejectAriaLabel": "Rejeter"
633
+ "incomingCallNoticicationRejectAriaLabel": "Rejeter",
634
+ "incomingCallNotificationAcceptButtonLabel": "Accepter",
635
+ "incomingCallNotificationRejectButtonLabel": "Refuser",
636
+ "incomingCallNotificationAccceptWithVideoButtonLabel": "Accepter avec une vidéo"
633
637
  }
634
638
  }
@@ -457,6 +457,7 @@
457
457
  "videoGallery": {
458
458
  "screenIsBeingSharedMessage": "אתה משתף את המסך שלך",
459
459
  "screenShareLoadingMessage": "טוען את המסך של {participant}",
460
+ "localScreenShareLoadingMessage": "טוען את המסך שלך",
460
461
  "localVideoLabel": "אתה",
461
462
  "localVideoCameraSwitcherLabel": "החלף מצלמה",
462
463
  "localVideoMovementLabel": "אריח וידאו מקומי נשלף",
@@ -626,9 +627,12 @@
626
627
  },
627
628
  "IncomingCallNotification": {
628
629
  "incomingCallNotificationPlaceholderId": "משתמש לא ידוע",
629
- "incomingCallNotificationPlaceholderAlert": "שיחה נכנסת",
630
+ "incomingCallNotificationPlaceholderAlert": "{callerName} מתקשר",
630
631
  "incomingCallNoticicationAcceptWithAudioAriaLabel": "קבל עם שמע",
631
632
  "incomingCallNoticicationAcceptWithVideoAriaLabel": "קבל עם וידאו",
632
- "incomingCallNoticicationRejectAriaLabel": "דחה"
633
+ "incomingCallNoticicationRejectAriaLabel": "דחה",
634
+ "incomingCallNotificationAcceptButtonLabel": "קבל",
635
+ "incomingCallNotificationRejectButtonLabel": "דחה",
636
+ "incomingCallNotificationAccceptWithVideoButtonLabel": "קבל עם וידאו"
633
637
  }
634
638
  }
@@ -457,6 +457,7 @@
457
457
  "videoGallery": {
458
458
  "screenIsBeingSharedMessage": "Stai condividendo lo schermo",
459
459
  "screenShareLoadingMessage": "Caricamento dello schermo di {participant}",
460
+ "localScreenShareLoadingMessage": "Caricamento della schermata in corso...",
460
461
  "localVideoLabel": "Tu",
461
462
  "localVideoCameraSwitcherLabel": "Cambia videocamera",
462
463
  "localVideoMovementLabel": "Riquadro video locale mobile",
@@ -626,9 +627,12 @@
626
627
  },
627
628
  "IncomingCallNotification": {
628
629
  "incomingCallNotificationPlaceholderId": "Utente sconosciuto",
629
- "incomingCallNotificationPlaceholderAlert": "Chiamata in arrivo",
630
+ "incomingCallNotificationPlaceholderAlert": "{callerName} sta chiamando",
630
631
  "incomingCallNoticicationAcceptWithAudioAriaLabel": "Accetta con audio",
631
632
  "incomingCallNoticicationAcceptWithVideoAriaLabel": "Accetta con video",
632
- "incomingCallNoticicationRejectAriaLabel": "Rifiuta"
633
+ "incomingCallNoticicationRejectAriaLabel": "Rifiuta",
634
+ "incomingCallNotificationAcceptButtonLabel": "Accetta",
635
+ "incomingCallNotificationRejectButtonLabel": "Rifiuta",
636
+ "incomingCallNotificationAccceptWithVideoButtonLabel": "Accetta con video"
633
637
  }
634
638
  }
@@ -457,6 +457,7 @@
457
457
  "videoGallery": {
458
458
  "screenIsBeingSharedMessage": "画面を共有しています",
459
459
  "screenShareLoadingMessage": "{participant} の画面を読み込んでいます",
460
+ "localScreenShareLoadingMessage": "画面を読み込んでいます",
460
461
  "localVideoLabel": "自分",
461
462
  "localVideoCameraSwitcherLabel": "カメラを切り替え",
462
463
  "localVideoMovementLabel": "移動可能なローカル ビデオ タイル",
@@ -626,9 +627,12 @@
626
627
  },
627
628
  "IncomingCallNotification": {
628
629
  "incomingCallNotificationPlaceholderId": "不明なユーザー",
629
- "incomingCallNotificationPlaceholderAlert": "着信",
630
+ "incomingCallNotificationPlaceholderAlert": "{callerName} が呼び出しています",
630
631
  "incomingCallNoticicationAcceptWithAudioAriaLabel": "オーディオで承諾する",
631
632
  "incomingCallNoticicationAcceptWithVideoAriaLabel": "ビデオで承諾する",
632
- "incomingCallNoticicationRejectAriaLabel": "拒否する"
633
+ "incomingCallNoticicationRejectAriaLabel": "拒否する",
634
+ "incomingCallNotificationAcceptButtonLabel": "承諾",
635
+ "incomingCallNotificationRejectButtonLabel": "拒否",
636
+ "incomingCallNotificationAccceptWithVideoButtonLabel": "ビデオで受ける"
633
637
  }
634
638
  }
@@ -457,6 +457,7 @@
457
457
  "videoGallery": {
458
458
  "screenIsBeingSharedMessage": "화면을 공유 중입니다.",
459
459
  "screenShareLoadingMessage": "{participant} 님의 화면 로드 중",
460
+ "localScreenShareLoadingMessage": "화면 로드 중",
460
461
  "localVideoLabel": "나",
461
462
  "localVideoCameraSwitcherLabel": "카메라 전환",
462
463
  "localVideoMovementLabel": "이동 가능한 로컬 비디오 타일",
@@ -626,9 +627,12 @@
626
627
  },
627
628
  "IncomingCallNotification": {
628
629
  "incomingCallNotificationPlaceholderId": "알 수 없는 사용자",
629
- "incomingCallNotificationPlaceholderAlert": "수신 전화",
630
+ "incomingCallNotificationPlaceholderAlert": "{callerName}이(가) 호출 중입니다.",
630
631
  "incomingCallNoticicationAcceptWithAudioAriaLabel": "오디오 수락",
631
632
  "incomingCallNoticicationAcceptWithVideoAriaLabel": "비디오 수락",
632
- "incomingCallNoticicationRejectAriaLabel": "거부"
633
+ "incomingCallNoticicationRejectAriaLabel": "거부",
634
+ "incomingCallNotificationAcceptButtonLabel": "수락",
635
+ "incomingCallNotificationRejectButtonLabel": "거절",
636
+ "incomingCallNotificationAccceptWithVideoButtonLabel": "영상 수락"
633
637
  }
634
638
  }
@@ -457,6 +457,7 @@
457
457
  "videoGallery": {
458
458
  "screenIsBeingSharedMessage": "Du deler skjermen",
459
459
  "screenShareLoadingMessage": "Laster inn skjermen til {participant}",
460
+ "localScreenShareLoadingMessage": "Laster inn skjermen",
460
461
  "localVideoLabel": "Du",
461
462
  "localVideoCameraSwitcherLabel": "Bytt kamera",
462
463
  "localVideoMovementLabel": "Flyttbar lokal videoflis",
@@ -626,9 +627,12 @@
626
627
  },
627
628
  "IncomingCallNotification": {
628
629
  "incomingCallNotificationPlaceholderId": "Ukjent bruker",
629
- "incomingCallNotificationPlaceholderAlert": "Innkommende anrop",
630
+ "incomingCallNotificationPlaceholderAlert": "{callerName} ringer",
630
631
  "incomingCallNoticicationAcceptWithAudioAriaLabel": "Godta med lyd",
631
632
  "incomingCallNoticicationAcceptWithVideoAriaLabel": "Godta med video",
632
- "incomingCallNoticicationRejectAriaLabel": "Avvis"
633
+ "incomingCallNoticicationRejectAriaLabel": "Avvis",
634
+ "incomingCallNotificationAcceptButtonLabel": "Godta",
635
+ "incomingCallNotificationRejectButtonLabel": "Avslå",
636
+ "incomingCallNotificationAccceptWithVideoButtonLabel": "Svar med video"
633
637
  }
634
638
  }
@@ -457,6 +457,7 @@
457
457
  "videoGallery": {
458
458
  "screenIsBeingSharedMessage": "U deelt uw scherm",
459
459
  "screenShareLoadingMessage": "Scherm van {participant} laden",
460
+ "localScreenShareLoadingMessage": "Uw scherm laden",
460
461
  "localVideoLabel": "U",
461
462
  "localVideoCameraSwitcherLabel": "Camera wisselen",
462
463
  "localVideoMovementLabel": "Tegel voor verwisselbare lokale video",
@@ -626,9 +627,12 @@
626
627
  },
627
628
  "IncomingCallNotification": {
628
629
  "incomingCallNotificationPlaceholderId": "Onbekende gebruiker",
629
- "incomingCallNotificationPlaceholderAlert": "Binnenkomende oproep",
630
+ "incomingCallNotificationPlaceholderAlert": "{callerName} belt",
630
631
  "incomingCallNoticicationAcceptWithAudioAriaLabel": "Accepteren met geluid",
631
632
  "incomingCallNoticicationAcceptWithVideoAriaLabel": "Accepteren met video",
632
- "incomingCallNoticicationRejectAriaLabel": "Weigeren"
633
+ "incomingCallNoticicationRejectAriaLabel": "Weigeren",
634
+ "incomingCallNotificationAcceptButtonLabel": "Accepteren",
635
+ "incomingCallNotificationRejectButtonLabel": "Weigeren",
636
+ "incomingCallNotificationAccceptWithVideoButtonLabel": "Accepteren met video"
633
637
  }
634
638
  }
@@ -457,6 +457,7 @@
457
457
  "videoGallery": {
458
458
  "screenIsBeingSharedMessage": "Udostępniasz ekran",
459
459
  "screenShareLoadingMessage": "Ładowanie ekranu uczestnika {participant}",
460
+ "localScreenShareLoadingMessage": "Ładowanie ekranu",
460
461
  "localVideoLabel": "Ty",
461
462
  "localVideoCameraSwitcherLabel": "Przełącz kamerę",
462
463
  "localVideoMovementLabel": "Ruchomy lokalny kafelek wideo",
@@ -626,9 +627,12 @@
626
627
  },
627
628
  "IncomingCallNotification": {
628
629
  "incomingCallNotificationPlaceholderId": "Nieznany użytkownik",
629
- "incomingCallNotificationPlaceholderAlert": "Przychodzące połączenie głosowe",
630
+ "incomingCallNotificationPlaceholderAlert": "{callerName} dzwoni",
630
631
  "incomingCallNoticicationAcceptWithAudioAriaLabel": "Zaakceptuj z dźwiękiem",
631
632
  "incomingCallNoticicationAcceptWithVideoAriaLabel": "Zaakceptuj z wideo",
632
- "incomingCallNoticicationRejectAriaLabel": "Odrzuć"
633
+ "incomingCallNoticicationRejectAriaLabel": "Odrzuć",
634
+ "incomingCallNotificationAcceptButtonLabel": "Akceptuj",
635
+ "incomingCallNotificationRejectButtonLabel": "Odrzuć",
636
+ "incomingCallNotificationAccceptWithVideoButtonLabel": "Odbierz jako połączenie wideo"
633
637
  }
634
638
  }
@@ -457,6 +457,7 @@
457
457
  "videoGallery": {
458
458
  "screenIsBeingSharedMessage": "Você está compartilhando sua tela",
459
459
  "screenShareLoadingMessage": "Carregando a tela do {participant}",
460
+ "localScreenShareLoadingMessage": "Carregando sua tela",
460
461
  "localVideoLabel": "Você",
461
462
  "localVideoCameraSwitcherLabel": "Alternar câmera",
462
463
  "localVideoMovementLabel": "Bloco de Vídeo Local Removível",
@@ -626,9 +627,12 @@
626
627
  },
627
628
  "IncomingCallNotification": {
628
629
  "incomingCallNotificationPlaceholderId": "Usuário Desconhecido",
629
- "incomingCallNotificationPlaceholderAlert": "Recebendo chamada",
630
+ "incomingCallNotificationPlaceholderAlert": "Chamada de {callerName}",
630
631
  "incomingCallNoticicationAcceptWithAudioAriaLabel": "Aceitar com áudio",
631
632
  "incomingCallNoticicationAcceptWithVideoAriaLabel": "Aceitar com vídeo",
632
- "incomingCallNoticicationRejectAriaLabel": "Rejeitar"
633
+ "incomingCallNoticicationRejectAriaLabel": "Rejeitar",
634
+ "incomingCallNotificationAcceptButtonLabel": "Aceitar",
635
+ "incomingCallNotificationRejectButtonLabel": "Recusar",
636
+ "incomingCallNotificationAccceptWithVideoButtonLabel": "Aceitar com Vídeo"
633
637
  }
634
638
  }
@@ -457,6 +457,7 @@
457
457
  "videoGallery": {
458
458
  "screenIsBeingSharedMessage": "Вы демонстрируете свой экран",
459
459
  "screenShareLoadingMessage": "Загрузка экрана пользователя {participant}",
460
+ "localScreenShareLoadingMessage": "Загрузка экрана",
460
461
  "localVideoLabel": "Вы",
461
462
  "localVideoCameraSwitcherLabel": "Переключить камеру",
462
463
  "localVideoMovementLabel": "Перемещаемая локальная плитка видео",
@@ -626,9 +627,12 @@
626
627
  },
627
628
  "IncomingCallNotification": {
628
629
  "incomingCallNotificationPlaceholderId": "Неизвестный пользователь",
629
- "incomingCallNotificationPlaceholderAlert": "Входящий звонок",
630
+ "incomingCallNotificationPlaceholderAlert": "{callerName} звонит",
630
631
  "incomingCallNoticicationAcceptWithAudioAriaLabel": "Ответить голосом",
631
632
  "incomingCallNoticicationAcceptWithVideoAriaLabel": "Принять видеозвонок",
632
- "incomingCallNoticicationRejectAriaLabel": "Отклонить"
633
+ "incomingCallNoticicationRejectAriaLabel": "Отклонить",
634
+ "incomingCallNotificationAcceptButtonLabel": "Принять",
635
+ "incomingCallNotificationRejectButtonLabel": "Отклонить",
636
+ "incomingCallNotificationAccceptWithVideoButtonLabel": "Ответить с видео"
633
637
  }
634
638
  }
@@ -457,6 +457,7 @@
457
457
  "videoGallery": {
458
458
  "screenIsBeingSharedMessage": "Du delar din skärm",
459
459
  "screenShareLoadingMessage": "Läser in {participant}s skärm",
460
+ "localScreenShareLoadingMessage": "Läser in skärmen",
460
461
  "localVideoLabel": "Du",
461
462
  "localVideoCameraSwitcherLabel": "Växla kamera",
462
463
  "localVideoMovementLabel": "Flyttbar lokal videopanel",
@@ -626,9 +627,12 @@
626
627
  },
627
628
  "IncomingCallNotification": {
628
629
  "incomingCallNotificationPlaceholderId": "Okänd användare",
629
- "incomingCallNotificationPlaceholderAlert": "Inkommande samtal",
630
+ "incomingCallNotificationPlaceholderAlert": "{callerName} ringer",
630
631
  "incomingCallNoticicationAcceptWithAudioAriaLabel": "Acceptera med ljud",
631
632
  "incomingCallNoticicationAcceptWithVideoAriaLabel": "Acceptera med video",
632
- "incomingCallNoticicationRejectAriaLabel": "Avvisa"
633
+ "incomingCallNoticicationRejectAriaLabel": "Avvisa",
634
+ "incomingCallNotificationAcceptButtonLabel": "Acceptera",
635
+ "incomingCallNotificationRejectButtonLabel": "Avböj",
636
+ "incomingCallNotificationAccceptWithVideoButtonLabel": "Acceptera med video"
633
637
  }
634
638
  }
@@ -457,6 +457,7 @@
457
457
  "videoGallery": {
458
458
  "screenIsBeingSharedMessage": "Ekranınızı paylaşıyorsunuz.",
459
459
  "screenShareLoadingMessage": "{participant} adlı katılımcının ekranını yükleme",
460
+ "localScreenShareLoadingMessage": "Ekranınız yükleniyor",
460
461
  "localVideoLabel": "Siz",
461
462
  "localVideoCameraSwitcherLabel": "Kamerayı değiştir",
462
463
  "localVideoMovementLabel": "Taşınabilir Yerel Video Kutucuğu",
@@ -626,9 +627,12 @@
626
627
  },
627
628
  "IncomingCallNotification": {
628
629
  "incomingCallNotificationPlaceholderId": "Bilinmeyen Kullanıcı",
629
- "incomingCallNotificationPlaceholderAlert": "Gelen çağrı",
630
+ "incomingCallNotificationPlaceholderAlert": "{callerName} arıyor",
630
631
  "incomingCallNoticicationAcceptWithAudioAriaLabel": "Sesli kabul et",
631
632
  "incomingCallNoticicationAcceptWithVideoAriaLabel": "Görüntülü kabul et",
632
- "incomingCallNoticicationRejectAriaLabel": "Reddet"
633
+ "incomingCallNoticicationRejectAriaLabel": "Reddet",
634
+ "incomingCallNotificationAcceptButtonLabel": "Kabul et",
635
+ "incomingCallNotificationRejectButtonLabel": "Reddet",
636
+ "incomingCallNotificationAccceptWithVideoButtonLabel": "Görüntülü Kabul Et"
633
637
  }
634
638
  }
@@ -457,6 +457,7 @@
457
457
  "videoGallery": {
458
458
  "screenIsBeingSharedMessage": "你正在共享你的屏幕",
459
459
  "screenShareLoadingMessage": "正在加载 {participant} 的屏幕",
460
+ "localScreenShareLoadingMessage": "正在加载屏幕",
460
461
  "localVideoLabel": "你",
461
462
  "localVideoCameraSwitcherLabel": "切换相机",
462
463
  "localVideoMovementLabel": "可移动本地小窗视频",
@@ -626,9 +627,12 @@
626
627
  },
627
628
  "IncomingCallNotification": {
628
629
  "incomingCallNotificationPlaceholderId": "未知用户",
629
- "incomingCallNotificationPlaceholderAlert": "传入呼叫",
630
+ "incomingCallNotificationPlaceholderAlert": "{callerName} 正在通话",
630
631
  "incomingCallNoticicationAcceptWithAudioAriaLabel": "语音接听",
631
632
  "incomingCallNoticicationAcceptWithVideoAriaLabel": "视频接听",
632
- "incomingCallNoticicationRejectAriaLabel": "拒绝"
633
+ "incomingCallNoticicationRejectAriaLabel": "拒绝",
634
+ "incomingCallNotificationAcceptButtonLabel": "接受",
635
+ "incomingCallNotificationRejectButtonLabel": "拒绝",
636
+ "incomingCallNotificationAccceptWithVideoButtonLabel": "使用视频接受"
633
637
  }
634
638
  }