@nethesis/phone-island 1.0.12-dev.1 → 1.0.12-dev.3

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 (630) hide show
  1. package/dist/App.js +1 -1
  2. package/dist/App.js.map +1 -1
  3. package/dist/_virtual/index6.js +1 -1
  4. package/dist/_virtual/index9.js +1 -1
  5. package/dist/components/CallView/index.js +1 -1
  6. package/dist/components/CallView/index.js.map +1 -1
  7. package/dist/components/RecorderView/Actions.js +1 -1
  8. package/dist/components/RecorderView/Actions.js.map +1 -1
  9. package/dist/components/RestAPI.js +1 -1
  10. package/dist/components/RestAPI.js.map +1 -1
  11. package/dist/components/SideView/hooks/useSideViewLogic.js +1 -1
  12. package/dist/components/SideView/hooks/useSideViewLogic.js.map +1 -1
  13. package/dist/components/VideoView/index.js +1 -1
  14. package/dist/components/VideoView/index.js.map +1 -1
  15. package/dist/events/PlayerEvents.js +1 -1
  16. package/dist/events/PlayerEvents.js.map +1 -1
  17. package/dist/lib/devices/devices.js +1 -1
  18. package/dist/lib/phone/call.js +1 -1
  19. package/dist/lib/phone/call.js.map +1 -1
  20. package/dist/node_modules/@fortawesome/fontawesome-svg-core/index.mjs.js +7 -1
  21. package/dist/node_modules/@fortawesome/fontawesome-svg-core/index.mjs.js.map +1 -1
  22. package/dist/node_modules/@fortawesome/free-solid-svg-icons/index.mjs.js +1 -1
  23. package/dist/node_modules/@fortawesome/free-solid-svg-icons/index.mjs.js.map +1 -1
  24. package/dist/node_modules/framer-motion/dist/es/animation/hooks/animation-controls.mjs.js +1 -1
  25. package/dist/node_modules/framer-motion/dist/es/animation/hooks/animation-controls.mjs.js.map +1 -1
  26. package/dist/node_modules/framer-motion/dist/es/animation/hooks/use-animation.mjs.js +1 -1
  27. package/dist/node_modules/framer-motion/dist/es/animation/hooks/use-animation.mjs.js.map +1 -1
  28. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.mjs.js +1 -1
  29. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.mjs.js.map +1 -1
  30. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.mjs.js +1 -1
  31. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.mjs.js.map +1 -1
  32. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs.js +1 -1
  33. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs.js.map +1 -1
  34. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.mjs.js.map +1 -1
  35. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/utils.mjs.js.map +1 -1
  36. package/dist/node_modules/framer-motion/dist/es/context/LayoutGroupContext.mjs.js.map +1 -1
  37. package/dist/node_modules/framer-motion/dist/es/context/LazyContext.mjs.js.map +1 -1
  38. package/dist/node_modules/framer-motion/dist/es/context/MotionConfigContext.mjs.js.map +1 -1
  39. package/dist/node_modules/framer-motion/dist/es/context/MotionContext/create.mjs.js.map +1 -1
  40. package/dist/node_modules/framer-motion/dist/es/context/MotionContext/index.mjs.js.map +1 -1
  41. package/dist/node_modules/framer-motion/dist/es/context/MotionContext/utils.mjs.js +1 -1
  42. package/dist/node_modules/framer-motion/dist/es/context/MotionContext/utils.mjs.js.map +1 -1
  43. package/dist/node_modules/framer-motion/dist/es/context/PresenceContext.mjs.js.map +1 -1
  44. package/dist/node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.mjs.js.map +1 -1
  45. package/dist/node_modules/framer-motion/dist/es/events/add-pointer-event.mjs.js +1 -1
  46. package/dist/node_modules/framer-motion/dist/es/events/add-pointer-event.mjs.js.map +1 -1
  47. package/dist/node_modules/framer-motion/dist/es/events/event-info.mjs.js.map +1 -1
  48. package/dist/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.mjs.js +1 -1
  49. package/dist/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.mjs.js.map +1 -1
  50. package/dist/node_modules/framer-motion/dist/es/gestures/drag/index.mjs.js +1 -1
  51. package/dist/node_modules/framer-motion/dist/es/gestures/drag/index.mjs.js.map +1 -1
  52. package/dist/node_modules/framer-motion/dist/es/gestures/drag/use-drag-controls.mjs.js +1 -1
  53. package/dist/node_modules/framer-motion/dist/es/gestures/drag/use-drag-controls.mjs.js.map +1 -1
  54. package/dist/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.mjs.js +1 -1
  55. package/dist/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.mjs.js.map +1 -1
  56. package/dist/node_modules/framer-motion/dist/es/gestures/focus.mjs.js +1 -1
  57. package/dist/node_modules/framer-motion/dist/es/gestures/focus.mjs.js.map +1 -1
  58. package/dist/node_modules/framer-motion/dist/es/gestures/hover.mjs.js +1 -1
  59. package/dist/node_modules/framer-motion/dist/es/gestures/hover.mjs.js.map +1 -1
  60. package/dist/node_modules/framer-motion/dist/es/gestures/pan/PanSession.mjs.js +1 -1
  61. package/dist/node_modules/framer-motion/dist/es/gestures/pan/PanSession.mjs.js.map +1 -1
  62. package/dist/node_modules/framer-motion/dist/es/gestures/pan/index.mjs.js +1 -1
  63. package/dist/node_modules/framer-motion/dist/es/gestures/pan/index.mjs.js.map +1 -1
  64. package/dist/node_modules/framer-motion/dist/es/gestures/press.mjs.js +1 -1
  65. package/dist/node_modules/framer-motion/dist/es/gestures/press.mjs.js.map +1 -1
  66. package/dist/node_modules/framer-motion/dist/es/motion/features/animation/exit.mjs.js +1 -1
  67. package/dist/node_modules/framer-motion/dist/es/motion/features/animation/exit.mjs.js.map +1 -1
  68. package/dist/node_modules/framer-motion/dist/es/motion/features/animation/index.mjs.js +1 -1
  69. package/dist/node_modules/framer-motion/dist/es/motion/features/animation/index.mjs.js.map +1 -1
  70. package/dist/node_modules/framer-motion/dist/es/motion/features/animations.mjs.js.map +1 -1
  71. package/dist/node_modules/framer-motion/dist/es/motion/features/definitions.mjs.js +1 -1
  72. package/dist/node_modules/framer-motion/dist/es/motion/features/definitions.mjs.js.map +1 -1
  73. package/dist/node_modules/framer-motion/dist/es/motion/features/drag.mjs.js +1 -1
  74. package/dist/node_modules/framer-motion/dist/es/motion/features/drag.mjs.js.map +1 -1
  75. package/dist/node_modules/framer-motion/dist/es/motion/features/gestures.mjs.js.map +1 -1
  76. package/dist/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.mjs.js +1 -1
  77. package/dist/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.mjs.js.map +1 -1
  78. package/dist/node_modules/framer-motion/dist/es/motion/features/layout.mjs.js +1 -1
  79. package/dist/node_modules/framer-motion/dist/es/motion/features/layout.mjs.js.map +1 -1
  80. package/dist/node_modules/framer-motion/dist/es/motion/features/load-features.mjs.js +1 -1
  81. package/dist/node_modules/framer-motion/dist/es/motion/features/load-features.mjs.js.map +1 -1
  82. package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/index.mjs.js +1 -1
  83. package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/index.mjs.js.map +1 -1
  84. package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/observers.mjs.js.map +1 -1
  85. package/dist/node_modules/framer-motion/dist/es/motion/index.mjs.js +1 -1
  86. package/dist/node_modules/framer-motion/dist/es/motion/index.mjs.js.map +1 -1
  87. package/dist/node_modules/framer-motion/dist/es/motion/utils/symbol.mjs.js.map +1 -1
  88. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.mjs.js +1 -1
  89. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.mjs.js.map +1 -1
  90. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.mjs.js +1 -1
  91. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.mjs.js.map +1 -1
  92. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.mjs.js +1 -1
  93. package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.mjs.js.map +1 -1
  94. package/dist/node_modules/framer-motion/dist/es/motion/utils/valid-prop.mjs.js +1 -1
  95. package/dist/node_modules/framer-motion/dist/es/motion/utils/valid-prop.mjs.js.map +1 -1
  96. package/dist/node_modules/framer-motion/dist/es/render/components/create-proxy.mjs.js +1 -1
  97. package/dist/node_modules/framer-motion/dist/es/render/components/create-proxy.mjs.js.map +1 -1
  98. package/dist/node_modules/framer-motion/dist/es/render/components/motion/feature-bundle.mjs.js +2 -0
  99. package/dist/node_modules/framer-motion/dist/es/render/components/motion/feature-bundle.mjs.js.map +1 -0
  100. package/dist/node_modules/framer-motion/dist/es/render/components/motion/proxy.mjs.js +1 -1
  101. package/dist/node_modules/framer-motion/dist/es/render/components/motion/proxy.mjs.js.map +1 -1
  102. package/dist/node_modules/framer-motion/dist/es/render/dom/create-visual-element.mjs.js +1 -1
  103. package/dist/node_modules/framer-motion/dist/es/render/dom/create-visual-element.mjs.js.map +1 -1
  104. package/dist/node_modules/framer-motion/dist/es/render/dom/use-render.mjs.js +1 -1
  105. package/dist/node_modules/framer-motion/dist/es/render/dom/use-render.mjs.js.map +1 -1
  106. package/dist/node_modules/framer-motion/dist/es/render/dom/utils/filter-props.mjs.js +1 -1
  107. package/dist/node_modules/framer-motion/dist/es/render/dom/utils/filter-props.mjs.js.map +1 -1
  108. package/dist/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.mjs.js.map +1 -1
  109. package/dist/node_modules/framer-motion/dist/es/render/html/use-html-visual-state.mjs.js +2 -0
  110. package/dist/node_modules/framer-motion/dist/es/render/html/use-html-visual-state.mjs.js.map +1 -0
  111. package/dist/node_modules/framer-motion/dist/es/render/html/use-props.mjs.js +1 -1
  112. package/dist/node_modules/framer-motion/dist/es/render/html/use-props.mjs.js.map +1 -1
  113. package/dist/node_modules/framer-motion/dist/es/render/html/utils/create-render-state.mjs.js.map +1 -1
  114. package/dist/node_modules/framer-motion/dist/es/render/svg/lowercase-elements.mjs.js.map +1 -1
  115. package/dist/node_modules/framer-motion/dist/es/render/svg/use-props.mjs.js +1 -1
  116. package/dist/node_modules/framer-motion/dist/es/render/svg/use-props.mjs.js.map +1 -1
  117. package/dist/node_modules/framer-motion/dist/es/render/svg/use-svg-visual-state.mjs.js +2 -0
  118. package/dist/node_modules/framer-motion/dist/es/render/svg/use-svg-visual-state.mjs.js.map +1 -0
  119. package/dist/node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.mjs.js.map +1 -1
  120. package/dist/node_modules/framer-motion/dist/es/utils/distance.mjs.js.map +1 -1
  121. package/dist/node_modules/framer-motion/dist/es/utils/get-context-window.mjs.js.map +1 -1
  122. package/dist/node_modules/framer-motion/dist/es/utils/is-browser.mjs.js.map +1 -1
  123. package/dist/node_modules/framer-motion/dist/es/utils/is-ref-object.mjs.js.map +1 -1
  124. package/dist/node_modules/framer-motion/dist/es/utils/use-composed-ref.mjs.js +2 -0
  125. package/dist/node_modules/framer-motion/dist/es/utils/use-composed-ref.mjs.js.map +1 -0
  126. package/dist/node_modules/framer-motion/dist/es/utils/use-constant.mjs.js.map +1 -1
  127. package/dist/node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.mjs.js.map +1 -1
  128. package/dist/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js +1 -1
  129. package/dist/node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.development.js +1 -1
  130. package/dist/node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.production.min.js +1 -1
  131. package/dist/node_modules/hoist-non-react-statics/node_modules/react-is/index.js +1 -1
  132. package/dist/node_modules/i18next-browser-languagedetector/dist/esm/i18nextBrowserLanguageDetector.js +1 -1
  133. package/dist/node_modules/i18next-browser-languagedetector/dist/esm/i18nextBrowserLanguageDetector.js.map +1 -1
  134. package/dist/node_modules/mic-check/lib/index.js +1 -1
  135. package/dist/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.mjs.js +1 -1
  136. package/dist/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.mjs.js.map +1 -1
  137. package/dist/node_modules/motion-dom/dist/es/animation/JSAnimation.mjs.js +1 -1
  138. package/dist/node_modules/motion-dom/dist/es/animation/JSAnimation.mjs.js.map +1 -1
  139. package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimation.mjs.js +1 -1
  140. package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimation.mjs.js.map +1 -1
  141. package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.mjs.js +1 -1
  142. package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.mjs.js.map +1 -1
  143. package/dist/node_modules/motion-dom/dist/es/animation/animate/single-value.mjs.js +2 -0
  144. package/dist/node_modules/motion-dom/dist/es/animation/animate/single-value.mjs.js.map +1 -0
  145. package/dist/node_modules/motion-dom/dist/es/animation/drivers/frame.mjs.js +2 -0
  146. package/dist/node_modules/motion-dom/dist/es/animation/drivers/frame.mjs.js.map +1 -0
  147. package/dist/node_modules/motion-dom/dist/es/animation/generators/inertia.mjs.js +1 -1
  148. package/dist/node_modules/motion-dom/dist/es/animation/generators/inertia.mjs.js.map +1 -1
  149. package/dist/node_modules/motion-dom/dist/es/animation/generators/keyframes.mjs.js.map +1 -1
  150. package/dist/node_modules/motion-dom/dist/es/animation/generators/spring.mjs.js +2 -0
  151. package/dist/node_modules/motion-dom/dist/es/animation/generators/spring.mjs.js.map +1 -0
  152. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/calc-duration.mjs.js.map +1 -1
  153. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.mjs.js.map +1 -1
  154. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/is-generator.mjs.js.map +1 -1
  155. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/velocity.mjs.js +1 -1
  156. package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/velocity.mjs.js.map +1 -1
  157. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/motion-value.mjs.js +2 -0
  158. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/motion-value.mjs.js.map +1 -0
  159. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.mjs.js +2 -0
  160. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.mjs.js.map +1 -0
  161. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.mjs.js +2 -0
  162. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.mjs.js.map +1 -0
  163. package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element.mjs.js.map +1 -0
  164. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.mjs.js +1 -1
  165. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.mjs.js.map +1 -1
  166. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.mjs.js +1 -1
  167. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.mjs.js.map +1 -1
  168. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/get-final.mjs.js.map +1 -1
  169. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/default.mjs.js.map +1 -1
  170. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/fill.mjs.js.map +1 -1
  171. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/offsets/time.mjs.js.map +1 -1
  172. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/fill-wildcards.mjs.js.map +1 -1
  173. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/is-none.mjs.js.map +1 -1
  174. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/make-none-animatable.mjs.js.map +1 -1
  175. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.mjs.js +1 -1
  176. package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.mjs.js.map +1 -1
  177. package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/data-id.mjs.js.map +1 -0
  178. package/dist/node_modules/motion-dom/dist/es/animation/optimized-appear/get-appear-id.mjs.js.map +1 -0
  179. package/dist/node_modules/motion-dom/dist/es/animation/utils/WithPromise.mjs.js +1 -1
  180. package/dist/node_modules/motion-dom/dist/es/animation/utils/WithPromise.mjs.js.map +1 -1
  181. package/dist/node_modules/motion-dom/dist/es/animation/utils/calc-child-stagger.mjs.js +2 -0
  182. package/dist/node_modules/motion-dom/dist/es/animation/utils/calc-child-stagger.mjs.js.map +1 -0
  183. package/dist/node_modules/motion-dom/dist/es/animation/utils/can-animate.mjs.js +1 -1
  184. package/dist/node_modules/motion-dom/dist/es/animation/utils/can-animate.mjs.js.map +1 -1
  185. package/dist/node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.mjs.js +1 -1
  186. package/dist/node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.mjs.js.map +1 -1
  187. package/dist/node_modules/motion-dom/dist/es/animation/utils/default-transitions.mjs.js +2 -0
  188. package/dist/node_modules/motion-dom/dist/es/animation/utils/default-transitions.mjs.js.map +1 -0
  189. package/dist/node_modules/motion-dom/dist/es/animation/utils/get-value-transition.mjs.js +1 -1
  190. package/dist/node_modules/motion-dom/dist/es/animation/utils/get-value-transition.mjs.js.map +1 -1
  191. package/dist/node_modules/motion-dom/dist/es/animation/utils/is-animatable.mjs.js.map +1 -1
  192. package/dist/node_modules/motion-dom/dist/es/animation/utils/is-css-variable.mjs.js +1 -1
  193. package/dist/node_modules/motion-dom/dist/es/animation/utils/is-css-variable.mjs.js.map +1 -1
  194. package/dist/node_modules/motion-dom/dist/es/animation/utils/is-transition-defined.mjs.js +2 -0
  195. package/dist/node_modules/motion-dom/dist/es/animation/utils/is-transition-defined.mjs.js.map +1 -0
  196. package/dist/node_modules/motion-dom/dist/es/animation/utils/make-animation-instant.mjs.js +2 -0
  197. package/dist/node_modules/motion-dom/dist/es/animation/utils/make-animation-instant.mjs.js.map +1 -0
  198. package/dist/node_modules/motion-dom/dist/es/animation/utils/replace-transition-type.mjs.js +1 -1
  199. package/dist/node_modules/motion-dom/dist/es/animation/utils/replace-transition-type.mjs.js.map +1 -1
  200. package/dist/node_modules/motion-dom/dist/es/animation/utils/resolve-transition.mjs.js +2 -0
  201. package/dist/node_modules/motion-dom/dist/es/animation/utils/resolve-transition.mjs.js.map +1 -0
  202. package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/cubic-bezier.mjs.js.map +1 -1
  203. package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/map-easing.mjs.js.map +1 -1
  204. package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/supported.mjs.js.map +1 -1
  205. package/dist/node_modules/motion-dom/dist/es/animation/waapi/start-waapi-animation.mjs.js.map +1 -1
  206. package/dist/node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.mjs.js +1 -1
  207. package/dist/node_modules/motion-dom/dist/es/animation/waapi/supports/waapi.mjs.js.map +1 -1
  208. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/accelerated-values.mjs.js +2 -0
  209. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/accelerated-values.mjs.js.map +1 -0
  210. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/apply-generator.mjs.js.map +1 -1
  211. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/is-browser-color.mjs.js +2 -0
  212. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/is-browser-color.mjs.js.map +1 -0
  213. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/linear.mjs.js +1 -1
  214. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/linear.mjs.js.map +1 -1
  215. package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/unsupported-easing.mjs.js.map +1 -1
  216. package/dist/node_modules/motion-dom/dist/es/events/add-dom-event.mjs.js.map +1 -0
  217. package/dist/node_modules/motion-dom/dist/es/frameloop/batcher.mjs.js +1 -1
  218. package/dist/node_modules/motion-dom/dist/es/frameloop/batcher.mjs.js.map +1 -1
  219. package/dist/node_modules/motion-dom/dist/es/frameloop/frame.mjs.js.map +1 -1
  220. package/dist/node_modules/motion-dom/dist/es/frameloop/microtask.mjs.js.map +1 -1
  221. package/dist/node_modules/motion-dom/dist/es/frameloop/order.mjs.js.map +1 -1
  222. package/dist/node_modules/motion-dom/dist/es/frameloop/render-step.mjs.js +1 -1
  223. package/dist/node_modules/motion-dom/dist/es/frameloop/render-step.mjs.js.map +1 -1
  224. package/dist/node_modules/motion-dom/dist/es/frameloop/sync-time.mjs.js.map +1 -1
  225. package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/is-active.mjs.js.map +1 -1
  226. package/dist/node_modules/motion-dom/dist/es/gestures/drag/state/set-active.mjs.js.map +1 -1
  227. package/dist/node_modules/motion-dom/dist/es/gestures/hover.mjs.js +1 -1
  228. package/dist/node_modules/motion-dom/dist/es/gestures/hover.mjs.js.map +1 -1
  229. package/dist/node_modules/motion-dom/dist/es/gestures/press/index.mjs.js +1 -1
  230. package/dist/node_modules/motion-dom/dist/es/gestures/press/index.mjs.js.map +1 -1
  231. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.mjs.js +1 -1
  232. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.mjs.js.map +1 -1
  233. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/keyboard.mjs.js.map +1 -1
  234. package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/state.mjs.js.map +1 -1
  235. package/dist/node_modules/motion-dom/dist/es/gestures/utils/is-node-or-child.mjs.js.map +1 -1
  236. package/dist/node_modules/motion-dom/dist/es/gestures/utils/is-primary-pointer.mjs.js.map +1 -1
  237. package/dist/node_modules/motion-dom/dist/es/gestures/utils/setup.mjs.js.map +1 -1
  238. package/dist/node_modules/motion-dom/dist/es/projection/animation/mix-values.mjs.js +2 -0
  239. package/dist/node_modules/motion-dom/dist/es/projection/animation/mix-values.mjs.js.map +1 -0
  240. package/dist/node_modules/motion-dom/dist/es/projection/geometry/conversion.mjs.js.map +1 -0
  241. package/dist/node_modules/motion-dom/dist/es/projection/geometry/copy.mjs.js.map +1 -0
  242. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-apply.mjs.js +2 -0
  243. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-apply.mjs.js.map +1 -0
  244. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-calc.mjs.js +2 -0
  245. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-calc.mjs.js.map +1 -0
  246. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-remove.mjs.js +2 -0
  247. package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-remove.mjs.js.map +1 -0
  248. package/dist/node_modules/motion-dom/dist/es/projection/geometry/models.mjs.js.map +1 -0
  249. package/dist/node_modules/motion-dom/dist/es/projection/geometry/utils.mjs.js.map +1 -0
  250. package/dist/node_modules/motion-dom/dist/es/projection/node/DocumentProjectionNode.mjs.js +2 -0
  251. package/dist/node_modules/motion-dom/dist/es/projection/node/DocumentProjectionNode.mjs.js.map +1 -0
  252. package/dist/node_modules/motion-dom/dist/es/projection/node/HTMLProjectionNode.mjs.js.map +1 -0
  253. package/dist/node_modules/motion-dom/dist/es/projection/node/create-projection-node.mjs.js +2 -0
  254. package/dist/node_modules/motion-dom/dist/es/projection/node/create-projection-node.mjs.js.map +1 -0
  255. package/dist/node_modules/motion-dom/dist/es/projection/node/state.mjs.js.map +1 -0
  256. package/dist/node_modules/motion-dom/dist/es/projection/shared/stack.mjs.js +2 -0
  257. package/dist/node_modules/motion-dom/dist/es/projection/shared/stack.mjs.js.map +1 -0
  258. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-border-radius.mjs.js +2 -0
  259. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-border-radius.mjs.js.map +1 -0
  260. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-box-shadow.mjs.js +2 -0
  261. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-box-shadow.mjs.js.map +1 -0
  262. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-correction.mjs.js +2 -0
  263. package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-correction.mjs.js.map +1 -0
  264. package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/styles/transform.mjs.js +1 -1
  265. package/dist/node_modules/motion-dom/dist/es/projection/styles/transform.mjs.js.map +1 -0
  266. package/dist/node_modules/motion-dom/dist/es/projection/utils/compare-by-depth.mjs.js.map +1 -0
  267. package/dist/node_modules/motion-dom/dist/es/projection/utils/each-axis.mjs.js.map +1 -0
  268. package/dist/node_modules/motion-dom/dist/es/projection/utils/flat-tree.mjs.js.map +1 -0
  269. package/dist/node_modules/motion-dom/dist/es/projection/utils/has-transform.mjs.js.map +1 -0
  270. package/dist/node_modules/motion-dom/dist/es/projection/utils/measure.mjs.js.map +1 -0
  271. package/dist/node_modules/motion-dom/dist/es/render/Feature.mjs.js.map +1 -0
  272. package/dist/node_modules/motion-dom/dist/es/render/VisualElement.mjs.js +2 -0
  273. package/dist/node_modules/motion-dom/dist/es/render/VisualElement.mjs.js.map +1 -0
  274. package/dist/node_modules/motion-dom/dist/es/render/dom/DOMVisualElement.mjs.js +2 -0
  275. package/dist/node_modules/motion-dom/dist/es/render/dom/DOMVisualElement.mjs.js.map +1 -0
  276. package/dist/node_modules/motion-dom/dist/es/render/dom/is-css-var.mjs.js.map +1 -1
  277. package/dist/node_modules/motion-dom/dist/es/render/dom/parse-transform.mjs.js +1 -1
  278. package/dist/node_modules/motion-dom/dist/es/render/dom/parse-transform.mjs.js.map +1 -1
  279. package/dist/node_modules/motion-dom/dist/es/render/dom/style-set.mjs.js.map +1 -1
  280. package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/dom/utils/camel-to-dash.mjs.js +1 -1
  281. package/dist/node_modules/motion-dom/dist/es/render/dom/utils/camel-to-dash.mjs.js.map +1 -0
  282. package/dist/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.mjs.js +2 -0
  283. package/dist/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.mjs.js.map +1 -0
  284. package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-styles.mjs.js +2 -0
  285. package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-styles.mjs.js.map +1 -0
  286. package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-transform.mjs.js +2 -0
  287. package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-transform.mjs.js.map +1 -0
  288. package/dist/node_modules/motion-dom/dist/es/render/html/utils/render.mjs.js +2 -0
  289. package/dist/node_modules/motion-dom/dist/es/render/html/utils/render.mjs.js.map +1 -0
  290. package/dist/node_modules/motion-dom/dist/es/render/html/utils/scrape-motion-values.mjs.js +2 -0
  291. package/dist/node_modules/motion-dom/dist/es/render/html/utils/scrape-motion-values.mjs.js.map +1 -0
  292. package/dist/node_modules/motion-dom/dist/es/render/store.mjs.js.map +1 -0
  293. package/dist/node_modules/motion-dom/dist/es/render/svg/SVGVisualElement.mjs.js +2 -0
  294. package/dist/node_modules/motion-dom/dist/es/render/svg/SVGVisualElement.mjs.js.map +1 -0
  295. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.mjs.js +2 -0
  296. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.mjs.js.map +1 -0
  297. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/camel-case-attrs.mjs.js.map +1 -0
  298. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/is-svg-tag.mjs.js.map +1 -0
  299. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/path.mjs.js +2 -0
  300. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/path.mjs.js.map +1 -0
  301. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/render.mjs.js.map +1 -0
  302. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/scrape-motion-values.mjs.js +2 -0
  303. package/dist/node_modules/motion-dom/dist/es/render/svg/utils/scrape-motion-values.mjs.js.map +1 -0
  304. package/dist/node_modules/motion-dom/dist/es/render/utils/animation-state.mjs.js +2 -0
  305. package/dist/node_modules/motion-dom/dist/es/render/utils/animation-state.mjs.js.map +1 -0
  306. package/dist/node_modules/motion-dom/dist/es/render/utils/get-variant-context.mjs.js.map +1 -0
  307. package/dist/node_modules/motion-dom/dist/es/render/utils/is-animation-controls.mjs.js.map +1 -0
  308. package/dist/node_modules/motion-dom/dist/es/render/utils/is-controlling-variants.mjs.js +2 -0
  309. package/dist/node_modules/motion-dom/dist/es/render/utils/is-controlling-variants.mjs.js.map +1 -0
  310. package/dist/node_modules/motion-dom/dist/es/render/utils/is-forced-motion-value.mjs.js +2 -0
  311. package/dist/node_modules/motion-dom/dist/es/render/utils/is-forced-motion-value.mjs.js.map +1 -0
  312. package/dist/node_modules/motion-dom/dist/es/render/utils/is-keyframes-target.mjs.js.map +1 -0
  313. package/dist/node_modules/motion-dom/dist/es/render/utils/is-variant-label.mjs.js.map +1 -0
  314. package/dist/node_modules/motion-dom/dist/es/render/utils/keys-position.mjs.js.map +1 -1
  315. package/dist/node_modules/motion-dom/dist/es/render/utils/keys-transform.mjs.js +1 -1
  316. package/dist/node_modules/motion-dom/dist/es/render/utils/keys-transform.mjs.js.map +1 -1
  317. package/dist/node_modules/motion-dom/dist/es/render/utils/motion-values.mjs.js +2 -0
  318. package/dist/node_modules/motion-dom/dist/es/render/utils/motion-values.mjs.js.map +1 -0
  319. package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/index.mjs.js +2 -0
  320. package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/index.mjs.js.map +1 -0
  321. package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/state.mjs.js.map +1 -0
  322. package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-dynamic-variants.mjs.js.map +1 -0
  323. package/dist/node_modules/motion-dom/dist/es/render/utils/resolve-variants.mjs.js.map +1 -0
  324. package/dist/node_modules/motion-dom/dist/es/render/utils/setters.mjs.js +2 -0
  325. package/dist/node_modules/motion-dom/dist/es/render/utils/setters.mjs.js.map +1 -0
  326. package/dist/node_modules/motion-dom/dist/es/render/utils/shallow-compare.mjs.js.map +1 -0
  327. package/dist/node_modules/motion-dom/dist/es/render/utils/variant-props.mjs.js.map +1 -0
  328. package/dist/node_modules/motion-dom/dist/es/resize/handle-element.mjs.js +2 -0
  329. package/dist/node_modules/motion-dom/dist/es/resize/handle-element.mjs.js.map +1 -0
  330. package/dist/node_modules/motion-dom/dist/es/resize/handle-window.mjs.js +2 -0
  331. package/dist/node_modules/motion-dom/dist/es/resize/handle-window.mjs.js.map +1 -0
  332. package/dist/node_modules/motion-dom/dist/es/resize/index.mjs.js +2 -0
  333. package/dist/node_modules/motion-dom/dist/es/resize/index.mjs.js.map +1 -0
  334. package/dist/node_modules/motion-dom/dist/es/stats/buffer.mjs.js.map +1 -1
  335. package/dist/node_modules/motion-dom/dist/es/utils/delay.mjs.js +2 -0
  336. package/dist/node_modules/motion-dom/dist/es/utils/delay.mjs.js.map +1 -0
  337. package/dist/node_modules/motion-dom/dist/es/utils/interpolate.mjs.js +1 -1
  338. package/dist/node_modules/motion-dom/dist/es/utils/interpolate.mjs.js.map +1 -1
  339. package/dist/node_modules/motion-dom/dist/es/utils/is-html-element.mjs.js +2 -0
  340. package/dist/node_modules/motion-dom/dist/es/utils/is-html-element.mjs.js.map +1 -0
  341. package/dist/node_modules/motion-dom/dist/es/utils/is-svg-element.mjs.js +2 -0
  342. package/dist/node_modules/motion-dom/dist/es/utils/is-svg-element.mjs.js.map +1 -0
  343. package/dist/node_modules/motion-dom/dist/es/utils/is-svg-svg-element.mjs.js +2 -0
  344. package/dist/node_modules/motion-dom/dist/es/utils/is-svg-svg-element.mjs.js.map +1 -0
  345. package/dist/node_modules/motion-dom/dist/es/utils/mix/color.mjs.js +1 -1
  346. package/dist/node_modules/motion-dom/dist/es/utils/mix/color.mjs.js.map +1 -1
  347. package/dist/node_modules/motion-dom/dist/es/utils/mix/complex.mjs.js +1 -1
  348. package/dist/node_modules/motion-dom/dist/es/utils/mix/complex.mjs.js.map +1 -1
  349. package/dist/node_modules/motion-dom/dist/es/utils/mix/immediate.mjs.js.map +1 -1
  350. package/dist/node_modules/motion-dom/dist/es/utils/mix/index.mjs.js.map +1 -1
  351. package/dist/node_modules/motion-dom/dist/es/utils/mix/number.mjs.js.map +1 -1
  352. package/dist/node_modules/motion-dom/dist/es/utils/mix/visibility.mjs.js.map +1 -1
  353. package/dist/node_modules/motion-dom/dist/es/utils/resolve-elements.mjs.js +1 -1
  354. package/dist/node_modules/motion-dom/dist/es/utils/resolve-elements.mjs.js.map +1 -1
  355. package/dist/node_modules/motion-dom/dist/es/utils/supports/flags.mjs.js.map +1 -1
  356. package/dist/node_modules/motion-dom/dist/es/utils/supports/linear-easing.mjs.js.map +1 -1
  357. package/dist/node_modules/motion-dom/dist/es/utils/supports/memo.mjs.js.map +1 -1
  358. package/dist/node_modules/motion-dom/dist/es/utils/supports/scroll-timeline.mjs.js +1 -1
  359. package/dist/node_modules/motion-dom/dist/es/utils/supports/scroll-timeline.mjs.js.map +1 -1
  360. package/dist/node_modules/motion-dom/dist/es/value/index.mjs.js +1 -1
  361. package/dist/node_modules/motion-dom/dist/es/value/index.mjs.js.map +1 -1
  362. package/dist/node_modules/motion-dom/dist/es/value/types/auto.mjs.js.map +1 -1
  363. package/dist/node_modules/motion-dom/dist/es/value/types/color/hex.mjs.js.map +1 -1
  364. package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla-to-rgba.mjs.js.map +1 -1
  365. package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla.mjs.js.map +1 -1
  366. package/dist/node_modules/motion-dom/dist/es/value/types/color/index.mjs.js +1 -1
  367. package/dist/node_modules/motion-dom/dist/es/value/types/color/index.mjs.js.map +1 -1
  368. package/dist/node_modules/motion-dom/dist/es/value/types/color/rgba.mjs.js.map +1 -1
  369. package/dist/node_modules/motion-dom/dist/es/value/types/color/utils.mjs.js.map +1 -1
  370. package/dist/node_modules/motion-dom/dist/es/value/types/complex/filter.mjs.js.map +1 -1
  371. package/dist/node_modules/motion-dom/dist/es/value/types/complex/index.mjs.js +1 -1
  372. package/dist/node_modules/motion-dom/dist/es/value/types/complex/index.mjs.js.map +1 -1
  373. package/dist/node_modules/motion-dom/dist/es/value/types/complex/mask.mjs.js +2 -0
  374. package/dist/node_modules/motion-dom/dist/es/value/types/complex/mask.mjs.js.map +1 -0
  375. package/dist/node_modules/motion-dom/dist/es/value/types/dimensions.mjs.js.map +1 -1
  376. package/dist/node_modules/motion-dom/dist/es/value/types/int.mjs.js.map +1 -1
  377. package/dist/node_modules/motion-dom/dist/es/value/types/maps/defaults.mjs.js +1 -1
  378. package/dist/node_modules/motion-dom/dist/es/value/types/maps/defaults.mjs.js.map +1 -1
  379. package/dist/node_modules/motion-dom/dist/es/value/types/maps/number.mjs.js +1 -1
  380. package/dist/node_modules/motion-dom/dist/es/value/types/maps/number.mjs.js.map +1 -1
  381. package/dist/node_modules/motion-dom/dist/es/value/types/maps/transform.mjs.js +1 -1
  382. package/dist/node_modules/motion-dom/dist/es/value/types/maps/transform.mjs.js.map +1 -1
  383. package/dist/node_modules/motion-dom/dist/es/value/types/numbers/index.mjs.js.map +1 -1
  384. package/dist/node_modules/motion-dom/dist/es/value/types/numbers/units.mjs.js.map +1 -1
  385. package/dist/node_modules/motion-dom/dist/es/value/types/test.mjs.js.map +1 -1
  386. package/dist/node_modules/motion-dom/dist/es/value/types/utils/animatable-none.mjs.js +1 -1
  387. package/dist/node_modules/motion-dom/dist/es/value/types/utils/animatable-none.mjs.js.map +1 -1
  388. package/dist/node_modules/motion-dom/dist/es/value/types/utils/color-regex.mjs.js.map +1 -1
  389. package/dist/node_modules/motion-dom/dist/es/value/types/utils/find.mjs.js.map +1 -1
  390. package/dist/node_modules/motion-dom/dist/es/value/types/utils/float-regex.mjs.js.map +1 -1
  391. package/dist/node_modules/motion-dom/dist/es/value/types/utils/get-as-type.mjs.js.map +1 -1
  392. package/dist/node_modules/motion-dom/dist/es/value/types/utils/is-nullish.mjs.js.map +1 -1
  393. package/dist/node_modules/motion-dom/dist/es/value/types/utils/sanitize.mjs.js.map +1 -1
  394. package/dist/node_modules/motion-dom/dist/es/value/types/utils/single-color-regex.mjs.js.map +1 -1
  395. package/dist/node_modules/motion-dom/dist/es/value/utils/is-motion-value.mjs.js.map +1 -0
  396. package/dist/node_modules/motion-dom/dist/es/value/utils/resolve-motion-value.mjs.js.map +1 -0
  397. package/dist/node_modules/motion-dom/dist/es/value/will-change/add-will-change.mjs.js.map +1 -0
  398. package/dist/node_modules/motion-dom/dist/es/value/will-change/is.mjs.js.map +1 -0
  399. package/dist/node_modules/motion-utils/dist/es/array.mjs.js.map +1 -1
  400. package/dist/node_modules/motion-utils/dist/es/clamp.mjs.js.map +1 -1
  401. package/dist/node_modules/motion-utils/dist/es/easing/anticipate.mjs.js +1 -1
  402. package/dist/node_modules/motion-utils/dist/es/easing/anticipate.mjs.js.map +1 -1
  403. package/dist/node_modules/motion-utils/dist/es/easing/back.mjs.js.map +1 -1
  404. package/dist/node_modules/motion-utils/dist/es/easing/circ.mjs.js.map +1 -1
  405. package/dist/node_modules/motion-utils/dist/es/easing/cubic-bezier.mjs.js.map +1 -1
  406. package/dist/node_modules/motion-utils/dist/es/easing/ease.mjs.js.map +1 -1
  407. package/dist/node_modules/motion-utils/dist/es/easing/modifiers/mirror.mjs.js.map +1 -1
  408. package/dist/node_modules/motion-utils/dist/es/easing/modifiers/reverse.mjs.js.map +1 -1
  409. package/dist/node_modules/motion-utils/dist/es/easing/utils/is-bezier-definition.mjs.js.map +1 -1
  410. package/dist/node_modules/motion-utils/dist/es/easing/utils/is-easing-array.mjs.js.map +1 -1
  411. package/dist/node_modules/motion-utils/dist/es/easing/utils/map.mjs.js +1 -1
  412. package/dist/node_modules/motion-utils/dist/es/easing/utils/map.mjs.js.map +1 -1
  413. package/dist/node_modules/motion-utils/dist/es/errors.mjs.js +1 -1
  414. package/dist/node_modules/motion-utils/dist/es/errors.mjs.js.map +1 -1
  415. package/dist/node_modules/motion-utils/dist/es/format-error-message.mjs.js +2 -0
  416. package/dist/node_modules/motion-utils/dist/es/format-error-message.mjs.js.map +1 -0
  417. package/dist/node_modules/motion-utils/dist/es/global-config.mjs.js.map +1 -1
  418. package/dist/node_modules/motion-utils/dist/es/is-numerical-string.mjs.js.map +1 -1
  419. package/dist/node_modules/motion-utils/dist/es/is-object.mjs.js +2 -0
  420. package/dist/node_modules/motion-utils/dist/es/is-object.mjs.js.map +1 -0
  421. package/dist/node_modules/motion-utils/dist/es/is-zero-value-string.mjs.js.map +1 -1
  422. package/dist/node_modules/motion-utils/dist/es/memo.mjs.js.map +1 -1
  423. package/dist/node_modules/motion-utils/dist/es/noop.mjs.js.map +1 -1
  424. package/dist/node_modules/motion-utils/dist/es/pipe.mjs.js +1 -1
  425. package/dist/node_modules/motion-utils/dist/es/pipe.mjs.js.map +1 -1
  426. package/dist/node_modules/motion-utils/dist/es/progress.mjs.js +1 -1
  427. package/dist/node_modules/motion-utils/dist/es/progress.mjs.js.map +1 -1
  428. package/dist/node_modules/motion-utils/dist/es/subscription-manager.mjs.js.map +1 -1
  429. package/dist/node_modules/motion-utils/dist/es/time-conversion.mjs.js.map +1 -1
  430. package/dist/node_modules/motion-utils/dist/es/velocity-per-second.mjs.js +1 -1
  431. package/dist/node_modules/motion-utils/dist/es/velocity-per-second.mjs.js.map +1 -1
  432. package/dist/node_modules/motion-utils/dist/es/warn-once.mjs.js +1 -1
  433. package/dist/node_modules/motion-utils/dist/es/warn-once.mjs.js.map +1 -1
  434. package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js +1 -1
  435. package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js +1 -1
  436. package/dist/node_modules/react/cjs/react-jsx-runtime.development.js +1 -1
  437. package/dist/node_modules/react/cjs/react-jsx-runtime.development.js.map +1 -1
  438. package/dist/node_modules/react-moment/dist/index.js +12 -2
  439. package/dist/node_modules/react-moment/dist/index.js.map +1 -1
  440. package/dist/node_modules/react-redux/es/components/Context.js +1 -1
  441. package/dist/node_modules/react-redux/es/components/Context.js.map +1 -1
  442. package/dist/node_modules/react-redux/es/components/Provider.js +1 -1
  443. package/dist/node_modules/react-redux/es/components/Provider.js.map +1 -1
  444. package/dist/node_modules/react-redux/es/hooks/useReduxContext.js +1 -1
  445. package/dist/node_modules/react-redux/es/hooks/useReduxContext.js.map +1 -1
  446. package/dist/node_modules/react-redux/es/hooks/useSelector.js +1 -1
  447. package/dist/node_modules/react-redux/es/hooks/useSelector.js.map +1 -1
  448. package/dist/node_modules/react-redux/es/hooks/useStore.js +1 -1
  449. package/dist/node_modules/react-redux/es/hooks/useStore.js.map +1 -1
  450. package/dist/node_modules/react-redux/es/index.js +1 -1
  451. package/dist/node_modules/react-redux/es/index.js.map +1 -1
  452. package/dist/node_modules/react-redux/es/utils/Subscription.js +1 -1
  453. package/dist/node_modules/react-redux/es/utils/Subscription.js.map +1 -1
  454. package/dist/node_modules/react-redux/es/utils/useIsomorphicLayoutEffect.js +1 -1
  455. package/dist/node_modules/react-redux/es/utils/useIsomorphicLayoutEffect.js.map +1 -1
  456. package/dist/node_modules/react-redux/node_modules/react-is/index.js +1 -1
  457. package/dist/node_modules/react-tooltip/dist/react-tooltip.min.mjs.js +1 -1
  458. package/dist/node_modules/react-tooltip/dist/react-tooltip.min.mjs.js.map +1 -1
  459. package/dist/node_modules/webrtc-adapter/src/js/adapter_factory.js +1 -1
  460. package/dist/node_modules/webrtc-adapter/src/js/adapter_factory.js.map +1 -1
  461. package/dist/node_modules/webrtc-adapter/src/js/chrome/getusermedia.js +1 -1
  462. package/dist/node_modules/webrtc-adapter/src/js/chrome/getusermedia.js.map +1 -1
  463. package/dist/node_modules/webrtc-adapter/src/js/common_shim.js +1 -1
  464. package/dist/node_modules/webrtc-adapter/src/js/common_shim.js.map +1 -1
  465. package/dist/node_modules/webrtc-adapter/src/js/firefox/firefox_shim.js +1 -1
  466. package/dist/node_modules/webrtc-adapter/src/js/firefox/firefox_shim.js.map +1 -1
  467. package/dist/node_modules/webrtc-adapter/src/js/firefox/getdisplaymedia.js +1 -1
  468. package/dist/node_modules/webrtc-adapter/src/js/firefox/getdisplaymedia.js.map +1 -1
  469. package/dist/node_modules/webrtc-adapter/src/js/firefox/getusermedia.js +1 -1
  470. package/dist/node_modules/webrtc-adapter/src/js/firefox/getusermedia.js.map +1 -1
  471. package/dist/node_modules/webrtc-adapter/src/js/utils.js +1 -1
  472. package/dist/node_modules/webrtc-adapter/src/js/utils.js.map +1 -1
  473. package/dist/package.json.js +1 -1
  474. package/package.json +1 -1
  475. package/dist/node_modules/framer-motion/dist/es/animation/animate/single-value.mjs.js +0 -2
  476. package/dist/node_modules/framer-motion/dist/es/animation/animate/single-value.mjs.js.map +0 -1
  477. package/dist/node_modules/framer-motion/dist/es/animation/animators/waapi/utils/get-final-keyframe.mjs.js +0 -2
  478. package/dist/node_modules/framer-motion/dist/es/animation/animators/waapi/utils/get-final-keyframe.mjs.js.map +0 -1
  479. package/dist/node_modules/framer-motion/dist/es/animation/interfaces/motion-value.mjs.js +0 -2
  480. package/dist/node_modules/framer-motion/dist/es/animation/interfaces/motion-value.mjs.js.map +0 -1
  481. package/dist/node_modules/framer-motion/dist/es/animation/interfaces/visual-element-target.mjs.js +0 -2
  482. package/dist/node_modules/framer-motion/dist/es/animation/interfaces/visual-element-target.mjs.js.map +0 -1
  483. package/dist/node_modules/framer-motion/dist/es/animation/interfaces/visual-element-variant.mjs.js +0 -2
  484. package/dist/node_modules/framer-motion/dist/es/animation/interfaces/visual-element-variant.mjs.js.map +0 -1
  485. package/dist/node_modules/framer-motion/dist/es/animation/interfaces/visual-element.mjs.js.map +0 -1
  486. package/dist/node_modules/framer-motion/dist/es/animation/optimized-appear/data-id.mjs.js.map +0 -1
  487. package/dist/node_modules/framer-motion/dist/es/animation/optimized-appear/get-appear-id.mjs.js.map +0 -1
  488. package/dist/node_modules/framer-motion/dist/es/animation/utils/default-transitions.mjs.js +0 -2
  489. package/dist/node_modules/framer-motion/dist/es/animation/utils/default-transitions.mjs.js.map +0 -1
  490. package/dist/node_modules/framer-motion/dist/es/animation/utils/is-animation-controls.mjs.js.map +0 -1
  491. package/dist/node_modules/framer-motion/dist/es/animation/utils/is-keyframes-target.mjs.js.map +0 -1
  492. package/dist/node_modules/framer-motion/dist/es/animation/utils/is-transition-defined.mjs.js +0 -2
  493. package/dist/node_modules/framer-motion/dist/es/animation/utils/is-transition-defined.mjs.js.map +0 -1
  494. package/dist/node_modules/framer-motion/dist/es/events/add-dom-event.mjs.js.map +0 -1
  495. package/dist/node_modules/framer-motion/dist/es/motion/features/Feature.mjs.js.map +0 -1
  496. package/dist/node_modules/framer-motion/dist/es/motion/utils/is-forced-motion-value.mjs.js +0 -2
  497. package/dist/node_modules/framer-motion/dist/es/motion/utils/is-forced-motion-value.mjs.js.map +0 -1
  498. package/dist/node_modules/framer-motion/dist/es/projection/animation/mix-values.mjs.js +0 -2
  499. package/dist/node_modules/framer-motion/dist/es/projection/animation/mix-values.mjs.js.map +0 -1
  500. package/dist/node_modules/framer-motion/dist/es/projection/geometry/conversion.mjs.js.map +0 -1
  501. package/dist/node_modules/framer-motion/dist/es/projection/geometry/copy.mjs.js.map +0 -1
  502. package/dist/node_modules/framer-motion/dist/es/projection/geometry/delta-apply.mjs.js +0 -2
  503. package/dist/node_modules/framer-motion/dist/es/projection/geometry/delta-apply.mjs.js.map +0 -1
  504. package/dist/node_modules/framer-motion/dist/es/projection/geometry/delta-calc.mjs.js +0 -2
  505. package/dist/node_modules/framer-motion/dist/es/projection/geometry/delta-calc.mjs.js.map +0 -1
  506. package/dist/node_modules/framer-motion/dist/es/projection/geometry/delta-remove.mjs.js +0 -2
  507. package/dist/node_modules/framer-motion/dist/es/projection/geometry/delta-remove.mjs.js.map +0 -1
  508. package/dist/node_modules/framer-motion/dist/es/projection/geometry/models.mjs.js.map +0 -1
  509. package/dist/node_modules/framer-motion/dist/es/projection/geometry/utils.mjs.js.map +0 -1
  510. package/dist/node_modules/framer-motion/dist/es/projection/node/DocumentProjectionNode.mjs.js +0 -2
  511. package/dist/node_modules/framer-motion/dist/es/projection/node/DocumentProjectionNode.mjs.js.map +0 -1
  512. package/dist/node_modules/framer-motion/dist/es/projection/node/HTMLProjectionNode.mjs.js.map +0 -1
  513. package/dist/node_modules/framer-motion/dist/es/projection/node/create-projection-node.mjs.js +0 -2
  514. package/dist/node_modules/framer-motion/dist/es/projection/node/create-projection-node.mjs.js.map +0 -1
  515. package/dist/node_modules/framer-motion/dist/es/projection/node/state.mjs.js.map +0 -1
  516. package/dist/node_modules/framer-motion/dist/es/projection/shared/stack.mjs.js +0 -2
  517. package/dist/node_modules/framer-motion/dist/es/projection/shared/stack.mjs.js.map +0 -1
  518. package/dist/node_modules/framer-motion/dist/es/projection/styles/scale-border-radius.mjs.js +0 -2
  519. package/dist/node_modules/framer-motion/dist/es/projection/styles/scale-border-radius.mjs.js.map +0 -1
  520. package/dist/node_modules/framer-motion/dist/es/projection/styles/scale-box-shadow.mjs.js +0 -2
  521. package/dist/node_modules/framer-motion/dist/es/projection/styles/scale-box-shadow.mjs.js.map +0 -1
  522. package/dist/node_modules/framer-motion/dist/es/projection/styles/scale-correction.mjs.js +0 -2
  523. package/dist/node_modules/framer-motion/dist/es/projection/styles/scale-correction.mjs.js.map +0 -1
  524. package/dist/node_modules/framer-motion/dist/es/projection/styles/transform.mjs.js.map +0 -1
  525. package/dist/node_modules/framer-motion/dist/es/projection/utils/each-axis.mjs.js.map +0 -1
  526. package/dist/node_modules/framer-motion/dist/es/projection/utils/has-transform.mjs.js.map +0 -1
  527. package/dist/node_modules/framer-motion/dist/es/projection/utils/measure.mjs.js.map +0 -1
  528. package/dist/node_modules/framer-motion/dist/es/render/VisualElement.mjs.js +0 -2
  529. package/dist/node_modules/framer-motion/dist/es/render/VisualElement.mjs.js.map +0 -1
  530. package/dist/node_modules/framer-motion/dist/es/render/components/create-factory.mjs.js +0 -2
  531. package/dist/node_modules/framer-motion/dist/es/render/components/create-factory.mjs.js.map +0 -1
  532. package/dist/node_modules/framer-motion/dist/es/render/components/motion/create.mjs.js +0 -2
  533. package/dist/node_modules/framer-motion/dist/es/render/components/motion/create.mjs.js.map +0 -1
  534. package/dist/node_modules/framer-motion/dist/es/render/dom/DOMVisualElement.mjs.js +0 -2
  535. package/dist/node_modules/framer-motion/dist/es/render/dom/DOMVisualElement.mjs.js.map +0 -1
  536. package/dist/node_modules/framer-motion/dist/es/render/dom/utils/camel-to-dash.mjs.js.map +0 -1
  537. package/dist/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-element.mjs.js +0 -2
  538. package/dist/node_modules/framer-motion/dist/es/render/dom/utils/is-svg-element.mjs.js.map +0 -1
  539. package/dist/node_modules/framer-motion/dist/es/render/html/HTMLVisualElement.mjs.js +0 -2
  540. package/dist/node_modules/framer-motion/dist/es/render/html/HTMLVisualElement.mjs.js.map +0 -1
  541. package/dist/node_modules/framer-motion/dist/es/render/html/config-motion.mjs.js +0 -2
  542. package/dist/node_modules/framer-motion/dist/es/render/html/config-motion.mjs.js.map +0 -1
  543. package/dist/node_modules/framer-motion/dist/es/render/html/utils/build-styles.mjs.js +0 -2
  544. package/dist/node_modules/framer-motion/dist/es/render/html/utils/build-styles.mjs.js.map +0 -1
  545. package/dist/node_modules/framer-motion/dist/es/render/html/utils/build-transform.mjs.js +0 -2
  546. package/dist/node_modules/framer-motion/dist/es/render/html/utils/build-transform.mjs.js.map +0 -1
  547. package/dist/node_modules/framer-motion/dist/es/render/html/utils/render.mjs.js +0 -2
  548. package/dist/node_modules/framer-motion/dist/es/render/html/utils/render.mjs.js.map +0 -1
  549. package/dist/node_modules/framer-motion/dist/es/render/html/utils/scrape-motion-values.mjs.js +0 -2
  550. package/dist/node_modules/framer-motion/dist/es/render/html/utils/scrape-motion-values.mjs.js.map +0 -1
  551. package/dist/node_modules/framer-motion/dist/es/render/store.mjs.js.map +0 -1
  552. package/dist/node_modules/framer-motion/dist/es/render/svg/SVGVisualElement.mjs.js +0 -2
  553. package/dist/node_modules/framer-motion/dist/es/render/svg/SVGVisualElement.mjs.js.map +0 -1
  554. package/dist/node_modules/framer-motion/dist/es/render/svg/config-motion.mjs.js +0 -2
  555. package/dist/node_modules/framer-motion/dist/es/render/svg/config-motion.mjs.js.map +0 -1
  556. package/dist/node_modules/framer-motion/dist/es/render/svg/utils/build-attrs.mjs.js +0 -2
  557. package/dist/node_modules/framer-motion/dist/es/render/svg/utils/build-attrs.mjs.js.map +0 -1
  558. package/dist/node_modules/framer-motion/dist/es/render/svg/utils/camel-case-attrs.mjs.js.map +0 -1
  559. package/dist/node_modules/framer-motion/dist/es/render/svg/utils/is-svg-tag.mjs.js.map +0 -1
  560. package/dist/node_modules/framer-motion/dist/es/render/svg/utils/path.mjs.js +0 -2
  561. package/dist/node_modules/framer-motion/dist/es/render/svg/utils/path.mjs.js.map +0 -1
  562. package/dist/node_modules/framer-motion/dist/es/render/svg/utils/render.mjs.js.map +0 -1
  563. package/dist/node_modules/framer-motion/dist/es/render/svg/utils/scrape-motion-values.mjs.js +0 -2
  564. package/dist/node_modules/framer-motion/dist/es/render/svg/utils/scrape-motion-values.mjs.js.map +0 -1
  565. package/dist/node_modules/framer-motion/dist/es/render/utils/animation-state.mjs.js +0 -2
  566. package/dist/node_modules/framer-motion/dist/es/render/utils/animation-state.mjs.js.map +0 -1
  567. package/dist/node_modules/framer-motion/dist/es/render/utils/compare-by-depth.mjs.js.map +0 -1
  568. package/dist/node_modules/framer-motion/dist/es/render/utils/flat-tree.mjs.js.map +0 -1
  569. package/dist/node_modules/framer-motion/dist/es/render/utils/get-variant-context.mjs.js.map +0 -1
  570. package/dist/node_modules/framer-motion/dist/es/render/utils/is-controlling-variants.mjs.js +0 -2
  571. package/dist/node_modules/framer-motion/dist/es/render/utils/is-controlling-variants.mjs.js.map +0 -1
  572. package/dist/node_modules/framer-motion/dist/es/render/utils/is-variant-label.mjs.js.map +0 -1
  573. package/dist/node_modules/framer-motion/dist/es/render/utils/motion-values.mjs.js +0 -2
  574. package/dist/node_modules/framer-motion/dist/es/render/utils/motion-values.mjs.js.map +0 -1
  575. package/dist/node_modules/framer-motion/dist/es/render/utils/resolve-dynamic-variants.mjs.js.map +0 -1
  576. package/dist/node_modules/framer-motion/dist/es/render/utils/resolve-variants.mjs.js.map +0 -1
  577. package/dist/node_modules/framer-motion/dist/es/render/utils/setters.mjs.js +0 -2
  578. package/dist/node_modules/framer-motion/dist/es/render/utils/setters.mjs.js.map +0 -1
  579. package/dist/node_modules/framer-motion/dist/es/render/utils/variant-props.mjs.js.map +0 -1
  580. package/dist/node_modules/framer-motion/dist/es/utils/delay.mjs.js +0 -2
  581. package/dist/node_modules/framer-motion/dist/es/utils/delay.mjs.js.map +0 -1
  582. package/dist/node_modules/framer-motion/dist/es/utils/reduced-motion/index.mjs.js +0 -2
  583. package/dist/node_modules/framer-motion/dist/es/utils/reduced-motion/index.mjs.js.map +0 -1
  584. package/dist/node_modules/framer-motion/dist/es/utils/reduced-motion/state.mjs.js.map +0 -1
  585. package/dist/node_modules/framer-motion/dist/es/utils/shallow-compare.mjs.js.map +0 -1
  586. package/dist/node_modules/framer-motion/dist/es/value/use-will-change/add-will-change.mjs.js.map +0 -1
  587. package/dist/node_modules/framer-motion/dist/es/value/use-will-change/is.mjs.js.map +0 -1
  588. package/dist/node_modules/framer-motion/dist/es/value/utils/is-motion-value.mjs.js.map +0 -1
  589. package/dist/node_modules/framer-motion/dist/es/value/utils/resolve-motion-value.mjs.js.map +0 -1
  590. package/dist/node_modules/motion-dom/dist/es/animation/drivers/driver-frameloop.mjs.js +0 -2
  591. package/dist/node_modules/motion-dom/dist/es/animation/drivers/driver-frameloop.mjs.js.map +0 -1
  592. package/dist/node_modules/motion-dom/dist/es/animation/generators/spring/defaults.mjs.js +0 -2
  593. package/dist/node_modules/motion-dom/dist/es/animation/generators/spring/defaults.mjs.js.map +0 -1
  594. package/dist/node_modules/motion-dom/dist/es/animation/generators/spring/find.mjs.js +0 -2
  595. package/dist/node_modules/motion-dom/dist/es/animation/generators/spring/find.mjs.js.map +0 -1
  596. package/dist/node_modules/motion-dom/dist/es/animation/generators/spring/index.mjs.js +0 -2
  597. package/dist/node_modules/motion-dom/dist/es/animation/generators/spring/index.mjs.js.map +0 -1
  598. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/interfaces/visual-element.mjs.js +0 -0
  599. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/optimized-appear/data-id.mjs.js +0 -0
  600. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/optimized-appear/get-appear-id.mjs.js +0 -0
  601. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/events/add-dom-event.mjs.js +0 -0
  602. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/geometry/conversion.mjs.js +0 -0
  603. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/geometry/copy.mjs.js +0 -0
  604. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/geometry/models.mjs.js +0 -0
  605. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/geometry/utils.mjs.js +0 -0
  606. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/node/HTMLProjectionNode.mjs.js +0 -0
  607. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/node/state.mjs.js +0 -0
  608. /package/dist/node_modules/{framer-motion/dist/es/render → motion-dom/dist/es/projection}/utils/compare-by-depth.mjs.js +0 -0
  609. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/utils/each-axis.mjs.js +0 -0
  610. /package/dist/node_modules/{framer-motion/dist/es/render → motion-dom/dist/es/projection}/utils/flat-tree.mjs.js +0 -0
  611. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/utils/has-transform.mjs.js +0 -0
  612. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/utils/measure.mjs.js +0 -0
  613. /package/dist/node_modules/{framer-motion/dist/es/motion/features → motion-dom/dist/es/render}/Feature.mjs.js +0 -0
  614. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/store.mjs.js +0 -0
  615. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/svg/utils/camel-case-attrs.mjs.js +0 -0
  616. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/svg/utils/is-svg-tag.mjs.js +0 -0
  617. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/svg/utils/render.mjs.js +0 -0
  618. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/get-variant-context.mjs.js +0 -0
  619. /package/dist/node_modules/{framer-motion/dist/es/animation → motion-dom/dist/es/render}/utils/is-animation-controls.mjs.js +0 -0
  620. /package/dist/node_modules/{framer-motion/dist/es/animation → motion-dom/dist/es/render}/utils/is-keyframes-target.mjs.js +0 -0
  621. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/is-variant-label.mjs.js +0 -0
  622. /package/dist/node_modules/{framer-motion/dist/es → motion-dom/dist/es/render}/utils/reduced-motion/state.mjs.js +0 -0
  623. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/resolve-dynamic-variants.mjs.js +0 -0
  624. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/resolve-variants.mjs.js +0 -0
  625. /package/dist/node_modules/{framer-motion/dist/es → motion-dom/dist/es/render}/utils/shallow-compare.mjs.js +0 -0
  626. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/variant-props.mjs.js +0 -0
  627. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/value/utils/is-motion-value.mjs.js +0 -0
  628. /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/value/utils/resolve-motion-value.mjs.js +0 -0
  629. /package/dist/node_modules/{framer-motion/dist/es/value/use-will-change → motion-dom/dist/es/value/will-change}/add-will-change.mjs.js +0 -0
  630. /package/dist/node_modules/{framer-motion/dist/es/value/use-will-change → motion-dom/dist/es/value/will-change}/is.mjs.js +0 -0
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../node_modules/tslib/tslib.es6.js"),t=require("react"),r=require("../Button.js");require("../../node_modules/react-redux/es/index.js");var a=require("../../store/index.js"),n=require("../../node_modules/@fortawesome/react-fontawesome/index.es.js"),i=require("../../node_modules/@fortawesome/free-solid-svg-icons/index.mjs.js"),o=require("../../node_modules/i18next/dist/esm/i18next.js"),l=require("../../utils/customHooks/useEventListener.js"),s=require("../../utils/customHooks/useIsomorphicLayoutEffect.js"),c=require("../../utils/genericFunctions/eventDispatch.js"),u=require("../Hangup.js"),d=require("../../lib/phone/call.js"),p=require("../../lib/webrtc/janus.js"),v=require("../CallView/Avatar.js"),m=require("../CallView/Timer.js"),f=require("../../lib/user/default_device.js"),g=require("../AudioBars.js"),h=require("../CustomThemedTooltip.js"),S=require("../../node_modules/@nethesis/nethesis-solid-svg-icons/index.mjs.js"),b=require("../../lib/devices/devices.js"),E=require("../../lib/avatars/avatars.js"),w=require("../../events/SocketEvents.js"),y=require("../../node_modules/react-redux/es/hooks/useDispatch.js"),k=require("../../node_modules/react-redux/es/hooks/useSelector.js");function C(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var T=C(t),j=function(){var C,j,x,N,V,q,R,I,_,D,A=y.useDispatch(),M=k.useSelector((function(e){return e.currentCall})),P=M.muted,L=M.startTime,U=M.isRecording,F=M.paused,B=M.isLocalVideoEnabled,J=M.showRemoteVideoPlaceHolder,O=M.hasVideoTrackAdded,z=M.displayName,W=M.isStartingVideoCall,G=k.useSelector((function(e){return e.screenShare})),H=G.localTracks,K=G.localVideos,Q=G.role,X=G.active,Y=G.isStartingScreenShare,Z=G.isJoiningScreenShare,$=G.isLeavingScreenShare,ee=k.useSelector((function(e){return e.listen})),te=k.useSelector((function(e){return e.island})).isOpen,re=k.useSelector((function(e){return e.webrtc})),ae=re.janusInstance,ne=re.remoteAudioStream,ie=k.useSelector((function(e){return e.currentUser})),oe=t.useState(!1),le=oe[0],se=oe[1],ce=t.useState(!1),ue=ce[0],de=ce[1],pe=t.useRef(null),ve=t.useRef(null),me=t.useRef(!1),fe=t.useRef(!1),ge=t.useRef(null),he=t.useRef(null),Se=t.useRef(null),be=t.useRef(null),Ee=t.useRef(null),we=t.useRef(null),ye=t.useRef(p.default),ke=a.store.select.mediaDevices.videoInputDevices(a.store.getState()),Ce=t.useMemo((function(){var e=(null==ie?void 0:ie.conversations)||{},t=Object.values(e).find((function(e){return Object.keys(e).length>0}));return t?Object.values(t)[0]:null}),[null==ie?void 0:ie.conversations]),Te=(null===(V=null===(N=null===(x=null===(j=null===(C=null==ie?void 0:ie.profile)||void 0===C?void 0:C.macro_permissions)||void 0===j?void 0:j.settings)||void 0===x?void 0:x.permissions)||void 0===N?void 0:N.recording)||void 0===V?void 0:V.value)||!1,je=d.isRecordingControlAvailable(Ce),xe=Te&&je;s.useIsomorphicLayoutEffect((function(){A.player.updatePlayer({localScreen:he,remoteScreen:Se,localVideo:be,largeRemoteVideo:Ee,smallRemoteVideo:we})}),[]),t.useEffect((function(){return Ae(),Ne(),addEventListener("fullscreenchange",Ve),function(){removeEventListener("fullscreenchange",Ve),pe.current&&clearTimeout(pe.current)}}),[]),t.useEffect((function(){W&&(Ie(),A.currentCall.updateCurrentCall({isStartingVideoCall:!1}))}),[W]),t.useEffect((function(){Y&&(Pe(),a.store.dispatch.screenShare.update({isStartingScreenShare:!1}))}),[Y]),t.useEffect((function(){Z&&(Le(),a.store.dispatch.screenShare.update({isJoiningScreenShare:!1}))}),[Z]),t.useEffect((function(){$&&(Fe(),a.store.dispatch.screenShare.update({isLeavingScreenShare:!1}))}),[$]),t.useEffect((function(){Ae(),Ne()}),[te]);var Ne=function(){var e=a.store.getState().player.localVideo,t=a.store.getState().player.largeRemoteVideo,r=a.store.getState().player.smallRemoteVideo,n=a.store.getState().webrtc,i=n.localVideoStream,o=n.remoteVideoStream;(null==e?void 0:e.current)&&ye.current.attachMediaStream&&ye.current.attachMediaStream(e.current,i),(null==t?void 0:t.current)&&ye.current.attachMediaStream&&ye.current.attachMediaStream(t.current,o),(null==r?void 0:r.current)&&ye.current.attachMediaStream&&ye.current.attachMediaStream(r.current,o),o instanceof MediaStream&&o.getVideoTracks().length>0&&A.currentCall.updateCurrentCall({showRemoteVideoPlaceHolder:!1})},Ve=function(){se(!!document.fullscreenElement)},qe=function(){document.fullscreenElement?(document.exitFullscreen(),c.eventDispatch("phone-island-fullscreen-exited",{})):ge.current&&(ge.current.requestFullscreen(),c.eventDispatch("phone-island-fullscreen-entered",{}))};l.useEventListener("phone-island-fullscreen-enter",(function(){qe()})),l.useEventListener("phone-island-fullscreen-exit",(function(){qe()}));var Re=function(e,t){A.screenShare.update({source:e});var r=null;null==ae||ae.attach({plugin:"janus.plugin.videoroom",opaqueId:ye.current.randomString(32),success:function(t){var n,i,o,l;r=t,A.screenShare.update({remoteFeed:t}),r.remoteTracks={},r.remoteVideos=0,null===(i=(n=ye.current).log)||void 0===i||i.call(n,"Plugin attached! ("+r.getPlugin()+", id="+r.getId()+")"),null===(l=(o=ye.current).log)||void 0===l||l.call(o," -- This is a subscriber");var s={request:"join",room:a.store.getState().screenShare.room,ptype:"subscriber",feed:e};r.send({message:s})},error:function(e){var t,r;null===(r=(t=ye.current).error)||void 0===r||r.call(t,"Error attaching videoroom plugin",e)},iceState:function(e){var t,a;null===(a=(t=ye.current).log)||void 0===a||a.call(t,"ICE state (feed #"+r.rfindex+") changed to "+e)},webrtcState:function(e){var t,a;null===(a=(t=ye.current).log)||void 0===a||a.call(t,"Janus says this WebRTC PeerConnection (feed #"+r.rfindex+") is "+(e?"up":"down")+" now")},slowLink:function(e,t,r){var a,n;null===(n=(a=ye.current).warn)||void 0===n||n.call(a,"Janus reports problems "+(e?"sending":"receiving")+" packets on mid "+r+" ("+t+" lost packets)")},onmessage:function(n,i){var o,l,s,c,u,d,p,v,m,f;null===(l=(o=ye.current).debug)||void 0===l||l.call(o," ::: Got a message (listener) :::",n);var g=n.videoroom;null===(c=(s=ye.current).debug)||void 0===c||c.call(s,"Event: "+g),g&&("attached"===g?null===(d=(u=ye.current).log)||void 0===d||d.call(u,"Successfully attached to feed "+e+" ("+t+") in room "+n.room):null===(v=(p=ye.current).warn)||void 0===v||v.call(p,"Unhandled event: "+g)),i&&(null===(f=(m=ye.current).debug)||void 0===f||f.call(m,"Handling SDP as well...",i),r.createAnswer({jsep:i,tracks:[{type:"data"}],success:function(e){var t,n;null===(n=(t=ye.current).debug)||void 0===n||n.call(t,"Got SDP!",e);var i={request:"start",room:a.store.getState().screenShare.room};r.send({message:i,jsep:e})},error:function(e){var t,r;null===(r=(t=ye.current).error)||void 0===r||r.call(t,"WebRTC error:",e)}}))},onlocaltrack:function(e,t){},onremotetrack:function(e,t,n,i){var o,l,s,c,u,d,p,v;if(null===(l=(o=ye.current).debug)||void 0===l||l.call(o,"Remote track (mid="+t+") "+(n?"added":"removed")+(i?" ("+i.reason+") ":"")+":",e),"video"!==e.kind||!i||"mute"!==i.reason&&"unmute"!==i.reason){if(!n){var m=a.store.getState().screenShare.remoteScreenStream;return ye.current.stopAllTracks(m),void A.screenShare.update({active:!1})}if("video"===e.kind){var f=new MediaStream([e]);a.store.dispatch.screenShare.update({remoteScreenStream:f}),r.remoteTracks[t]=f,null===(d=(u=ye.current).log)||void 0===d||d.call(u,"Created remote video stream: "+f);var g=a.store.getState().player.remoteScreen;(null==g?void 0:g.current)&&(null===(v=(p=ye.current).attachMediaStream)||void 0===v||v.call(p,g.current,f))}}else null===(c=(s=ye.current).log)||void 0===c||c.call(s,"Ignoring mute/unmute on screen-sharing track.")},oncleanup:function(){var t,a;null===(a=(t=ye.current).log)||void 0===a||a.call(t," ::: Got a cleanup notification (remote feed "+e+") :::"),r.remoteTracks={},r.remoteVideos=0}})},Ie=function(){var e,t,r,n;if(!me.current){var i=a.store.getState().webrtc.sipcall;me.current=!0,a.store.dispatch.currentCall.updateCurrentCall({isLocalVideoEnabled:!0});var o=[],l=b.getCurrentVideoInputDeviceId(),s={type:"video",recv:!0};s.capture=!l||{deviceId:{exact:l}};var u=a.store.getState().currentCall.hasVideoTrackAdded,d=a.store.getState().webrtc.remoteVideoStream,p=null===(n=null===(r=null===(t=null===(e=null==i?void 0:i.webrtcStuff)||void 0===e?void 0:e.pc)||void 0===t?void 0:t.getTransceivers)||void 0===r?void 0:r.call(t))||void 0===n?void 0:n.find((function(e){var t,r,a,n;return"video"===(null===(r=null===(t=e.receiver)||void 0===t?void 0:t.track)||void 0===r?void 0:r.kind)||"video"===(null===(n=null===(a=e.sender)||void 0===a?void 0:a.track)||void 0===n?void 0:n.kind)}));(u||Boolean(p)||d instanceof MediaStream&&d.getVideoTracks().length>0)&&p?(s.replace=!0,p.mid&&(s.mid=p.mid),u||A.currentCall.setVideoTrackAdded(!0)):(s.add=!0,A.currentCall.setVideoTrackAdded(!0)),o.push(s),i.createOffer({tracks:o,success:function(e){var t,r,n;me.current=!1,i.send({message:{request:"update"},jsep:e}),t=a.store.getState().websocket.socket,r=a.store.getState().currentCall.username,n=a.store.getState().currentUser.username,t&&r&&n&&t.emit("message",{message:"videoCallStart",destUser:r,callUser:n}),w.dispatchVideoCallStarted({initiator:"local",callUser:a.store.getState().currentUser.username,destUser:a.store.getState().currentCall.username}),c.eventDispatch("phone-island-video-enabled",{})},error:function(e){me.current=!1,console.error("WebRTC error... "+JSON.stringify(e))}})}};l.useEventListener("phone-island-video-enable",(function(){Ie()}));var _e=function(){var t,r,n,i;if(!me.current){var o=a.store.getState().webrtc,l=o.sipcall,s=o.localVideoStream;me.current=!0;var u=null===(i=null===(n=null===(r=null===(t=null==l?void 0:l.webrtcStuff)||void 0===t?void 0:t.pc)||void 0===r?void 0:r.getTransceivers)||void 0===n?void 0:n.call(r))||void 0===i?void 0:i.find((function(e){var t,r,a,n;return"video"===(null===(r=null===(t=e.receiver)||void 0===t?void 0:t.track)||void 0===r?void 0:r.kind)||"video"===(null===(n=null===(a=e.sender)||void 0===a?void 0:a.track)||void 0===n?void 0:n.kind)}));ye.current.stopAllTracks(s),a.store.dispatch.webrtc.updateLocalVideoStream(null),a.store.dispatch.currentCall.setLocalVideoEnabled(!1);var d=[];d.push(e.__assign(e.__assign({type:"video"},(null==u?void 0:u.mid)?{mid:u.mid}:{}),{remove:!0})),l.createOffer({tracks:d,success:function(e){me.current=!1,l.send({message:{request:"update"},jsep:e}),c.eventDispatch("phone-island-video-disabled",{})},error:function(e){me.current=!1,console.error("WebRTC error... "+JSON.stringify(e))}})}};l.useEventListener("phone-island-video-disable",(function(){_e()}));var De=function(){null==ae||ae.attach({plugin:"janus.plugin.videoroom",opaqueId:ye.current.randomString(32),success:function(e){A.screenShare.update({plugin:e});var t=a.store.getState().screenShare.role;"publisher"===t?(c.eventDispatch("phone-island-screen-share-initialized",{}),setTimeout((function(){!function(){var e,t;if(ye.current.isExtensionEnabled()){var r={request:"create",description:ye.current.randomString(32),bitrate:5e5,publishers:1},n=a.store.getState().screenShare.plugin;n.send({message:r,success:function(e){var t,r,i,o,l,s,c,u;if(e.error)null===(r=(t=ye.current).error)||void 0===r||r.call(t,"Couldn't create room: "+e.error);else{var d=e.videoroom;if(null===(o=(i=ye.current).debug)||void 0===o||o.call(i,"Event: "+d),d){var p=e.room;A.screenShare.update({room:p}),null===(s=(l=ye.current).log)||void 0===s||s.call(l,"Screen sharing session created: "+p);var v=a.store.getState().currentUser.username;if(fe.current)return void(null===(u=(c=ye.current).log)||void 0===u||u.call(c,"Screen share publisher join already requested on this handle, skipping duplicate join"));fe.current=!0;var m={request:"join",room:p,ptype:"publisher",display:v};n.send({message:m})}}}})}else null===(t=(e=ye.current).error)||void 0===t||t.call(e,"This browser doesn't support screensharing (getDisplayMedia unavailable)")}()}),500)):"listener"===t&&Ue(),c.eventDispatch("phone-island-screen-share-started",{})},error:function(e){var t,r;null===(r=(t=ye.current).error)||void 0===r||r.call(t,"Error attaching videoroom plugin",e)},consentDialog:function(e){},iceState:function(e){var t,r;null===(r=(t=ye.current).log)||void 0===r||r.call(t,"ICE state changed to "+e)},mediaState:function(e,t){var r,a;null===(a=(r=ye.current).log)||void 0===a||a.call(r,"Janus "+(t?"started":"stopped")+" receiving our "+e)},webrtcState:function(e){var t,r;null===(r=(t=ye.current).log)||void 0===r||r.call(t,"Janus says our WebRTC PeerConnection is "+(e?"up":"down")+" now")},slowLink:function(e,t,r){var a,n;null===(n=(a=ye.current).warn)||void 0===n||n.call(a,"Janus reports problems "+(e?"sending":"receiving")+" packets on mid "+r+" ("+t+" lost packets)")},onmessage:function(e,t){var r,n,i,o,l,s,c,u,d,p,v,m,f,g,h,S,b,E,w,y;null===(n=(r=ye.current).debug)||void 0===n||n.call(r," ::: Got a message (publisher) :::",e);var k=a.store.getState().screenShare,C=k.plugin,T=k.role,j=e.videoroom;if(null===(o=(i=ye.current).debug)||void 0===o||o.call(i,"Event: "+j),j)if("joined"===j){if("publisher"===T)null===(s=(l=ye.current).debug)||void 0===s||s.call(l,"Negotiating WebRTC stream for our screen"),C.createOffer({tracks:[{type:"audio",capture:!0,recv:!1},{type:"screen",capture:!0,recv:!1}],success:function(e){var t,r;null===(r=(t=ye.current).debug)||void 0===r||r.call(t,"Got publisher SDP!",e);C.send({message:{request:"configure",audio:!0,video:!0},jsep:e})},error:function(e){var t,r;fe.current=!1,null===(r=(t=ye.current).error)||void 0===r||r.call(t,"WebRTC error:",e),A.screenShare.update({active:!1,role:""})}});else if(e.publishers){var x=e.publishers;for(var N in null===(u=(c=ye.current).debug)||void 0===u||u.call(c,"Got a list of available publishers/feeds:",x),x)if(!x[N].dummy){var V=x[N].id,q=x[N].display;null===(p=(d=ye.current).debug)||void 0===p||p.call(d," >> ["+V+"] "+q),Re(V,q)}}}else if("event"===j)if("listener"===T&&e.publishers){x=e.publishers;for(var N in null===(m=(v=ye.current).debug)||void 0===m||m.call(v,"Got a list of available publishers/feeds:",x),x)if(!x[N].dummy){V=x[N].id,q=x[N].display;null===(g=(f=ye.current).debug)||void 0===g||g.call(f," >> ["+V+"] "+q),Re(V,q)}}else if(e.leaving){var R=e.leaving;null===(S=(h=ye.current).log)||void 0===S||S.call(h,"Publisher left: "+R)}else e.error&&(null===(E=(b=ye.current).error)||void 0===E||E.call(b,"Error event: "+e.error));t&&(null===(y=(w=ye.current).debug)||void 0===y||y.call(w,"Handling SDP as well...",t),C.handleRemoteJsep({jsep:t}))},onlocaltrack:function(e,t){var r,n,i,o,l,s;null===(n=(r=ye.current).debug)||void 0===n||n.call(r,"Local track "+(t?"added":"removed")+":",e);var c=e.id.replace(/[{}]/g,"");if(t){if(!(null==H?void 0:H[c])){if("video"===e.kind){A.screenShare.update({localVideos:K+1});var u=new MediaStream([e]);a.store.dispatch.screenShare.update({localScreenStream:u}),null===(o=(i=ye.current).log)||void 0===o||o.call(i,"Created local stream: "+u);var d=a.store.getState().player.localScreen;(null==d?void 0:d.current)&&(null===(s=(l=ye.current).attachMediaStream)||void 0===s||s.call(l,d.current,u),Me(),e.addEventListener("ended",(function(){Je()})))}var p=a.store.getState().screenShare.plugin;"completed"!==p.webrtcStuff.pc.iceConnectionState&&p.webrtcStuff.pc.iceConnectionState}}else{var v=null==H?void 0:H[c];if(v)try{var m=v.getTracks();for(var f in m){var g=m[f];g&&g.stop()}}catch(e){}"video"===e.kind&&A.screenShare.update({localVideos:K-1});var h=null==H?void 0:H.filter((function(e){return e!==H[c]}));A.screenShare.update({localTracks:h})}},onremotetrack:function(e,t,r){},oncleanup:function(){var e,t;null===(t=(e=ye.current).log)||void 0===t||t.call(e," ::: Got a cleanup notification :::"),fe.current=!1,A.screenShare.update({localTracks:{},localVideos:0})}})},Ae=function(){var e=a.store.getState().player.localScreen,t=a.store.getState().player.remoteScreen,r=a.store.getState().screenShare,n=r.localScreenStream,i=r.remoteScreenStream;(null==e?void 0:e.current)&&ye.current.attachMediaStream&&ye.current.attachMediaStream(e.current,n),(null==t?void 0:t.current)&&ye.current.attachMediaStream&&ye.current.attachMediaStream(t.current,i)},Me=function(){var e=a.store.getState().websocket.socket,t=a.store.getState().currentCall.username,r=a.store.getState().screenShare.room,n=a.store.getState().currentUser.username;e.emit("message",{message:"screenSharingStart",roomId:r,destUser:t,callUser:n})},Pe=function(){fe.current=!1,A.screenShare.update({active:!0,role:"publisher"}),De()};l.useEventListener("phone-island-screen-share-start",(function(){Pe()}));var Le=function(){A.screenShare.update({active:!0,role:"listener"}),De(),c.eventDispatch("phone-island-screen-share-joined",{})},Ue=function(){var e={request:"join",room:a.store.getState().screenShare.room,ptype:"publisher",display:a.store.getState().currentUser.username};a.store.getState().screenShare.plugin.send({message:e})},Fe=function(){var e=a.store.getState().screenShare.remoteScreenStream;ye.current.stopAllTracks(e),A.screenShare.update({active:!1}),c.eventDispatch("phone-island-screen-share-left",{})},Be=function(){de(!0),pe.current&&(clearTimeout(pe.current),pe.current=null),ve.current&&clearTimeout(ve.current),ve.current=setTimeout((function(){pe.current=setTimeout((function(){de(!1)}),3e3)}),100)},Je=function(){var e=a.store.getState().screenShare,t=e.plugin,r=e.localScreenStream;fe.current=!1,ye.current.stopAllTracks(r),A.screenShare.update({active:!1}),t.detach();var n=a.store.getState().websocket.socket,i=a.store.getState().currentCall.username,o=a.store.getState().screenShare.room,l=a.store.getState().currentUser.username;n.emit("message",{message:"screenSharingStop",roomId:o,destUser:i,callUser:l}),c.eventDispatch("phone-island-screen-share-stopped",{})};l.useEventListener("phone-island-screen-share-stop",(function(){Je()}));var Oe=t.useState(!0),ze=Oe[0],We=Oe[1],Ge=function(){return e.__awaiter(void 0,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return(null==ke?void 0:ke.length)>0?[4,b.checkWebCamPermission()]:[3,2];case 1:return e.sent()?(We(!0),[2,!0]):(We(!1),[2,!1]);case 2:return We(!1),[2,!1];case 3:return[2]}}))}))};return T.default.createElement(T.default.Fragment,null,te?T.default.createElement("div",{ref:ge,onMouseMove:function(){return Be()},className:le?"pi-h-screen":"pi-h-[480px] pi-w-[600px]"},T.default.createElement("div",{className:"pi-flex pi-relative pi-justify-center pi-w-full pi-h-full"},T.default.createElement("video",{autoPlay:!0,muted:!0,ref:Se,className:"pi-rounded-2xl pi-w-full pi-h-full ".concat(X&&"listener"===Q?"":"pi-hidden")}),T.default.createElement("video",{autoPlay:!0,muted:!0,ref:he,className:"pi-rounded-2xl pi-w-full pi-h-full ".concat(X&&"publisher"===Q?"":"pi-hidden")}),T.default.createElement("video",{autoPlay:!0,muted:!0,ref:Ee,className:"pi-rounded-2xl ".concat(X||J?"pi-hidden":"")}),T.default.createElement("div",{className:"pi-w-full pi-bg-gray-200 dark:pi-bg-gray-800 pi-flex pi-items-center pi-justify-center ".concat(X||!J?"pi-hidden":"")},T.default.createElement("div",{className:"pi-rounded-full pi-bg-gray-700 dark:pi-bg-gray-200 pi-w-32 pi-h-32 pi-flex pi-items-center pi-justify-center"},T.default.createElement("span",{className:"pi-text-4xl pi-text-gray-50 dark:pi-text-gray-900"},E.getInitials(z)))),T.default.createElement("video",{muted:!0,autoPlay:!0,ref:be,className:"pi-max-w-32 pi-max-h-32 pi-absolute pi-top-5 pi-right-5 pi-rounded-lg ".concat(B?"":"pi-hidden")}),T.default.createElement("div",{className:"pi-w-32 pi-h-24 pi-absolute pi-top-5 pi-right-5 pi-rounded-lg pi-bg-gray-200 dark:pi-bg-gray-900 pi-flex pi-items-center pi-justify-center ".concat(B||!O?"pi-hidden":"")},T.default.createElement("div",{className:"pi-rounded-full pi-bg-gray-700 dark:pi-bg-gray-200 pi-w-12 pi-h-12 pi-flex pi-items-center pi-justify-center"},T.default.createElement("span",{className:"pi-text-base pi-text-gray-50 dark:pi-text-gray-900"},E.getInitials(ie.name||"-")))),T.default.createElement("video",{muted:!0,autoPlay:!0,ref:we,className:"pi-max-w-32 pi-max-h-32 pi-absolute pi-top-32 pi-right-5 pi-rounded-lg ".concat(!X||J?"pi-hidden":"")}),T.default.createElement("div",{className:"pi-w-32 pi-h-24 pi-absolute pi-top-32 pi-right-5 pi-rounded-lg pi-bg-gray-200 dark:pi-bg-gray-900 pi-flex pi-items-center pi-justify-center ".concat(X&&J&&O?"":"pi-hidden")},T.default.createElement("div",{className:"pi-rounded-full pi-bg-gray-700 dark:pi-bg-gray-200 pi-w-12 pi-h-12 pi-flex pi-items-center pi-justify-center"},T.default.createElement("span",{className:"pi-text-base pi-text-gray-50 dark:pi-text-gray-900"},E.getInitials(z))))),T.default.createElement("div",{className:"".concat(!ue&&"pi-opacity-0 pi-pointer-events-none"," pi-absolute pi-bottom-0 pi-bg-gray-950/65 pi-w-full pi-p-6 pi-rounded-bl-[20px] pi-rounded-br-[20px] pi-transition-all")},T.default.createElement("div",{className:"pi-flex pi-items-center pi-justify-center pi-gap-6 pi-mb-5"},!(null==ee?void 0:ee.isListen)&&T.default.createElement(r.Button,{variant:"default",active:!!P,onClick:function(){return P?d.unmuteCurrentCall():d.muteCurrentCall()},"data-tooltip-id":"tooltip-mute","data-tooltip-content":"".concat(P?o.t("Tooltip.Unmute"):o.t("Tooltip.Mute"))},P?T.default.createElement(n.FontAwesomeIcon,{className:"pi-h-6 pi-w-6",icon:i.faMicrophoneSlash}):T.default.createElement(n.FontAwesomeIcon,{className:"pi-h-6 pi-w-6",icon:i.faMicrophone})),(null==ke?void 0:ke.length)>0&&T.default.createElement(r.Button,{variant:"default",onClick:function(){return e.__awaiter(void 0,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,Ge()];case 1:return e.sent()&&(B?_e():Ie()),[2]}}))}))},"data-tooltip-id":"tooltip-toggle-video","data-tooltip-content":"".concat(ze?B?o.t("Tooltip.Disable camera"):o.t("Tooltip.Enable camera"):o.t("Tooltip.Enable camera permission")||""),disabled:!ze,className:"".concat(ze?"":"pi-cursor-auto")},T.default.createElement(n.FontAwesomeIcon,{className:"pi-h-6 pi-w-6",icon:B?i.faVideoSlash:i.faVideo})),"safari"!==ye.current.webRTCAdapter.browserDetails.browser&&(null===(D=null===(_=null===(I=null===(R=null===(q=null==ie?void 0:ie.profile)||void 0===q?void 0:q.macro_permissions)||void 0===R?void 0:R.nethvoice_cti)||void 0===I?void 0:I.permissions)||void 0===_?void 0:_.screen_sharing)||void 0===D?void 0:D.value)&&!X&&T.default.createElement(r.Button,{variant:"default",onClick:function(){return Pe()},"data-tooltip-id":"tooltip-start-screen-share","data-tooltip-content":o.t("Tooltip.Share screen")||""},T.default.createElement(n.FontAwesomeIcon,{className:"pi-h-6 pi-w-6",icon:i.faDisplay})),X&&"publisher"===Q&&T.default.createElement(r.Button,{variant:"default",onClick:function(){return Je()},"data-tooltip-id":"tooltip-stop-screen-share","data-tooltip-content":o.t("Tooltip.Stop sharing")},T.default.createElement(n.FontAwesomeIcon,{className:"pi-h-6 pi-w-6",icon:S.faDisplaySlash})),X&&"listener"===Q&&T.default.createElement(r.Button,{variant:"default",onClick:function(){return qe()},"data-tooltip-id":"tooltip-toggle-fullscreen","data-tooltip-content":le?o.t("Tooltip.Exit fullscreen"):o.t("Tooltip.Enter fullscreen")},T.default.createElement(n.FontAwesomeIcon,{className:"pi-h-6 pi-w-6",icon:le?i.faCompress:i.faExpand})),xe&&T.default.createElement(r.Button,{variant:"default",onClick:function(){return d.recordCurrentCall(U)},"data-tooltip-id":"tooltip-record-video-view","data-tooltip-content":U?o.t("Tooltip.Stop recording"):o.t("Tooltip.Record")},T.default.createElement(n.FontAwesomeIcon,{className:"pi-h-6 pi-w-6",icon:U?i.faStop:S.faRecord})),!((null==ee?void 0:ee.isIntrude)||(null==ee?void 0:ee.isListen))&&T.default.createElement(r.Button,{variant:"default",onClick:function(){return F?d.unpauseCurrentCall():(d.pauseCurrentCall(),void Je())},"data-tooltip-id":"tooltip-pause-video-view","data-tooltip-content":F?o.t("Tooltip.Play"):o.t("Tooltip.Pause")},T.default.createElement(n.FontAwesomeIcon,{className:"pi-h-6 pi-w-6",icon:F?i.faPlay:i.faPause}))),T.default.createElement(u.default,{buttonsVariant:"default"})),T.default.createElement(h.CustomThemedTooltip,{className:"pi-z-20",id:"tooltip-mute-video-view",place:"bottom"}),T.default.createElement(h.CustomThemedTooltip,{className:"pi-z-20",id:"tooltip-toggle-video",place:"bottom"}),T.default.createElement(h.CustomThemedTooltip,{className:"pi-z-20",id:"tooltip-toggle-fullscreen",place:"bottom"}),T.default.createElement(h.CustomThemedTooltip,{className:"pi-z-20",id:"tooltip-start-screen-share",place:"bottom"}),T.default.createElement(h.CustomThemedTooltip,{className:"pi-z-20",id:"tooltip-stop-screen-share",place:"bottom"}),T.default.createElement(h.CustomThemedTooltip,{className:"pi-z-20",id:"tooltip-record-video-view",place:"bottom"}),T.default.createElement(h.CustomThemedTooltip,{className:"pi-z-20",id:"tooltip-pause-video-view",place:"bottom"})):T.default.createElement(T.default.Fragment,null,T.default.createElement("div",{className:"pi-flex pi-justify-between pi-items-center"},T.default.createElement(v.default,null),T.default.createElement(m.default,{startTime:L,isNotAlwaysWhite:!0}),!te&&ne&&!f.isPhysical()&&T.default.createElement(g.AudioBars,{audioStream:ne,paused:F,size:te?"large":"small"}))))};exports.VideoView=j,exports.default=j;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../node_modules/tslib/tslib.es6.js"),t=require("react"),r=require("../Button.js");require("../../node_modules/react-redux/es/index.js");var a=require("../../store/index.js"),n=require("../../node_modules/@fortawesome/react-fontawesome/index.es.js"),i=require("../../node_modules/@fortawesome/free-solid-svg-icons/index.mjs.js"),o=require("../../node_modules/i18next/dist/esm/i18next.js"),l=require("../../utils/customHooks/useEventListener.js"),s=require("../../utils/customHooks/useIsomorphicLayoutEffect.js"),c=require("../../utils/genericFunctions/eventDispatch.js"),u=require("../Hangup.js"),d=require("../../lib/phone/call.js"),p=require("../../lib/webrtc/janus.js"),v=require("../CallView/Avatar.js"),m=require("../CallView/Timer.js"),f=require("../../lib/user/default_device.js"),g=require("../AudioBars.js"),h=require("../CustomThemedTooltip.js"),S=require("../../node_modules/@nethesis/nethesis-solid-svg-icons/index.mjs.js"),b=require("../../lib/devices/devices.js"),E=require("../../lib/avatars/avatars.js"),w=require("../../events/SocketEvents.js"),y=require("../../node_modules/react-redux/es/hooks/useDispatch.js"),k=require("../../node_modules/react-redux/es/hooks/useSelector.js");function C(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var T=C(t),j=function(){var C,j,x,N,V,q,R,I,_,D,P=y.useDispatch(),A=k.useSelector((function(e){return e.currentCall})),L=A.muted,M=A.startTime,U=A.isRecording,F=A.paused,B=A.isLocalVideoEnabled,J=A.showRemoteVideoPlaceHolder,z=A.hasVideoTrackAdded,W=A.displayName,G=A.isStartingVideoCall,H=k.useSelector((function(e){return e.screenShare})),O=H.localTracks,K=H.localVideos,Q=H.role,X=H.active,Y=H.isStartingScreenShare,Z=H.isJoiningScreenShare,$=H.isLeavingScreenShare,ee=k.useSelector((function(e){return e.listen})),te=k.useSelector((function(e){return e.island})).isOpen,re=k.useSelector((function(e){return e.webrtc})),ae=re.janusInstance,ne=re.remoteAudioStream,ie=a.store.getState().currentUser,oe=t.useState(!1),le=oe[0],se=oe[1],ce=t.useState(!1),ue=ce[0],de=ce[1],pe=t.useRef(null),ve=t.useRef(null),me=t.useRef(!1),fe=t.useRef(!1),ge=t.useRef(null),he=t.useRef(null),Se=t.useRef(null),be=t.useRef(null),Ee=t.useRef(null),we=t.useRef(null),ye=t.useRef(p.default),ke=a.store.select.mediaDevices.videoInputDevices(a.store.getState());s.useIsomorphicLayoutEffect((function(){P.player.updatePlayer({localScreen:he,remoteScreen:Se,localVideo:be,largeRemoteVideo:Ee,smallRemoteVideo:we})}),[]),t.useEffect((function(){return Re(),Ce(),addEventListener("fullscreenchange",Te),function(){removeEventListener("fullscreenchange",Te),pe.current&&clearTimeout(pe.current)}}),[]),t.useEffect((function(){G&&(Ne(),P.currentCall.updateCurrentCall({isStartingVideoCall:!1}))}),[G]),t.useEffect((function(){Y&&(_e(),a.store.dispatch.screenShare.update({isStartingScreenShare:!1}))}),[Y]),t.useEffect((function(){Z&&(De(),a.store.dispatch.screenShare.update({isJoiningScreenShare:!1}))}),[Z]),t.useEffect((function(){$&&(Ae(),a.store.dispatch.screenShare.update({isLeavingScreenShare:!1}))}),[$]),t.useEffect((function(){Re(),Ce()}),[te]);var Ce=function(){var e=a.store.getState().player.localVideo,t=a.store.getState().player.largeRemoteVideo,r=a.store.getState().player.smallRemoteVideo,n=a.store.getState().webrtc,i=n.localVideoStream,o=n.remoteVideoStream;(null==e?void 0:e.current)&&ye.current.attachMediaStream&&ye.current.attachMediaStream(e.current,i),(null==t?void 0:t.current)&&ye.current.attachMediaStream&&ye.current.attachMediaStream(t.current,o),(null==r?void 0:r.current)&&ye.current.attachMediaStream&&ye.current.attachMediaStream(r.current,o),o instanceof MediaStream&&o.getVideoTracks().length>0&&P.currentCall.updateCurrentCall({showRemoteVideoPlaceHolder:!1})},Te=function(){se(!!document.fullscreenElement)},je=function(){document.fullscreenElement?(document.exitFullscreen(),c.eventDispatch("phone-island-fullscreen-exited",{})):ge.current&&(ge.current.requestFullscreen(),c.eventDispatch("phone-island-fullscreen-entered",{}))};l.useEventListener("phone-island-fullscreen-enter",(function(){je()})),l.useEventListener("phone-island-fullscreen-exit",(function(){je()}));var xe=function(e,t){P.screenShare.update({source:e});var r=null;null==ae||ae.attach({plugin:"janus.plugin.videoroom",opaqueId:ye.current.randomString(32),success:function(t){var n,i,o,l;r=t,P.screenShare.update({remoteFeed:t}),r.remoteTracks={},r.remoteVideos=0,null===(i=(n=ye.current).log)||void 0===i||i.call(n,"Plugin attached! ("+r.getPlugin()+", id="+r.getId()+")"),null===(l=(o=ye.current).log)||void 0===l||l.call(o," -- This is a subscriber");var s={request:"join",room:a.store.getState().screenShare.room,ptype:"subscriber",feed:e};r.send({message:s})},error:function(e){var t,r;null===(r=(t=ye.current).error)||void 0===r||r.call(t,"Error attaching videoroom plugin",e)},iceState:function(e){var t,a;null===(a=(t=ye.current).log)||void 0===a||a.call(t,"ICE state (feed #"+r.rfindex+") changed to "+e)},webrtcState:function(e){var t,a;null===(a=(t=ye.current).log)||void 0===a||a.call(t,"Janus says this WebRTC PeerConnection (feed #"+r.rfindex+") is "+(e?"up":"down")+" now")},slowLink:function(e,t,r){var a,n;null===(n=(a=ye.current).warn)||void 0===n||n.call(a,"Janus reports problems "+(e?"sending":"receiving")+" packets on mid "+r+" ("+t+" lost packets)")},onmessage:function(n,i){var o,l,s,c,u,d,p,v,m,f;null===(l=(o=ye.current).debug)||void 0===l||l.call(o," ::: Got a message (listener) :::",n);var g=n.videoroom;null===(c=(s=ye.current).debug)||void 0===c||c.call(s,"Event: "+g),g&&("attached"===g?null===(d=(u=ye.current).log)||void 0===d||d.call(u,"Successfully attached to feed "+e+" ("+t+") in room "+n.room):null===(v=(p=ye.current).warn)||void 0===v||v.call(p,"Unhandled event: "+g)),i&&(null===(f=(m=ye.current).debug)||void 0===f||f.call(m,"Handling SDP as well...",i),r.createAnswer({jsep:i,tracks:[{type:"data"}],success:function(e){var t,n;null===(n=(t=ye.current).debug)||void 0===n||n.call(t,"Got SDP!",e);var i={request:"start",room:a.store.getState().screenShare.room};r.send({message:i,jsep:e})},error:function(e){var t,r;null===(r=(t=ye.current).error)||void 0===r||r.call(t,"WebRTC error:",e)}}))},onlocaltrack:function(e,t){},onremotetrack:function(e,t,n,i){var o,l,s,c,u,d,p,v;if(null===(l=(o=ye.current).debug)||void 0===l||l.call(o,"Remote track (mid="+t+") "+(n?"added":"removed")+(i?" ("+i.reason+") ":"")+":",e),"video"!==e.kind||!i||"mute"!==i.reason&&"unmute"!==i.reason){if(!n){var m=a.store.getState().screenShare.remoteScreenStream;return ye.current.stopAllTracks(m),void P.screenShare.update({active:!1})}if("video"===e.kind){var f=new MediaStream([e]);a.store.dispatch.screenShare.update({remoteScreenStream:f}),r.remoteTracks[t]=f,null===(d=(u=ye.current).log)||void 0===d||d.call(u,"Created remote video stream: "+f);var g=a.store.getState().player.remoteScreen;(null==g?void 0:g.current)&&(null===(v=(p=ye.current).attachMediaStream)||void 0===v||v.call(p,g.current,f))}}else null===(c=(s=ye.current).log)||void 0===c||c.call(s,"Ignoring mute/unmute on screen-sharing track.")},oncleanup:function(){var t,a;null===(a=(t=ye.current).log)||void 0===a||a.call(t," ::: Got a cleanup notification (remote feed "+e+") :::"),r.remoteTracks={},r.remoteVideos=0}})},Ne=function(){var e,t,r,n;if(!me.current){var i=a.store.getState().webrtc.sipcall;me.current=!0,a.store.dispatch.currentCall.updateCurrentCall({isLocalVideoEnabled:!0});var o=[],l=b.getCurrentVideoInputDeviceId(),s={type:"video",recv:!0};s.capture=!l||{deviceId:{exact:l}};var u=a.store.getState().currentCall.hasVideoTrackAdded,d=a.store.getState().webrtc.remoteVideoStream,p=null===(n=null===(r=null===(t=null===(e=null==i?void 0:i.webrtcStuff)||void 0===e?void 0:e.pc)||void 0===t?void 0:t.getTransceivers)||void 0===r?void 0:r.call(t))||void 0===n?void 0:n.find((function(e){var t,r,a,n;return"video"===(null===(r=null===(t=e.receiver)||void 0===t?void 0:t.track)||void 0===r?void 0:r.kind)||"video"===(null===(n=null===(a=e.sender)||void 0===a?void 0:a.track)||void 0===n?void 0:n.kind)}));(u||Boolean(p)||d instanceof MediaStream&&d.getVideoTracks().length>0)&&p?(s.replace=!0,p.mid&&(s.mid=p.mid),u||P.currentCall.setVideoTrackAdded(!0)):(s.add=!0,P.currentCall.setVideoTrackAdded(!0)),o.push(s),i.createOffer({tracks:o,success:function(e){var t,r,n;me.current=!1,i.send({message:{request:"update"},jsep:e}),t=a.store.getState().websocket.socket,r=a.store.getState().currentCall.username,n=a.store.getState().currentUser.username,t&&r&&n&&t.emit("message",{message:"videoCallStart",destUser:r,callUser:n}),w.dispatchVideoCallStarted({initiator:"local",callUser:a.store.getState().currentUser.username,destUser:a.store.getState().currentCall.username}),c.eventDispatch("phone-island-video-enabled",{})},error:function(e){me.current=!1,console.error("WebRTC error... "+JSON.stringify(e))}})}};l.useEventListener("phone-island-video-enable",(function(){Ne()}));var Ve=function(){var t,r,n,i;if(!me.current){var o=a.store.getState().webrtc,l=o.sipcall,s=o.localVideoStream;me.current=!0;var u=null===(i=null===(n=null===(r=null===(t=null==l?void 0:l.webrtcStuff)||void 0===t?void 0:t.pc)||void 0===r?void 0:r.getTransceivers)||void 0===n?void 0:n.call(r))||void 0===i?void 0:i.find((function(e){var t,r,a,n;return"video"===(null===(r=null===(t=e.receiver)||void 0===t?void 0:t.track)||void 0===r?void 0:r.kind)||"video"===(null===(n=null===(a=e.sender)||void 0===a?void 0:a.track)||void 0===n?void 0:n.kind)}));ye.current.stopAllTracks(s),a.store.dispatch.webrtc.updateLocalVideoStream(null),a.store.dispatch.currentCall.setLocalVideoEnabled(!1);var d=[];d.push(e.__assign(e.__assign({type:"video"},(null==u?void 0:u.mid)?{mid:u.mid}:{}),{remove:!0})),l.createOffer({tracks:d,success:function(e){me.current=!1,l.send({message:{request:"update"},jsep:e}),c.eventDispatch("phone-island-video-disabled",{})},error:function(e){me.current=!1,console.error("WebRTC error... "+JSON.stringify(e))}})}};l.useEventListener("phone-island-video-disable",(function(){Ve()}));var qe=function(){null==ae||ae.attach({plugin:"janus.plugin.videoroom",opaqueId:ye.current.randomString(32),success:function(e){P.screenShare.update({plugin:e});var t=a.store.getState().screenShare.role;"publisher"===t?(c.eventDispatch("phone-island-screen-share-initialized",{}),setTimeout((function(){!function(){var e,t;if(ye.current.isExtensionEnabled()){var r={request:"create",description:ye.current.randomString(32),bitrate:5e5,publishers:1},n=a.store.getState().screenShare.plugin;n.send({message:r,success:function(e){var t,r,i,o,l,s,c,u;if(e.error)null===(r=(t=ye.current).error)||void 0===r||r.call(t,"Couldn't create room: "+e.error);else{var d=e.videoroom;if(null===(o=(i=ye.current).debug)||void 0===o||o.call(i,"Event: "+d),d){var p=e.room;P.screenShare.update({room:p}),null===(s=(l=ye.current).log)||void 0===s||s.call(l,"Screen sharing session created: "+p);var v=a.store.getState().currentUser.username;if(fe.current)return void(null===(u=(c=ye.current).log)||void 0===u||u.call(c,"Screen share publisher join already requested on this handle, skipping duplicate join"));fe.current=!0;var m={request:"join",room:p,ptype:"publisher",display:v};n.send({message:m})}}}})}else null===(t=(e=ye.current).error)||void 0===t||t.call(e,"This browser doesn't support screensharing (getDisplayMedia unavailable)")}()}),500)):"listener"===t&&Pe(),c.eventDispatch("phone-island-screen-share-started",{})},error:function(e){var t,r;null===(r=(t=ye.current).error)||void 0===r||r.call(t,"Error attaching videoroom plugin",e)},consentDialog:function(e){},iceState:function(e){var t,r;null===(r=(t=ye.current).log)||void 0===r||r.call(t,"ICE state changed to "+e)},mediaState:function(e,t){var r,a;null===(a=(r=ye.current).log)||void 0===a||a.call(r,"Janus "+(t?"started":"stopped")+" receiving our "+e)},webrtcState:function(e){var t,r;null===(r=(t=ye.current).log)||void 0===r||r.call(t,"Janus says our WebRTC PeerConnection is "+(e?"up":"down")+" now")},slowLink:function(e,t,r){var a,n;null===(n=(a=ye.current).warn)||void 0===n||n.call(a,"Janus reports problems "+(e?"sending":"receiving")+" packets on mid "+r+" ("+t+" lost packets)")},onmessage:function(e,t){var r,n,i,o,l,s,c,u,d,p,v,m,f,g,h,S,b,E,w,y;null===(n=(r=ye.current).debug)||void 0===n||n.call(r," ::: Got a message (publisher) :::",e);var k=a.store.getState().screenShare,C=k.plugin,T=k.role,j=e.videoroom;if(null===(o=(i=ye.current).debug)||void 0===o||o.call(i,"Event: "+j),j)if("joined"===j){if("publisher"===T)null===(s=(l=ye.current).debug)||void 0===s||s.call(l,"Negotiating WebRTC stream for our screen"),C.createOffer({tracks:[{type:"audio",capture:!0,recv:!1},{type:"screen",capture:!0,recv:!1}],success:function(e){var t,r;null===(r=(t=ye.current).debug)||void 0===r||r.call(t,"Got publisher SDP!",e);C.send({message:{request:"configure",audio:!0,video:!0},jsep:e})},error:function(e){var t,r;fe.current=!1,null===(r=(t=ye.current).error)||void 0===r||r.call(t,"WebRTC error:",e),P.screenShare.update({active:!1,role:""})}});else if(e.publishers){var x=e.publishers;for(var N in null===(u=(c=ye.current).debug)||void 0===u||u.call(c,"Got a list of available publishers/feeds:",x),x)if(!x[N].dummy){var V=x[N].id,q=x[N].display;null===(p=(d=ye.current).debug)||void 0===p||p.call(d," >> ["+V+"] "+q),xe(V,q)}}}else if("event"===j)if("listener"===T&&e.publishers){x=e.publishers;for(var N in null===(m=(v=ye.current).debug)||void 0===m||m.call(v,"Got a list of available publishers/feeds:",x),x)if(!x[N].dummy){V=x[N].id,q=x[N].display;null===(g=(f=ye.current).debug)||void 0===g||g.call(f," >> ["+V+"] "+q),xe(V,q)}}else if(e.leaving){var R=e.leaving;null===(S=(h=ye.current).log)||void 0===S||S.call(h,"Publisher left: "+R)}else e.error&&(null===(E=(b=ye.current).error)||void 0===E||E.call(b,"Error event: "+e.error));t&&(null===(y=(w=ye.current).debug)||void 0===y||y.call(w,"Handling SDP as well...",t),C.handleRemoteJsep({jsep:t}))},onlocaltrack:function(e,t){var r,n,i,o,l,s;null===(n=(r=ye.current).debug)||void 0===n||n.call(r,"Local track "+(t?"added":"removed")+":",e);var c=e.id.replace(/[{}]/g,"");if(t){if(!(null==O?void 0:O[c])){if("video"===e.kind){P.screenShare.update({localVideos:K+1});var u=new MediaStream([e]);a.store.dispatch.screenShare.update({localScreenStream:u}),null===(o=(i=ye.current).log)||void 0===o||o.call(i,"Created local stream: "+u);var d=a.store.getState().player.localScreen;(null==d?void 0:d.current)&&(null===(s=(l=ye.current).attachMediaStream)||void 0===s||s.call(l,d.current,u),Ie(),e.addEventListener("ended",(function(){Me()})))}var p=a.store.getState().screenShare.plugin;"completed"!==p.webrtcStuff.pc.iceConnectionState&&p.webrtcStuff.pc.iceConnectionState}}else{var v=null==O?void 0:O[c];if(v)try{var m=v.getTracks();for(var f in m){var g=m[f];g&&g.stop()}}catch(e){}"video"===e.kind&&P.screenShare.update({localVideos:K-1});var h=null==O?void 0:O.filter((function(e){return e!==O[c]}));P.screenShare.update({localTracks:h})}},onremotetrack:function(e,t,r){},oncleanup:function(){var e,t;null===(t=(e=ye.current).log)||void 0===t||t.call(e," ::: Got a cleanup notification :::"),fe.current=!1,P.screenShare.update({localTracks:{},localVideos:0})}})},Re=function(){var e=a.store.getState().player.localScreen,t=a.store.getState().player.remoteScreen,r=a.store.getState().screenShare,n=r.localScreenStream,i=r.remoteScreenStream;(null==e?void 0:e.current)&&ye.current.attachMediaStream&&ye.current.attachMediaStream(e.current,n),(null==t?void 0:t.current)&&ye.current.attachMediaStream&&ye.current.attachMediaStream(t.current,i)},Ie=function(){var e=a.store.getState().websocket.socket,t=a.store.getState().currentCall.username,r=a.store.getState().screenShare.room,n=a.store.getState().currentUser.username;e.emit("message",{message:"screenSharingStart",roomId:r,destUser:t,callUser:n})},_e=function(){fe.current=!1,P.screenShare.update({active:!0,role:"publisher"}),qe()};l.useEventListener("phone-island-screen-share-start",(function(){_e()}));var De=function(){P.screenShare.update({active:!0,role:"listener"}),qe(),c.eventDispatch("phone-island-screen-share-joined",{})},Pe=function(){var e={request:"join",room:a.store.getState().screenShare.room,ptype:"publisher",display:a.store.getState().currentUser.username};a.store.getState().screenShare.plugin.send({message:e})},Ae=function(){var e=a.store.getState().screenShare.remoteScreenStream;ye.current.stopAllTracks(e),P.screenShare.update({active:!1}),c.eventDispatch("phone-island-screen-share-left",{})},Le=function(){de(!0),pe.current&&(clearTimeout(pe.current),pe.current=null),ve.current&&clearTimeout(ve.current),ve.current=setTimeout((function(){pe.current=setTimeout((function(){de(!1)}),3e3)}),100)},Me=function(){var e=a.store.getState().screenShare,t=e.plugin,r=e.localScreenStream;fe.current=!1,ye.current.stopAllTracks(r),P.screenShare.update({active:!1}),t.detach();var n=a.store.getState().websocket.socket,i=a.store.getState().currentCall.username,o=a.store.getState().screenShare.room,l=a.store.getState().currentUser.username;n.emit("message",{message:"screenSharingStop",roomId:o,destUser:i,callUser:l}),c.eventDispatch("phone-island-screen-share-stopped",{})};l.useEventListener("phone-island-screen-share-stop",(function(){Me()}));var Ue=t.useState(!0),Fe=Ue[0],Be=Ue[1],Je=function(){return e.__awaiter(void 0,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return(null==ke?void 0:ke.length)>0?[4,b.checkWebCamPermission()]:[3,2];case 1:return e.sent()?(Be(!0),[2,!0]):(Be(!1),[2,!1]);case 2:return Be(!1),[2,!1];case 3:return[2]}}))}))};return T.default.createElement(T.default.Fragment,null,te?T.default.createElement("div",{ref:ge,onMouseMove:function(){return Le()},className:le?"pi-h-screen":"pi-h-[480px] pi-w-[600px]"},T.default.createElement("div",{className:"pi-flex pi-relative pi-justify-center pi-w-full pi-h-full"},T.default.createElement("video",{autoPlay:!0,muted:!0,ref:Se,className:"pi-rounded-2xl pi-w-full pi-h-full ".concat(X&&"listener"===Q?"":"pi-hidden")}),T.default.createElement("video",{autoPlay:!0,muted:!0,ref:he,className:"pi-rounded-2xl pi-w-full pi-h-full ".concat(X&&"publisher"===Q?"":"pi-hidden")}),T.default.createElement("video",{autoPlay:!0,muted:!0,ref:Ee,className:"pi-rounded-2xl ".concat(X||J?"pi-hidden":"")}),T.default.createElement("div",{className:"pi-w-full pi-bg-gray-200 dark:pi-bg-gray-800 pi-flex pi-items-center pi-justify-center ".concat(X||!J?"pi-hidden":"")},T.default.createElement("div",{className:"pi-rounded-full pi-bg-gray-700 dark:pi-bg-gray-200 pi-w-32 pi-h-32 pi-flex pi-items-center pi-justify-center"},T.default.createElement("span",{className:"pi-text-4xl pi-text-gray-50 dark:pi-text-gray-900"},E.getInitials(W)))),T.default.createElement("video",{muted:!0,autoPlay:!0,ref:be,className:"pi-max-w-32 pi-max-h-32 pi-absolute pi-top-5 pi-right-5 pi-rounded-lg ".concat(B?"":"pi-hidden")}),T.default.createElement("div",{className:"pi-w-32 pi-h-24 pi-absolute pi-top-5 pi-right-5 pi-rounded-lg pi-bg-gray-200 dark:pi-bg-gray-900 pi-flex pi-items-center pi-justify-center ".concat(B||!z?"pi-hidden":"")},T.default.createElement("div",{className:"pi-rounded-full pi-bg-gray-700 dark:pi-bg-gray-200 pi-w-12 pi-h-12 pi-flex pi-items-center pi-justify-center"},T.default.createElement("span",{className:"pi-text-base pi-text-gray-50 dark:pi-text-gray-900"},E.getInitials(ie.name||"-")))),T.default.createElement("video",{muted:!0,autoPlay:!0,ref:we,className:"pi-max-w-32 pi-max-h-32 pi-absolute pi-top-32 pi-right-5 pi-rounded-lg ".concat(!X||J?"pi-hidden":"")}),T.default.createElement("div",{className:"pi-w-32 pi-h-24 pi-absolute pi-top-32 pi-right-5 pi-rounded-lg pi-bg-gray-200 dark:pi-bg-gray-900 pi-flex pi-items-center pi-justify-center ".concat(X&&J&&z?"":"pi-hidden")},T.default.createElement("div",{className:"pi-rounded-full pi-bg-gray-700 dark:pi-bg-gray-200 pi-w-12 pi-h-12 pi-flex pi-items-center pi-justify-center"},T.default.createElement("span",{className:"pi-text-base pi-text-gray-50 dark:pi-text-gray-900"},E.getInitials(W))))),T.default.createElement("div",{className:"".concat(!ue&&"pi-opacity-0 pi-pointer-events-none"," pi-absolute pi-bottom-0 pi-bg-gray-950/65 pi-w-full pi-p-6 pi-rounded-bl-[20px] pi-rounded-br-[20px] pi-transition-all")},T.default.createElement("div",{className:"pi-flex pi-items-center pi-justify-center pi-gap-6 pi-mb-5"},!(null==ee?void 0:ee.isListen)&&T.default.createElement(r.Button,{variant:"default",active:!!L,onClick:function(){return L?d.unmuteCurrentCall():d.muteCurrentCall()},"data-tooltip-id":"tooltip-mute","data-tooltip-content":"".concat(L?o.t("Tooltip.Unmute"):o.t("Tooltip.Mute"))},L?T.default.createElement(n.FontAwesomeIcon,{className:"pi-h-6 pi-w-6",icon:i.faMicrophoneSlash}):T.default.createElement(n.FontAwesomeIcon,{className:"pi-h-6 pi-w-6",icon:i.faMicrophone})),(null==ke?void 0:ke.length)>0&&T.default.createElement(r.Button,{variant:"default",onClick:function(){return e.__awaiter(void 0,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,Je()];case 1:return e.sent()&&(B?Ve():Ne()),[2]}}))}))},"data-tooltip-id":"tooltip-toggle-video","data-tooltip-content":"".concat(Fe?B?o.t("Tooltip.Disable camera"):o.t("Tooltip.Enable camera"):o.t("Tooltip.Enable camera permission")||""),disabled:!Fe,className:"".concat(Fe?"":"pi-cursor-auto")},T.default.createElement(n.FontAwesomeIcon,{className:"pi-h-6 pi-w-6",icon:B?i.faVideoSlash:i.faVideo})),"safari"!==ye.current.webRTCAdapter.browserDetails.browser&&(null===(V=null===(N=null===(x=null===(j=null===(C=null==ie?void 0:ie.profile)||void 0===C?void 0:C.macro_permissions)||void 0===j?void 0:j.nethvoice_cti)||void 0===x?void 0:x.permissions)||void 0===N?void 0:N.screen_sharing)||void 0===V?void 0:V.value)&&!X&&T.default.createElement(r.Button,{variant:"default",onClick:function(){return _e()},"data-tooltip-id":"tooltip-start-screen-share","data-tooltip-content":o.t("Tooltip.Share screen")||""},T.default.createElement(n.FontAwesomeIcon,{className:"pi-h-6 pi-w-6",icon:i.faDisplay})),X&&"publisher"===Q&&T.default.createElement(r.Button,{variant:"default",onClick:function(){return Me()},"data-tooltip-id":"tooltip-stop-screen-share","data-tooltip-content":o.t("Tooltip.Stop sharing")},T.default.createElement(n.FontAwesomeIcon,{className:"pi-h-6 pi-w-6",icon:S.faDisplaySlash})),X&&"listener"===Q&&T.default.createElement(r.Button,{variant:"default",onClick:function(){return je()},"data-tooltip-id":"tooltip-toggle-fullscreen","data-tooltip-content":le?o.t("Tooltip.Exit fullscreen"):o.t("Tooltip.Enter fullscreen")},T.default.createElement(n.FontAwesomeIcon,{className:"pi-h-6 pi-w-6",icon:le?i.faCompress:i.faExpand})),(null===(D=null===(_=null===(I=null===(R=null===(q=null==ie?void 0:ie.profile)||void 0===q?void 0:q.macro_permissions)||void 0===R?void 0:R.settings)||void 0===I?void 0:I.permissions)||void 0===_?void 0:_.recording)||void 0===D?void 0:D.value)&&T.default.createElement(r.Button,{variant:"default",onClick:function(){return d.recordCurrentCall(U)},"data-tooltip-id":"tooltip-record-video-view","data-tooltip-content":U?o.t("Tooltip.Stop recording"):o.t("Tooltip.Record")},T.default.createElement(n.FontAwesomeIcon,{className:"pi-h-6 pi-w-6",icon:U?i.faStop:S.faRecord})),!((null==ee?void 0:ee.isIntrude)||(null==ee?void 0:ee.isListen))&&T.default.createElement(r.Button,{variant:"default",onClick:function(){return F?d.unpauseCurrentCall():(d.pauseCurrentCall(),void Me())},"data-tooltip-id":"tooltip-pause-video-view","data-tooltip-content":F?o.t("Tooltip.Play"):o.t("Tooltip.Pause")},T.default.createElement(n.FontAwesomeIcon,{className:"pi-h-6 pi-w-6",icon:F?i.faPlay:i.faPause}))),T.default.createElement(u.default,{buttonsVariant:"default"})),T.default.createElement(h.CustomThemedTooltip,{className:"pi-z-20",id:"tooltip-mute-video-view",place:"bottom"}),T.default.createElement(h.CustomThemedTooltip,{className:"pi-z-20",id:"tooltip-toggle-video",place:"bottom"}),T.default.createElement(h.CustomThemedTooltip,{className:"pi-z-20",id:"tooltip-toggle-fullscreen",place:"bottom"}),T.default.createElement(h.CustomThemedTooltip,{className:"pi-z-20",id:"tooltip-start-screen-share",place:"bottom"}),T.default.createElement(h.CustomThemedTooltip,{className:"pi-z-20",id:"tooltip-stop-screen-share",place:"bottom"}),T.default.createElement(h.CustomThemedTooltip,{className:"pi-z-20",id:"tooltip-record-video-view",place:"bottom"}),T.default.createElement(h.CustomThemedTooltip,{className:"pi-z-20",id:"tooltip-pause-video-view",place:"bottom"})):T.default.createElement(T.default.Fragment,null,T.default.createElement("div",{className:"pi-flex pi-justify-between pi-items-center"},T.default.createElement(v.default,null),T.default.createElement(m.default,{startTime:M,isNotAlwaysWhite:!0}),!te&&ne&&!f.isPhysical()&&T.default.createElement(g.AudioBars,{audioStream:ne,paused:F,size:te?"large":"small"}))))};exports.VideoView=j,exports.default=j;
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/VideoView/index.tsx"],"sourcesContent":["// Copyright (C) 2025 Nethesis S.r.l.\n// SPDX-License-Identifier: AGPL-3.0-or-later\n\nimport React, { type FC, useEffect, useMemo, useRef, useState } from 'react'\nimport { Button } from '../Button'\nimport { useDispatch, useSelector } from 'react-redux'\nimport { Dispatch, RootState, store } from '../../store'\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\nimport {\n faCompress,\n faDisplay,\n faExpand,\n faMicrophone,\n faMicrophoneSlash,\n faPause,\n faPlay,\n faStop,\n faVideo,\n faVideoSlash,\n} from '@fortawesome/free-solid-svg-icons'\nimport { t } from 'i18next'\nimport { eventDispatch, useEventListener, useIsomorphicLayoutEffect } from '../../utils'\nimport Hangup from '../Hangup'\nimport {\n muteCurrentCall,\n pauseCurrentCall,\n recordCurrentCall,\n isRecordingControlAvailable,\n unmuteCurrentCall,\n unpauseCurrentCall,\n} from '../../lib/phone/call'\nimport { JanusTrack, JanusTypes } from '../../types/webrtc'\nimport JanusLib from '../../lib/webrtc/janus.js'\nimport Avatar from '../CallView/Avatar'\nimport Timer from '../CallView/Timer'\nimport { isPhysical } from '../../lib/user/default_device'\nimport { AudioBars } from '../AudioBars'\nimport { CustomThemedTooltip } from '../CustomThemedTooltip'\nimport { faDisplaySlash, faRecord } from '@nethesis/nethesis-solid-svg-icons'\nimport { getCurrentVideoInputDeviceId } from '../../lib/devices/devices'\nimport { getInitials } from '../../lib/avatars/avatars'\nimport { checkWebCamPermission } from '../../lib/devices/devices'\nimport { dispatchVideoCallStarted } from '../../events/SocketEvents'\n\nexport interface VideoViewProps {}\n\nexport type ScreenSharingMessage = {\n message: 'screenSharingStart' | 'screenSharingStop'\n roomId: string\n destUser: string\n callUser: string\n}\n\nexport type VideoCallMessage = {\n message: 'videoCallStart'\n destUser: string\n callUser: string\n}\n\nexport const VideoView: FC<VideoViewProps> = () => {\n const dispatch = useDispatch<Dispatch>()\n const {\n muted,\n startTime,\n isRecording,\n paused,\n isLocalVideoEnabled,\n showRemoteVideoPlaceHolder,\n hasVideoTrackAdded,\n displayName,\n isStartingVideoCall,\n } = useSelector((state: RootState) => state.currentCall)\n const {\n localTracks,\n localVideos,\n role: screenShareRole,\n active: screenShareActive,\n isStartingScreenShare,\n isJoiningScreenShare,\n isLeavingScreenShare,\n } = useSelector((state: RootState) => state.screenShare)\n const intrudeListenStatus = useSelector((state: RootState) => state.listen)\n const { isOpen } = useSelector((state: RootState) => state.island)\n const { janusInstance, remoteAudioStream } = useSelector((state: RootState) => state.webrtc)\n const userInfo = useSelector((state: RootState) => state.currentUser)\n const [isFullscreen, setIsFullscreen] = useState(false)\n const [isUiShown, setUiShown] = useState(false)\n const uiTimeoutRef = useRef<NodeJS.Timeout | null>(null)\n const debounceTimerRef = useRef<NodeJS.Timeout | null>(null)\n const videoRenegotiationInFlightRef = useRef(false)\n const screenSharePublisherJoinRequestedRef = useRef(false)\n const screenShareViewRef = useRef(null)\n const localScreen = useRef<HTMLVideoElement>(null)\n const remoteScreen = useRef<HTMLVideoElement>(null)\n const localVideo = useRef<HTMLVideoElement>(null)\n const largeRemoteVideo = useRef<HTMLVideoElement>(null)\n const smallRemoteVideo = useRef<HTMLVideoElement>(null)\n const janus = useRef<JanusTypes>(JanusLib)\n const videoInputDevices = store.select.mediaDevices.videoInputDevices(store.getState())\n const activeConversation = useMemo(() => {\n const conversations = userInfo?.conversations || {}\n const activeConversation = Object.values(conversations).find((conv) => Object.keys(conv).length > 0)\n return activeConversation ? (Object.values(activeConversation)[0] as any) : null\n }, [userInfo?.conversations])\n const recordingPermission =\n userInfo?.profile?.macro_permissions?.settings?.permissions?.recording?.value || false\n const recordingControlAvailable = isRecordingControlAvailable(activeConversation)\n const canRecordCurrentCall = recordingPermission && recordingControlAvailable\n\n const notifyPeerVideoStart = () => {\n const { socket } = store.getState().websocket\n const { username: destUser } = store.getState().currentCall\n const { username: callUser } = store.getState().currentUser\n\n if (!socket || !destUser || !callUser) {\n return\n }\n\n socket.emit('message', {\n message: 'videoCallStart',\n destUser,\n callUser,\n } as VideoCallMessage)\n }\n\n useIsomorphicLayoutEffect(() => {\n dispatch.player.updatePlayer({\n localScreen: localScreen,\n remoteScreen: remoteScreen,\n localVideo: localVideo,\n largeRemoteVideo: largeRemoteVideo,\n smallRemoteVideo: smallRemoteVideo,\n })\n }, [])\n\n // component did mount\n useEffect(() => {\n updateScreenStreams()\n updateVideoStreams()\n\n // register for full screen change\n addEventListener('fullscreenchange', handleFullscreenChange)\n\n return () => {\n removeEventListener('fullscreenchange', handleFullscreenChange)\n\n // clear timeout\n if (uiTimeoutRef.current) {\n clearTimeout(uiTimeoutRef.current)\n }\n }\n }, [])\n\n // starting videocall\n useEffect(() => {\n if (isStartingVideoCall) {\n enableVideo()\n dispatch.currentCall.updateCurrentCall({\n isStartingVideoCall: false,\n })\n }\n }, [isStartingVideoCall])\n\n // starting screen sharing\n useEffect(() => {\n if (isStartingScreenShare) {\n initAndStartScreenShare()\n store.dispatch.screenShare.update({\n isStartingScreenShare: false,\n })\n }\n }, [isStartingScreenShare])\n\n // joining screen sharing\n useEffect(() => {\n if (isJoiningScreenShare) {\n initAndJoinScreenShare()\n store.dispatch.screenShare.update({\n isJoiningScreenShare: false,\n })\n }\n }, [isJoiningScreenShare])\n\n // leaving screen sharing\n useEffect(() => {\n if (isLeavingScreenShare) {\n leaveScreenShare()\n store.dispatch.screenShare.update({\n isLeavingScreenShare: false,\n })\n }\n }, [isLeavingScreenShare])\n\n // isOpen changed\n useEffect(() => {\n updateScreenStreams()\n updateVideoStreams()\n }, [isOpen])\n\n const updateVideoStreams = () => {\n const localVideoElement = store.getState().player.localVideo\n const largeRemoteVideoElement = store.getState().player.largeRemoteVideo\n const smallRemoteVideoElement = store.getState().player.smallRemoteVideo\n const { localVideoStream, remoteVideoStream } = store.getState().webrtc\n\n // local video stream\n\n if (localVideoElement?.current) {\n if (janus.current.attachMediaStream) {\n janus.current.attachMediaStream(localVideoElement.current, localVideoStream as MediaStream)\n }\n }\n\n // large remote video stream\n\n if (largeRemoteVideoElement?.current && janus.current.attachMediaStream) {\n janus.current.attachMediaStream(\n largeRemoteVideoElement.current,\n remoteVideoStream as MediaStream,\n )\n }\n\n // small remote video stream\n\n if (smallRemoteVideoElement?.current && janus.current.attachMediaStream) {\n janus.current.attachMediaStream(\n smallRemoteVideoElement.current,\n remoteVideoStream as MediaStream,\n )\n }\n\n if (remoteVideoStream instanceof MediaStream && remoteVideoStream.getVideoTracks().length > 0) {\n dispatch.currentCall.updateCurrentCall({\n showRemoteVideoPlaceHolder: false,\n })\n }\n }\n\n const handleFullscreenChange = () => {\n setIsFullscreen(!!document.fullscreenElement)\n }\n\n const toggleFullScreen = () => {\n if (document.fullscreenElement) {\n document.exitFullscreen()\n eventDispatch('phone-island-fullscreen-exited', {})\n } else {\n if (screenShareViewRef.current) {\n ;(screenShareViewRef.current as HTMLElement).requestFullscreen()\n eventDispatch('phone-island-fullscreen-entered', {})\n }\n }\n }\n useEventListener('phone-island-fullscreen-enter', () => {\n toggleFullScreen()\n })\n useEventListener('phone-island-fullscreen-exit', () => {\n toggleFullScreen()\n })\n\n const newRemoteFeed = (id, display) => {\n // A new feed has been published, create a new plugin handle and attach to it as a listener\n\n dispatch.screenShare.update({\n source: id,\n })\n\n let remoteFeed: any = null\n janusInstance?.attach({\n plugin: 'janus.plugin.videoroom',\n opaqueId: janus.current.randomString(32),\n success: function (pluginHandle) {\n remoteFeed = pluginHandle\n\n dispatch.screenShare.update({\n remoteFeed: pluginHandle,\n })\n remoteFeed.remoteTracks = {}\n remoteFeed.remoteVideos = 0\n janus.current.log?.(\n 'Plugin attached! (' + remoteFeed.getPlugin() + ', id=' + remoteFeed.getId() + ')',\n )\n janus.current.log?.(' -- This is a subscriber')\n // We wait for the plugin to send us an offer\n const { room } = store.getState().screenShare\n\n let listen = {\n request: 'join',\n room: room,\n ptype: 'subscriber',\n feed: id,\n }\n remoteFeed.send({ message: listen })\n },\n error: function (error) {\n janus.current.error?.('Error attaching videoroom plugin', error)\n },\n iceState: function (state) {\n janus.current.log?.('ICE state (feed #' + remoteFeed.rfindex + ') changed to ' + state)\n },\n webrtcState: function (on) {\n janus.current.log?.(\n 'Janus says this WebRTC PeerConnection (feed #' +\n remoteFeed.rfindex +\n ') is ' +\n (on ? 'up' : 'down') +\n ' now',\n )\n },\n slowLink: function (uplink, lost, mid) {\n janus.current.warn?.(\n 'Janus reports problems ' +\n (uplink ? 'sending' : 'receiving') +\n ' packets on mid ' +\n mid +\n ' (' +\n lost +\n ' lost packets)',\n )\n },\n onmessage: function (msg, jsep) {\n janus.current.debug?.(' ::: Got a message (listener) :::', msg)\n let event = msg['videoroom']\n janus.current.debug?.('Event: ' + event)\n if (event) {\n if (event === 'attached') {\n // Subscriber created and attached\n janus.current.log?.(\n 'Successfully attached to feed ' + id + ' (' + display + ') in room ' + msg['room'],\n )\n } else {\n janus.current.warn?.('Unhandled event: ' + event)\n }\n }\n if (jsep) {\n janus.current.debug?.('Handling SDP as well...', jsep)\n // Answer and attach\n remoteFeed.createAnswer({\n jsep: jsep,\n // We only specify data channels here, as this way in\n // case they were offered we'll enable them. Since we\n // don't mention audio or video tracks, we autoaccept them\n // as recvonly (since we won't capture anything ourselves)\n tracks: [{ type: 'data' }],\n success: function (jsep) {\n janus.current.debug?.('Got SDP!', jsep)\n\n const { room } = store.getState().screenShare\n\n let body = { request: 'start', room: room }\n remoteFeed.send({ message: body, jsep: jsep })\n },\n error: function (error) {\n janus.current.error?.('WebRTC error:', error)\n },\n })\n }\n },\n // eslint-disable-next-line no-unused-vars\n onlocaltrack: function (track, on) {\n // The subscriber stream is recvonly, we don't expect anything here\n },\n onremotetrack: function (track, mid, on, metadata) {\n janus.current.debug?.(\n 'Remote track (mid=' +\n mid +\n ') ' +\n (on ? 'added' : 'removed') +\n (metadata ? ' (' + metadata.reason + ') ' : '') +\n ':',\n track,\n )\n // Screen sharing tracks are sometimes muted/unmuted by browser\n // when data is not flowing fast enough; this can make streams blink.\n // We can ignore these.\n if (\n track.kind === 'video' &&\n metadata &&\n (metadata.reason === 'mute' || metadata.reason === 'unmute')\n ) {\n janus.current.log?.('Ignoring mute/unmute on screen-sharing track.')\n return\n }\n if (!on) {\n const { remoteScreenStream } = store.getState().screenShare\n janus.current.stopAllTracks(remoteScreenStream)\n dispatch.screenShare.update({ active: false })\n return\n }\n // If we're here, a new track was added\n if (track.kind === 'video') {\n // New video track: create a stream out of it\n let stream = new MediaStream([track])\n\n // Save the new video stream to the store\n store.dispatch.screenShare.update({ remoteScreenStream: stream })\n\n remoteFeed.remoteTracks[mid] = stream\n janus.current.log?.('Created remote video stream: ' + stream)\n const remoteScreenElement = store.getState().player.remoteScreen\n\n if (remoteScreenElement?.current) {\n janus.current.attachMediaStream?.(remoteScreenElement.current, stream)\n }\n }\n },\n oncleanup: function () {\n janus.current.log?.(' ::: Got a cleanup notification (remote feed ' + id + ') :::')\n remoteFeed.remoteTracks = {}\n remoteFeed.remoteVideos = 0\n },\n })\n }\n\n const enableVideo = () => {\n if (videoRenegotiationInFlightRef.current) {\n return\n }\n\n const { sipcall }: { sipcall: any } = store.getState().webrtc\n videoRenegotiationInFlightRef.current = true\n store.dispatch.currentCall.updateCurrentCall({\n isLocalVideoEnabled: true,\n })\n const tracks: JanusTrack[] = []\n const currentVideoInputDeviceId = getCurrentVideoInputDeviceId()\n\n const track: Partial<JanusTrack> = {\n type: 'video',\n recv: true,\n }\n\n if (currentVideoInputDeviceId) {\n track.capture = { deviceId: { exact: currentVideoInputDeviceId } }\n } else {\n track.capture = true\n }\n\n const { hasVideoTrackAdded } = store.getState().currentCall\n const { remoteVideoStream } = store.getState().webrtc\n const videoTransceiver = sipcall?.webrtcStuff?.pc\n ?.getTransceivers?.()\n ?.find(\n (transceiver: RTCRtpTransceiver) =>\n transceiver.receiver?.track?.kind === 'video' ||\n transceiver.sender?.track?.kind === 'video',\n )\n const shouldReplaceExistingVideoTransceiver =\n hasVideoTrackAdded ||\n Boolean(videoTransceiver) ||\n (remoteVideoStream instanceof MediaStream && remoteVideoStream.getVideoTracks().length > 0)\n\n if (!shouldReplaceExistingVideoTransceiver) {\n track.add = true\n dispatch.currentCall.setVideoTrackAdded(true)\n } else {\n // Reuse the existing video transceiver when available instead of assuming a\n // fixed mid, otherwise fall back to adding a new local video track.\n if (videoTransceiver) {\n track.replace = true\n if (videoTransceiver.mid) {\n track.mid = videoTransceiver.mid\n }\n if (!hasVideoTrackAdded) {\n dispatch.currentCall.setVideoTrackAdded(true)\n }\n } else {\n track.add = true\n dispatch.currentCall.setVideoTrackAdded(true)\n }\n }\n tracks.push(track as JanusTrack)\n\n sipcall.createOffer({\n tracks: tracks,\n success: function (jsep) {\n videoRenegotiationInFlightRef.current = false\n sipcall.send({ message: { request: 'update' }, jsep: jsep })\n notifyPeerVideoStart()\n dispatchVideoCallStarted({\n initiator: 'local',\n callUser: store.getState().currentUser.username,\n destUser: store.getState().currentCall.username,\n })\n eventDispatch('phone-island-video-enabled', {})\n },\n error: function (error) {\n videoRenegotiationInFlightRef.current = false\n console.error('WebRTC error... ' + JSON.stringify(error))\n },\n })\n }\n useEventListener('phone-island-video-enable', () => {\n enableVideo()\n })\n\n const disableVideo = () => {\n if (videoRenegotiationInFlightRef.current) {\n return\n }\n\n const { sipcall, localVideoStream }: { sipcall: any; localVideoStream: MediaStream | null } =\n store.getState().webrtc\n videoRenegotiationInFlightRef.current = true\n const videoTransceiver = sipcall?.webrtcStuff?.pc\n ?.getTransceivers?.()\n ?.find(\n (transceiver: RTCRtpTransceiver) =>\n transceiver.receiver?.track?.kind === 'video' ||\n transceiver.sender?.track?.kind === 'video',\n )\n\n janus.current.stopAllTracks(localVideoStream)\n store.dispatch.webrtc.updateLocalVideoStream(null)\n store.dispatch.currentCall.setLocalVideoEnabled(false)\n const tracks: JanusTrack[] = []\n tracks.push({\n type: 'video',\n ...(videoTransceiver?.mid ? { mid: videoTransceiver.mid } : {}),\n remove: true,\n })\n\n sipcall.createOffer({\n tracks: tracks,\n success: function (jsep) {\n videoRenegotiationInFlightRef.current = false\n sipcall.send({ message: { request: 'update' }, jsep: jsep })\n eventDispatch('phone-island-video-disabled', {})\n },\n error: function (error) {\n videoRenegotiationInFlightRef.current = false\n console.error('WebRTC error... ' + JSON.stringify(error))\n },\n })\n }\n useEventListener('phone-island-video-disable', () => {\n disableVideo()\n })\n\n const toggleVideo = async () => {\n let cameraPermission = await checkCameraPermission()\n if (cameraPermission) {\n if (isLocalVideoEnabled) {\n disableVideo()\n } else {\n enableVideo()\n }\n }\n }\n\n const shareScreen = () => {\n if (!janus.current.isExtensionEnabled()) {\n janus.current.error?.(\n \"This browser doesn't support screensharing (getDisplayMedia unavailable)\",\n )\n return\n }\n\n // Create a new room\n const roomName = janus.current.randomString(32)\n\n let create = {\n request: 'create',\n description: roomName,\n bitrate: 500000,\n publishers: 1,\n }\n\n const { plugin } = store.getState().screenShare\n\n plugin.send({\n message: create,\n success: function (result) {\n if (result['error']) {\n janus.current.error?.(\"Couldn't create room: \" + result['error'])\n return\n }\n let event = result['videoroom']\n janus.current.debug?.('Event: ' + event)\n if (event) {\n // Our own screen sharing session has been created, join it\n\n const room = result['room']\n // Set room to the store\n dispatch.screenShare.update({\n room: room,\n })\n\n janus.current.log?.('Screen sharing session created: ' + room)\n\n const { username } = store.getState().currentUser\n\n if (screenSharePublisherJoinRequestedRef.current) {\n janus.current.log?.(\n 'Screen share publisher join already requested on this handle, skipping duplicate join',\n )\n return\n }\n\n screenSharePublisherJoinRequestedRef.current = true\n\n let register = {\n request: 'join',\n room: room,\n ptype: 'publisher',\n display: username,\n }\n plugin.send({ message: register })\n }\n },\n })\n }\n\n const initScreenShare = () => {\n janusInstance?.attach({\n plugin: 'janus.plugin.videoroom',\n opaqueId: janus.current.randomString(32),\n success: function (pluginHandle) {\n // Set plugin to the store\n dispatch.screenShare.update({\n plugin: pluginHandle,\n })\n const { role } = store.getState().screenShare\n\n if (role === 'publisher') {\n // trigger event to nethlink\n eventDispatch('phone-island-screen-share-initialized', {})\n\n setTimeout(function () {\n shareScreen()\n }, 500)\n } else if (role === 'listener') {\n joinScreenShare()\n }\n eventDispatch('phone-island-screen-share-started', {})\n },\n error: function (error) {\n janus.current.error?.('Error attaching videoroom plugin', error)\n },\n consentDialog: function (on) {},\n iceState: function (state) {\n janus.current.log?.('ICE state changed to ' + state)\n },\n mediaState: function (medium, on) {\n janus.current.log?.('Janus ' + (on ? 'started' : 'stopped') + ' receiving our ' + medium)\n },\n webrtcState: function (on) {\n janus.current.log?.(\n 'Janus says our WebRTC PeerConnection is ' + (on ? 'up' : 'down') + ' now',\n )\n },\n slowLink: function (uplink, lost, mid) {\n janus.current.warn?.(\n 'Janus reports problems ' +\n (uplink ? 'sending' : 'receiving') +\n ' packets on mid ' +\n mid +\n ' (' +\n lost +\n ' lost packets)',\n )\n },\n onmessage: function (msg, jsep) {\n janus.current.debug?.(' ::: Got a message (publisher) :::', msg)\n const { plugin, role } = store.getState().screenShare\n const event = msg['videoroom']\n janus.current.debug?.('Event: ' + event)\n\n if (event) {\n if (event === 'joined') {\n if (role === 'publisher') {\n // This is our session, publish our stream\n janus.current.debug?.('Negotiating WebRTC stream for our screen')\n\n plugin.createOffer({\n // We want sendonly audio and screensharing\n tracks: [\n { type: 'audio', capture: true, recv: false },\n { type: 'screen', capture: true, recv: false },\n ],\n success: function (jsep) {\n janus.current.debug?.('Got publisher SDP!', jsep)\n let publish = { request: 'configure', audio: true, video: true }\n plugin.send({ message: publish, jsep: jsep })\n },\n error: function (error) {\n screenSharePublisherJoinRequestedRef.current = false\n janus.current.error?.('WebRTC error:', error)\n dispatch.screenShare.update({ active: false, role: '' })\n },\n })\n } else {\n // We're just watching a session, any feed to attach to?\n if (msg['publishers']) {\n let list = msg['publishers']\n janus.current.debug?.('Got a list of available publishers/feeds:', list)\n for (let f in list) {\n if (list[f]['dummy']) continue\n let id = list[f]['id']\n let display = list[f]['display']\n janus.current.debug?.(' >> [' + id + '] ' + display)\n newRemoteFeed(id, display)\n }\n }\n }\n } else if (event === 'event') {\n // Any feed to attach to?\n if (role === 'listener' && msg['publishers']) {\n let list = msg['publishers']\n janus.current.debug?.('Got a list of available publishers/feeds:', list)\n for (let f in list) {\n if (list[f]['dummy']) continue\n let id = list[f]['id']\n let display = list[f]['display']\n janus.current.debug?.(' >> [' + id + '] ' + display)\n newRemoteFeed(id, display)\n }\n } else if (msg['leaving']) {\n // One of the publishers has gone away?\n let leaving = msg['leaving']\n janus.current.log?.('Publisher left: ' + leaving)\n } else if (msg['error']) {\n janus.current.error?.('Error event: ' + msg['error'])\n }\n }\n }\n if (jsep) {\n janus.current.debug?.('Handling SDP as well...', jsep)\n plugin.handleRemoteJsep({ jsep: jsep })\n }\n },\n onlocaltrack: function (track, on) {\n janus.current.debug?.('Local track ' + (on ? 'added' : 'removed') + ':', track)\n // We use the track ID as name of the element, but it may contain invalid characters\n let trackId = track.id.replace(/[{}]/g, '')\n if (!on) {\n // Track removed, get rid of the stream and the rendering\n let stream = localTracks?.[trackId]\n if (stream) {\n try {\n let tracks = stream.getTracks()\n for (let i in tracks) {\n let mst = tracks[i]\n if (mst) mst.stop()\n }\n // eslint-disable-next-line no-unused-vars\n } catch (e) {}\n }\n if (track.kind === 'video') {\n dispatch.screenShare.update({\n localVideos: localVideos - 1,\n })\n }\n\n // remove track\n const filteredTracks = localTracks?.filter((track) => track !== localTracks[trackId])\n dispatch.screenShare.update({\n localTracks: filteredTracks,\n })\n return\n }\n // If we're here, a new track was added\n let stream = localTracks?.[trackId]\n if (stream) {\n // We've been here already\n return\n }\n\n if (track.kind === 'video') {\n // New video track: create a stream out of it\n dispatch.screenShare.update({\n localVideos: localVideos + 1,\n })\n let stream = new MediaStream([track])\n\n // Save the new video stream to the store\n store.dispatch.screenShare.update({\n localScreenStream: stream,\n })\n\n janus.current.log?.('Created local stream: ' + stream)\n const localScreenElement = store.getState().player.localScreen\n\n if (localScreenElement?.current) {\n janus.current.attachMediaStream?.(localScreenElement.current, stream)\n inviteOtherUser()\n\n // Listen for the 'ended' event on the screen-sharing track\n track.addEventListener('ended', () => {\n stopScreenShare()\n })\n }\n }\n const { plugin } = store.getState().screenShare\n\n if (\n plugin.webrtcStuff.pc.iceConnectionState !== 'completed' &&\n plugin.webrtcStuff.pc.iceConnectionState !== 'connected'\n ) {\n }\n },\n // eslint-disable-next-line no-unused-vars\n onremotetrack: function (track, mid, on) {\n // The publisher stream is sendonly, we don't expect anything here\n },\n oncleanup: function () {\n janus.current.log?.(' ::: Got a cleanup notification :::')\n screenSharePublisherJoinRequestedRef.current = false\n\n dispatch.screenShare.update({\n localTracks: {},\n localVideos: 0,\n })\n },\n })\n }\n\n const updateScreenStreams = () => {\n const localScreenElement = store.getState().player.localScreen\n const remoteScreenElement = store.getState().player.remoteScreen\n const { localScreenStream, remoteScreenStream } = store.getState().screenShare\n\n // local screen stream\n\n if (localScreenElement?.current) {\n if (janus.current.attachMediaStream) {\n janus.current.attachMediaStream(\n localScreenElement.current,\n localScreenStream as MediaStream,\n )\n }\n }\n\n // remote screen stream\n\n if (remoteScreenElement?.current) {\n if (janus.current.attachMediaStream) {\n janus.current.attachMediaStream(\n remoteScreenElement.current,\n remoteScreenStream as MediaStream,\n )\n }\n }\n }\n\n const inviteOtherUser = () => {\n // send message to websocket to invite the other user\n const { socket } = store.getState().websocket\n const { username: destUsername } = store.getState().currentCall\n const { room } = store.getState().screenShare\n const { username } = store.getState().currentUser\n\n socket.emit('message', {\n message: 'screenSharingStart',\n roomId: room,\n destUser: destUsername,\n callUser: username,\n } as ScreenSharingMessage)\n }\n\n const initAndStartScreenShare = () => {\n screenSharePublisherJoinRequestedRef.current = false\n dispatch.screenShare.update({ active: true, role: 'publisher' })\n initScreenShare()\n }\n useEventListener('phone-island-screen-share-start', () => {\n initAndStartScreenShare()\n })\n\n const initAndJoinScreenShare = () => {\n dispatch.screenShare.update({ active: true, role: 'listener' })\n initScreenShare()\n eventDispatch('phone-island-screen-share-joined', {})\n }\n\n const joinScreenShare = () => {\n const { room } = store.getState().screenShare\n const { username } = store.getState().currentUser\n\n const joinMessage = {\n request: 'join',\n room: room,\n ptype: 'publisher',\n display: username,\n }\n\n const { plugin } = store.getState().screenShare\n plugin.send({ message: joinMessage })\n }\n\n const leaveScreenShare = () => {\n const { remoteScreenStream } = store.getState().screenShare\n janus.current.stopAllTracks(remoteScreenStream)\n dispatch.screenShare.update({ active: false })\n eventDispatch('phone-island-screen-share-left', {})\n }\n\n const handleMouseMove = () => {\n setUiShown(true)\n\n if (uiTimeoutRef.current) {\n clearTimeout(uiTimeoutRef.current)\n uiTimeoutRef.current = null\n }\n }\n\n const startHideTimer = () => {\n // start a timer when mouse stops moving to hide video UI\n uiTimeoutRef.current = setTimeout(() => {\n setUiShown(false)\n }, 3000)\n }\n\n const handleMouseMoveWithDebounce = () => {\n handleMouseMove()\n\n // clear the previous debounce timer\n if (debounceTimerRef.current) {\n clearTimeout(debounceTimerRef.current)\n }\n\n // set a new debounce timer - when this isn't cleared, it means the mouse has stopped\n debounceTimerRef.current = setTimeout(() => {\n startHideTimer()\n }, 100) // small delay to detect \"stopped moving\"\n }\n\n const stopScreenShare = () => {\n const { plugin, localScreenStream } = store.getState().screenShare\n\n screenSharePublisherJoinRequestedRef.current = false\n janus.current.stopAllTracks(localScreenStream)\n dispatch.screenShare.update({ active: false })\n plugin.detach()\n\n // send message to websocket to tell the other user the screen share has stopped\n const { socket } = store.getState().websocket\n const { username: destUsername } = store.getState().currentCall\n const { room } = store.getState().screenShare\n const { username } = store.getState().currentUser\n\n socket.emit('message', {\n message: 'screenSharingStop',\n roomId: room,\n destUser: destUsername,\n callUser: username,\n } as ScreenSharingMessage)\n\n eventDispatch('phone-island-screen-share-stopped', {})\n }\n useEventListener('phone-island-screen-share-stop', () => {\n stopScreenShare()\n })\n\n const pauseCall = () => {\n pauseCurrentCall()\n stopScreenShare()\n }\n\n const [isVideoCallButtonVisible, setIsVideoCallButtonVisible] = useState(true)\n\n const checkCameraPermission = async () => {\n if (videoInputDevices?.length > 0) {\n const isWebCamAccepted = await checkWebCamPermission()\n if (isWebCamAccepted) {\n setIsVideoCallButtonVisible(true)\n return true\n } else {\n setIsVideoCallButtonVisible(false)\n return false\n }\n } else {\n setIsVideoCallButtonVisible(false)\n return false\n }\n }\n\n return (\n <>\n {isOpen ? (\n <div\n ref={screenShareViewRef}\n onMouseMove={() => handleMouseMoveWithDebounce()}\n className={isFullscreen ? 'pi-h-screen' : 'pi-h-[480px] pi-w-[600px]'}\n >\n <div className={`pi-flex pi-relative pi-justify-center pi-w-full pi-h-full`}>\n {/* large remote screen */}\n <video\n autoPlay\n muted={true}\n ref={remoteScreen}\n className={`pi-rounded-2xl pi-w-full pi-h-full ${\n !screenShareActive || screenShareRole !== 'listener' ? 'pi-hidden' : ''\n }`}\n ></video>\n {/* large local screen */}\n <video\n autoPlay\n muted={true}\n ref={localScreen}\n className={`pi-rounded-2xl pi-w-full pi-h-full ${\n !screenShareActive || screenShareRole !== 'publisher' ? 'pi-hidden' : ''\n }`}\n ></video>\n {/* large remote video */}\n <video\n autoPlay\n muted={true}\n ref={largeRemoteVideo}\n className={`pi-rounded-2xl ${\n screenShareActive || showRemoteVideoPlaceHolder ? 'pi-hidden' : ''\n }`}\n ></video>\n {/* remote video placeholder */}\n <div\n className={`pi-w-full pi-bg-gray-200 dark:pi-bg-gray-800 pi-flex pi-items-center pi-justify-center ${\n screenShareActive || !showRemoteVideoPlaceHolder ? 'pi-hidden' : ''\n }`}\n >\n <div className='pi-rounded-full pi-bg-gray-700 dark:pi-bg-gray-200 pi-w-32 pi-h-32 pi-flex pi-items-center pi-justify-center'>\n <span className='pi-text-4xl pi-text-gray-50 dark:pi-text-gray-900'>\n {getInitials(displayName)}\n </span>\n </div>\n </div>\n {/* small local video */}\n <video\n muted={true}\n autoPlay\n ref={localVideo}\n className={`pi-max-w-32 pi-max-h-32 pi-absolute pi-top-5 pi-right-5 pi-rounded-lg ${\n !isLocalVideoEnabled ? 'pi-hidden' : ''\n }`}\n ></video>\n {/* small local video placeholder */}\n <div\n className={`pi-w-32 pi-h-24 pi-absolute pi-top-5 pi-right-5 pi-rounded-lg pi-bg-gray-200 dark:pi-bg-gray-900 pi-flex pi-items-center pi-justify-center ${\n isLocalVideoEnabled || !hasVideoTrackAdded ? 'pi-hidden' : ''\n }`}\n >\n <div className='pi-rounded-full pi-bg-gray-700 dark:pi-bg-gray-200 pi-w-12 pi-h-12 pi-flex pi-items-center pi-justify-center'>\n <span className='pi-text-base pi-text-gray-50 dark:pi-text-gray-900'>\n {getInitials(userInfo.name || '-')}\n </span>\n </div>\n </div>\n {/* small remote video */}\n <video\n muted={true}\n autoPlay\n ref={smallRemoteVideo}\n className={`pi-max-w-32 pi-max-h-32 pi-absolute pi-top-32 pi-right-5 pi-rounded-lg ${\n !screenShareActive || showRemoteVideoPlaceHolder ? 'pi-hidden' : ''\n }`}\n ></video>\n {/* small remote video placeholder */}\n <div\n className={`pi-w-32 pi-h-24 pi-absolute pi-top-32 pi-right-5 pi-rounded-lg pi-bg-gray-200 dark:pi-bg-gray-900 pi-flex pi-items-center pi-justify-center ${\n !screenShareActive || !showRemoteVideoPlaceHolder || !hasVideoTrackAdded\n ? 'pi-hidden'\n : ''\n }`}\n >\n <div className='pi-rounded-full pi-bg-gray-700 dark:pi-bg-gray-200 pi-w-12 pi-h-12 pi-flex pi-items-center pi-justify-center'>\n <span className='pi-text-base pi-text-gray-50 dark:pi-text-gray-900'>\n {getInitials(displayName)}\n </span>\n </div>\n </div>\n </div>\n\n <div\n className={`${\n !isUiShown && 'pi-opacity-0 pi-pointer-events-none'\n } pi-absolute pi-bottom-0 pi-bg-gray-950/65 pi-w-full pi-p-6 pi-rounded-bl-[20px] pi-rounded-br-[20px] pi-transition-all`}\n >\n <div className='pi-flex pi-items-center pi-justify-center pi-gap-6 pi-mb-5'>\n {/* mute button */}\n {!intrudeListenStatus?.isListen && (\n <Button\n variant='default'\n active={muted ? true : false}\n onClick={() => (muted ? unmuteCurrentCall() : muteCurrentCall())}\n data-tooltip-id='tooltip-mute'\n data-tooltip-content={muted ? `${t('Tooltip.Unmute')}` : `${t('Tooltip.Mute')}`}\n >\n {muted ? (\n <FontAwesomeIcon className='pi-h-6 pi-w-6' icon={faMicrophoneSlash} />\n ) : (\n <FontAwesomeIcon className='pi-h-6 pi-w-6' icon={faMicrophone} />\n )}\n </Button>\n )}\n\n {/* video button */}\n {videoInputDevices?.length > 0 && (\n <Button\n variant='default'\n onClick={() => toggleVideo()}\n data-tooltip-id='tooltip-toggle-video'\n data-tooltip-content={`${\n !isVideoCallButtonVisible\n ? t('Tooltip.Enable camera permission') || ''\n : isLocalVideoEnabled\n ? t('Tooltip.Disable camera')\n : t('Tooltip.Enable camera')\n }`}\n disabled={!isVideoCallButtonVisible}\n className={`${!isVideoCallButtonVisible ? 'pi-cursor-auto' : ''}`}\n >\n <FontAwesomeIcon\n className='pi-h-6 pi-w-6'\n icon={isLocalVideoEnabled ? faVideoSlash : faVideo}\n />\n </Button>\n )}\n\n {/* Share screen button */}\n {janus.current.webRTCAdapter.browserDetails.browser !== 'safari' &&\n userInfo?.profile?.macro_permissions?.nethvoice_cti?.permissions?.screen_sharing\n ?.value &&\n !screenShareActive && (\n <Button\n variant='default'\n onClick={() => initAndStartScreenShare()}\n data-tooltip-id='tooltip-start-screen-share'\n data-tooltip-content={t('Tooltip.Share screen') || ''}\n >\n <FontAwesomeIcon className='pi-h-6 pi-w-6' icon={faDisplay} />\n </Button>\n )}\n\n {/* stop screen share */}\n {screenShareActive && screenShareRole === 'publisher' && (\n <Button\n variant='default'\n onClick={() => stopScreenShare()}\n data-tooltip-id='tooltip-stop-screen-share'\n data-tooltip-content={t('Tooltip.Stop sharing')}\n >\n <FontAwesomeIcon className='pi-h-6 pi-w-6' icon={faDisplaySlash} />\n </Button>\n )}\n\n {/* fullscreen */}\n {screenShareActive && screenShareRole === 'listener' && (\n <Button\n variant='default'\n onClick={() => toggleFullScreen()}\n data-tooltip-id='tooltip-toggle-fullscreen'\n data-tooltip-content={\n isFullscreen ? t('Tooltip.Exit fullscreen') : t('Tooltip.Enter fullscreen')\n }\n >\n <FontAwesomeIcon\n className='pi-h-6 pi-w-6'\n icon={isFullscreen ? faCompress : faExpand}\n />\n </Button>\n )}\n\n {/* record */}\n {canRecordCurrentCall && (\n <Button\n variant='default'\n onClick={() => recordCurrentCall(isRecording)}\n data-tooltip-id='tooltip-record-video-view'\n data-tooltip-content={\n isRecording ? t('Tooltip.Stop recording') : t('Tooltip.Record')\n }\n >\n <FontAwesomeIcon\n className='pi-h-6 pi-w-6'\n icon={isRecording ? faStop : faRecord}\n />\n </Button>\n )}\n\n {/* hold */}\n {!(intrudeListenStatus?.isIntrude || intrudeListenStatus?.isListen) && (\n <Button\n variant='default'\n onClick={() => (paused ? unpauseCurrentCall() : pauseCall())}\n data-tooltip-id='tooltip-pause-video-view'\n data-tooltip-content={paused ? t('Tooltip.Play') : t('Tooltip.Pause')}\n >\n <FontAwesomeIcon className='pi-h-6 pi-w-6' icon={paused ? faPlay : faPause} />\n </Button>\n )}\n </div>\n <Hangup buttonsVariant='default' />\n </div>\n {/* Buttons tooltips */}\n <CustomThemedTooltip className='pi-z-20' id='tooltip-mute-video-view' place='bottom' />\n <CustomThemedTooltip className='pi-z-20' id='tooltip-toggle-video' place='bottom' />\n <CustomThemedTooltip className='pi-z-20' id='tooltip-toggle-fullscreen' place='bottom' />\n <CustomThemedTooltip className='pi-z-20' id='tooltip-start-screen-share' place='bottom' />\n <CustomThemedTooltip className='pi-z-20' id='tooltip-stop-screen-share' place='bottom' />\n <CustomThemedTooltip className='pi-z-20' id='tooltip-record-video-view' place='bottom' />\n <CustomThemedTooltip className='pi-z-20' id='tooltip-pause-video-view' place='bottom' />\n </div>\n ) : (\n // collapsed view\n <>\n <div className='pi-flex pi-justify-between pi-items-center'>\n <Avatar />\n <Timer startTime={startTime} isNotAlwaysWhite />\n {!isOpen && remoteAudioStream && !isPhysical() && (\n <AudioBars\n audioStream={remoteAudioStream}\n paused={paused}\n size={isOpen ? 'large' : 'small'}\n />\n )}\n </div>\n </>\n )}\n </>\n )\n}\n\nexport default VideoView\n"],"names":["VideoView","dispatch","useDispatch","_l","useSelector","state","currentCall","muted","startTime","isRecording","paused","isLocalVideoEnabled","showRemoteVideoPlaceHolder","hasVideoTrackAdded","displayName","isStartingVideoCall","_m","screenShare","localTracks","localVideos","screenShareRole","role","screenShareActive","active","isStartingScreenShare","isJoiningScreenShare","isLeavingScreenShare","intrudeListenStatus","listen","isOpen","island","_o","webrtc","janusInstance","remoteAudioStream","userInfo","currentUser","_p","useState","isFullscreen","setIsFullscreen","_q","isUiShown","setUiShown","uiTimeoutRef","useRef","debounceTimerRef","videoRenegotiationInFlightRef","screenSharePublisherJoinRequestedRef","screenShareViewRef","localScreen","remoteScreen","localVideo","largeRemoteVideo","smallRemoteVideo","janus","JanusLib","videoInputDevices","store","select","mediaDevices","getState","activeConversation","useMemo","conversations","Object","values","find","conv","keys","length","recordingPermission","_e","_d","_c","_b","_a","profile","macro_permissions","settings","permissions","recording","value","recordingControlAvailable","isRecordingControlAvailable","canRecordCurrentCall","useIsomorphicLayoutEffect","player","updatePlayer","useEffect","updateScreenStreams","updateVideoStreams","addEventListener","handleFullscreenChange","removeEventListener","current","clearTimeout","enableVideo","updateCurrentCall","initAndStartScreenShare","update","initAndJoinScreenShare","leaveScreenShare","localVideoElement","largeRemoteVideoElement","smallRemoteVideoElement","localVideoStream","remoteVideoStream","attachMediaStream","MediaStream","getVideoTracks","document","fullscreenElement","toggleFullScreen","exitFullscreen","eventDispatch","requestFullscreen","useEventListener","newRemoteFeed","id","display","source","remoteFeed","attach","plugin","opaqueId","randomString","success","pluginHandle","remoteTracks","remoteVideos","log","call","getPlugin","getId","request","room","ptype","feed","send","message","error","iceState","rfindex","webrtcState","on","slowLink","uplink","lost","mid","warn","onmessage","msg","jsep","debug","event","_f","_h","_g","_k","_j","createAnswer","tracks","type","body","onlocaltrack","track","onremotetrack","metadata","reason","kind","remoteScreenStream","stopAllTracks","stream","remoteScreenElement","oncleanup","sipcall","currentVideoInputDeviceId","getCurrentVideoInputDeviceId","recv","capture","deviceId","exact","videoTransceiver","webrtcStuff","pc","getTransceivers","transceiver","receiver","sender","Boolean","replace","setVideoTrackAdded","add","push","createOffer","socket","destUser","callUser","websocket","username","emit","dispatchVideoCallStarted","initiator","console","JSON","stringify","disableVideo","updateLocalVideoStream","setLocalVideoEnabled","__assign","remove","initScreenShare","setTimeout","isExtensionEnabled","create","description","bitrate","publishers","result","register","shareScreen","joinScreenShare","consentDialog","mediaState","medium","_w","audio","video","list","f","leaving","_r","_t","_s","_v","_u","handleRemoteJsep","trackId","stream_2","localScreenStream","localScreenElement","inviteOtherUser","stopScreenShare","iceConnectionState","stream_1","getTracks","i","mst","stop","e","filteredTracks","filter","destUsername","roomId","joinMessage","handleMouseMoveWithDebounce","detach","isVideoCallButtonVisible","setIsVideoCallButtonVisible","checkCameraPermission","__awaiter","checkWebCamPermission","sent","React","createElement","Fragment","ref","onMouseMove","className","autoPlay","concat","getInitials","name","isListen","Button","variant","onClick","unmuteCurrentCall","muteCurrentCall","t","FontAwesomeIcon","icon","faMicrophoneSlash","faMicrophone","disabled","faVideoSlash","faVideo","webRTCAdapter","browserDetails","browser","nethvoice_cti","screen_sharing","faDisplay","faDisplaySlash","faCompress","faExpand","recordCurrentCall","faStop","faRecord","isIntrude","unpauseCurrentCall","pauseCurrentCall","faPlay","faPause","Hangup","buttonsVariant","CustomThemedTooltip","place","Avatar","Timer","isNotAlwaysWhite","isPhysical","AudioBars","audioStream","size"],"mappings":"s1CA2DaA,EAAgC,mCACrCC,EAAWC,EAAAA,cACXC,EAUFC,EAAAA,aAAY,SAACC,GAAqB,OAAAA,EAAMC,WAAW,IATrDC,EAAKJ,EAAAI,MACLC,EAASL,EAAAK,UACTC,EAAWN,EAAAM,YACXC,EAAMP,EAAAO,OACNC,EAAmBR,EAAAQ,oBACnBC,EAA0BT,EAAAS,2BAC1BC,uBACAC,gBACAC,wBAEIC,EAQFZ,EAAWA,aAAC,SAACC,GAAqB,OAAAA,EAAMY,WAAN,IAPpCC,EAAWF,EAAAE,YACXC,EAAWH,EAAAG,YACLC,EAA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4B6L,MAAM,WAC9E5C,EAAAA,QAAAC,cAAC0C,sBAAoB,CAAAtC,UAAU,UAAUtJ,GAAG,2BAA2B6L,MAAM,YAI/E5C,EAAAA,QAAAC,cAAAD,UAAAE,SAAA,KACEF,EAAAA,QAAKC,cAAA,MAAA,CAAAI,UAAU,8CACbL,UAAAC,cAAC4C,EAAM,QAAG,MACV7C,EAAA,QAAAC,cAAC6C,UAAM,CAAA9S,UAAWA,EAAW+S,kBAAmB,KAC9C1R,IAAUK,KAAsBsR,EAAUA,cAC1ChD,EAAAA,QAAAC,cAACgD,YACC,CAAAC,YAAaxR,GACbxB,OAAQA,EACRiT,KAAM9R,GAAS,QAAU,YAQzC"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/VideoView/index.tsx"],"sourcesContent":["// Copyright (C) 2025 Nethesis S.r.l.\n// SPDX-License-Identifier: AGPL-3.0-or-later\n\nimport React, { type FC, useEffect, useRef, useState } from 'react'\nimport { Button } from '../Button'\nimport { useDispatch, useSelector } from 'react-redux'\nimport { Dispatch, RootState, store } from '../../store'\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\nimport {\n faCompress,\n faDisplay,\n faExpand,\n faMicrophone,\n faMicrophoneSlash,\n faPause,\n faPlay,\n faStop,\n faVideo,\n faVideoSlash,\n} from '@fortawesome/free-solid-svg-icons'\nimport { t } from 'i18next'\nimport { eventDispatch, useEventListener, useIsomorphicLayoutEffect } from '../../utils'\nimport Hangup from '../Hangup'\nimport {\n muteCurrentCall,\n pauseCurrentCall,\n recordCurrentCall,\n unmuteCurrentCall,\n unpauseCurrentCall,\n} from '../../lib/phone/call'\nimport { JanusTrack, JanusTypes } from '../../types/webrtc'\nimport JanusLib from '../../lib/webrtc/janus.js'\nimport Avatar from '../CallView/Avatar'\nimport Timer from '../CallView/Timer'\nimport { isPhysical } from '../../lib/user/default_device'\nimport { AudioBars } from '../AudioBars'\nimport { CustomThemedTooltip } from '../CustomThemedTooltip'\nimport { faDisplaySlash, faRecord } from '@nethesis/nethesis-solid-svg-icons'\nimport { getCurrentVideoInputDeviceId } from '../../lib/devices/devices'\nimport { getInitials } from '../../lib/avatars/avatars'\nimport { checkWebCamPermission } from '../../lib/devices/devices'\nimport { dispatchVideoCallStarted } from '../../events/SocketEvents'\n\nexport interface VideoViewProps {}\n\nexport type ScreenSharingMessage = {\n message: 'screenSharingStart' | 'screenSharingStop'\n roomId: string\n destUser: string\n callUser: string\n}\n\nexport type VideoCallMessage = {\n message: 'videoCallStart'\n destUser: string\n callUser: string\n}\n\nexport const VideoView: FC<VideoViewProps> = () => {\n const dispatch = useDispatch<Dispatch>()\n const {\n muted,\n startTime,\n isRecording,\n paused,\n isLocalVideoEnabled,\n showRemoteVideoPlaceHolder,\n hasVideoTrackAdded,\n displayName,\n isStartingVideoCall,\n } = useSelector((state: RootState) => state.currentCall)\n const {\n localTracks,\n localVideos,\n role: screenShareRole,\n active: screenShareActive,\n isStartingScreenShare,\n isJoiningScreenShare,\n isLeavingScreenShare,\n } = useSelector((state: RootState) => state.screenShare)\n const intrudeListenStatus = useSelector((state: RootState) => state.listen)\n const { isOpen } = useSelector((state: RootState) => state.island)\n const { janusInstance, remoteAudioStream } = useSelector((state: RootState) => state.webrtc)\n const userInfo = store.getState().currentUser\n const [isFullscreen, setIsFullscreen] = useState(false)\n const [isUiShown, setUiShown] = useState(false)\n const uiTimeoutRef = useRef<NodeJS.Timeout | null>(null)\n const debounceTimerRef = useRef<NodeJS.Timeout | null>(null)\n const videoRenegotiationInFlightRef = useRef(false)\n const screenSharePublisherJoinRequestedRef = useRef(false)\n const screenShareViewRef = useRef(null)\n const localScreen = useRef<HTMLVideoElement>(null)\n const remoteScreen = useRef<HTMLVideoElement>(null)\n const localVideo = useRef<HTMLVideoElement>(null)\n const largeRemoteVideo = useRef<HTMLVideoElement>(null)\n const smallRemoteVideo = useRef<HTMLVideoElement>(null)\n const janus = useRef<JanusTypes>(JanusLib)\n const videoInputDevices = store.select.mediaDevices.videoInputDevices(store.getState())\n\n const notifyPeerVideoStart = () => {\n const { socket } = store.getState().websocket\n const { username: destUser } = store.getState().currentCall\n const { username: callUser } = store.getState().currentUser\n\n if (!socket || !destUser || !callUser) {\n return\n }\n\n socket.emit('message', {\n message: 'videoCallStart',\n destUser,\n callUser,\n } as VideoCallMessage)\n }\n\n useIsomorphicLayoutEffect(() => {\n dispatch.player.updatePlayer({\n localScreen: localScreen,\n remoteScreen: remoteScreen,\n localVideo: localVideo,\n largeRemoteVideo: largeRemoteVideo,\n smallRemoteVideo: smallRemoteVideo,\n })\n }, [])\n\n // component did mount\n useEffect(() => {\n updateScreenStreams()\n updateVideoStreams()\n\n // register for full screen change\n addEventListener('fullscreenchange', handleFullscreenChange)\n\n return () => {\n removeEventListener('fullscreenchange', handleFullscreenChange)\n\n // clear timeout\n if (uiTimeoutRef.current) {\n clearTimeout(uiTimeoutRef.current)\n }\n }\n }, [])\n\n // starting videocall\n useEffect(() => {\n if (isStartingVideoCall) {\n enableVideo()\n dispatch.currentCall.updateCurrentCall({\n isStartingVideoCall: false,\n })\n }\n }, [isStartingVideoCall])\n\n // starting screen sharing\n useEffect(() => {\n if (isStartingScreenShare) {\n initAndStartScreenShare()\n store.dispatch.screenShare.update({\n isStartingScreenShare: false,\n })\n }\n }, [isStartingScreenShare])\n\n // joining screen sharing\n useEffect(() => {\n if (isJoiningScreenShare) {\n initAndJoinScreenShare()\n store.dispatch.screenShare.update({\n isJoiningScreenShare: false,\n })\n }\n }, [isJoiningScreenShare])\n\n // leaving screen sharing\n useEffect(() => {\n if (isLeavingScreenShare) {\n leaveScreenShare()\n store.dispatch.screenShare.update({\n isLeavingScreenShare: false,\n })\n }\n }, [isLeavingScreenShare])\n\n // isOpen changed\n useEffect(() => {\n updateScreenStreams()\n updateVideoStreams()\n }, [isOpen])\n\n const updateVideoStreams = () => {\n const localVideoElement = store.getState().player.localVideo\n const largeRemoteVideoElement = store.getState().player.largeRemoteVideo\n const smallRemoteVideoElement = store.getState().player.smallRemoteVideo\n const { localVideoStream, remoteVideoStream } = store.getState().webrtc\n\n // local video stream\n\n if (localVideoElement?.current) {\n if (janus.current.attachMediaStream) {\n janus.current.attachMediaStream(localVideoElement.current, localVideoStream as MediaStream)\n }\n }\n\n // large remote video stream\n\n if (largeRemoteVideoElement?.current && janus.current.attachMediaStream) {\n janus.current.attachMediaStream(\n largeRemoteVideoElement.current,\n remoteVideoStream as MediaStream,\n )\n }\n\n // small remote video stream\n\n if (smallRemoteVideoElement?.current && janus.current.attachMediaStream) {\n janus.current.attachMediaStream(\n smallRemoteVideoElement.current,\n remoteVideoStream as MediaStream,\n )\n }\n\n if (remoteVideoStream instanceof MediaStream && remoteVideoStream.getVideoTracks().length > 0) {\n dispatch.currentCall.updateCurrentCall({\n showRemoteVideoPlaceHolder: false,\n })\n }\n }\n\n const handleFullscreenChange = () => {\n setIsFullscreen(!!document.fullscreenElement)\n }\n\n const toggleFullScreen = () => {\n if (document.fullscreenElement) {\n document.exitFullscreen()\n eventDispatch('phone-island-fullscreen-exited', {})\n } else {\n if (screenShareViewRef.current) {\n ;(screenShareViewRef.current as HTMLElement).requestFullscreen()\n eventDispatch('phone-island-fullscreen-entered', {})\n }\n }\n }\n useEventListener('phone-island-fullscreen-enter', () => {\n toggleFullScreen()\n })\n useEventListener('phone-island-fullscreen-exit', () => {\n toggleFullScreen()\n })\n\n const newRemoteFeed = (id, display) => {\n // A new feed has been published, create a new plugin handle and attach to it as a listener\n\n dispatch.screenShare.update({\n source: id,\n })\n\n let remoteFeed: any = null\n janusInstance?.attach({\n plugin: 'janus.plugin.videoroom',\n opaqueId: janus.current.randomString(32),\n success: function (pluginHandle) {\n remoteFeed = pluginHandle\n\n dispatch.screenShare.update({\n remoteFeed: pluginHandle,\n })\n remoteFeed.remoteTracks = {}\n remoteFeed.remoteVideos = 0\n janus.current.log?.(\n 'Plugin attached! (' + remoteFeed.getPlugin() + ', id=' + remoteFeed.getId() + ')',\n )\n janus.current.log?.(' -- This is a subscriber')\n // We wait for the plugin to send us an offer\n const { room } = store.getState().screenShare\n\n let listen = {\n request: 'join',\n room: room,\n ptype: 'subscriber',\n feed: id,\n }\n remoteFeed.send({ message: listen })\n },\n error: function (error) {\n janus.current.error?.('Error attaching videoroom plugin', error)\n },\n iceState: function (state) {\n janus.current.log?.('ICE state (feed #' + remoteFeed.rfindex + ') changed to ' + state)\n },\n webrtcState: function (on) {\n janus.current.log?.(\n 'Janus says this WebRTC PeerConnection (feed #' +\n remoteFeed.rfindex +\n ') is ' +\n (on ? 'up' : 'down') +\n ' now',\n )\n },\n slowLink: function (uplink, lost, mid) {\n janus.current.warn?.(\n 'Janus reports problems ' +\n (uplink ? 'sending' : 'receiving') +\n ' packets on mid ' +\n mid +\n ' (' +\n lost +\n ' lost packets)',\n )\n },\n onmessage: function (msg, jsep) {\n janus.current.debug?.(' ::: Got a message (listener) :::', msg)\n let event = msg['videoroom']\n janus.current.debug?.('Event: ' + event)\n if (event) {\n if (event === 'attached') {\n // Subscriber created and attached\n janus.current.log?.(\n 'Successfully attached to feed ' + id + ' (' + display + ') in room ' + msg['room'],\n )\n } else {\n janus.current.warn?.('Unhandled event: ' + event)\n }\n }\n if (jsep) {\n janus.current.debug?.('Handling SDP as well...', jsep)\n // Answer and attach\n remoteFeed.createAnswer({\n jsep: jsep,\n // We only specify data channels here, as this way in\n // case they were offered we'll enable them. Since we\n // don't mention audio or video tracks, we autoaccept them\n // as recvonly (since we won't capture anything ourselves)\n tracks: [{ type: 'data' }],\n success: function (jsep) {\n janus.current.debug?.('Got SDP!', jsep)\n\n const { room } = store.getState().screenShare\n\n let body = { request: 'start', room: room }\n remoteFeed.send({ message: body, jsep: jsep })\n },\n error: function (error) {\n janus.current.error?.('WebRTC error:', error)\n },\n })\n }\n },\n // eslint-disable-next-line no-unused-vars\n onlocaltrack: function (track, on) {\n // The subscriber stream is recvonly, we don't expect anything here\n },\n onremotetrack: function (track, mid, on, metadata) {\n janus.current.debug?.(\n 'Remote track (mid=' +\n mid +\n ') ' +\n (on ? 'added' : 'removed') +\n (metadata ? ' (' + metadata.reason + ') ' : '') +\n ':',\n track,\n )\n // Screen sharing tracks are sometimes muted/unmuted by browser\n // when data is not flowing fast enough; this can make streams blink.\n // We can ignore these.\n if (\n track.kind === 'video' &&\n metadata &&\n (metadata.reason === 'mute' || metadata.reason === 'unmute')\n ) {\n janus.current.log?.('Ignoring mute/unmute on screen-sharing track.')\n return\n }\n if (!on) {\n const { remoteScreenStream } = store.getState().screenShare\n janus.current.stopAllTracks(remoteScreenStream)\n dispatch.screenShare.update({ active: false })\n return\n }\n // If we're here, a new track was added\n if (track.kind === 'video') {\n // New video track: create a stream out of it\n let stream = new MediaStream([track])\n\n // Save the new video stream to the store\n store.dispatch.screenShare.update({ remoteScreenStream: stream })\n\n remoteFeed.remoteTracks[mid] = stream\n janus.current.log?.('Created remote video stream: ' + stream)\n const remoteScreenElement = store.getState().player.remoteScreen\n\n if (remoteScreenElement?.current) {\n janus.current.attachMediaStream?.(remoteScreenElement.current, stream)\n }\n }\n },\n oncleanup: function () {\n janus.current.log?.(' ::: Got a cleanup notification (remote feed ' + id + ') :::')\n remoteFeed.remoteTracks = {}\n remoteFeed.remoteVideos = 0\n },\n })\n }\n\n const enableVideo = () => {\n if (videoRenegotiationInFlightRef.current) {\n return\n }\n\n const { sipcall }: { sipcall: any } = store.getState().webrtc\n videoRenegotiationInFlightRef.current = true\n store.dispatch.currentCall.updateCurrentCall({\n isLocalVideoEnabled: true,\n })\n const tracks: JanusTrack[] = []\n const currentVideoInputDeviceId = getCurrentVideoInputDeviceId()\n\n const track: Partial<JanusTrack> = {\n type: 'video',\n recv: true,\n }\n\n if (currentVideoInputDeviceId) {\n track.capture = { deviceId: { exact: currentVideoInputDeviceId } }\n } else {\n track.capture = true\n }\n\n const { hasVideoTrackAdded } = store.getState().currentCall\n const { remoteVideoStream } = store.getState().webrtc\n const videoTransceiver = sipcall?.webrtcStuff?.pc\n ?.getTransceivers?.()\n ?.find(\n (transceiver: RTCRtpTransceiver) =>\n transceiver.receiver?.track?.kind === 'video' ||\n transceiver.sender?.track?.kind === 'video',\n )\n const shouldReplaceExistingVideoTransceiver =\n hasVideoTrackAdded ||\n Boolean(videoTransceiver) ||\n (remoteVideoStream instanceof MediaStream && remoteVideoStream.getVideoTracks().length > 0)\n\n if (!shouldReplaceExistingVideoTransceiver) {\n track.add = true\n dispatch.currentCall.setVideoTrackAdded(true)\n } else {\n // Reuse the existing video transceiver when available instead of assuming a\n // fixed mid, otherwise fall back to adding a new local video track.\n if (videoTransceiver) {\n track.replace = true\n if (videoTransceiver.mid) {\n track.mid = videoTransceiver.mid\n }\n if (!hasVideoTrackAdded) {\n dispatch.currentCall.setVideoTrackAdded(true)\n }\n } else {\n track.add = true\n dispatch.currentCall.setVideoTrackAdded(true)\n }\n }\n tracks.push(track as JanusTrack)\n\n sipcall.createOffer({\n tracks: tracks,\n success: function (jsep) {\n videoRenegotiationInFlightRef.current = false\n sipcall.send({ message: { request: 'update' }, jsep: jsep })\n notifyPeerVideoStart()\n dispatchVideoCallStarted({\n initiator: 'local',\n callUser: store.getState().currentUser.username,\n destUser: store.getState().currentCall.username,\n })\n eventDispatch('phone-island-video-enabled', {})\n },\n error: function (error) {\n videoRenegotiationInFlightRef.current = false\n console.error('WebRTC error... ' + JSON.stringify(error))\n },\n })\n }\n useEventListener('phone-island-video-enable', () => {\n enableVideo()\n })\n\n const disableVideo = () => {\n if (videoRenegotiationInFlightRef.current) {\n return\n }\n\n const { sipcall, localVideoStream }: { sipcall: any; localVideoStream: MediaStream | null } =\n store.getState().webrtc\n videoRenegotiationInFlightRef.current = true\n const videoTransceiver = sipcall?.webrtcStuff?.pc\n ?.getTransceivers?.()\n ?.find(\n (transceiver: RTCRtpTransceiver) =>\n transceiver.receiver?.track?.kind === 'video' ||\n transceiver.sender?.track?.kind === 'video',\n )\n\n janus.current.stopAllTracks(localVideoStream)\n store.dispatch.webrtc.updateLocalVideoStream(null)\n store.dispatch.currentCall.setLocalVideoEnabled(false)\n const tracks: JanusTrack[] = []\n tracks.push({\n type: 'video',\n ...(videoTransceiver?.mid ? { mid: videoTransceiver.mid } : {}),\n remove: true,\n })\n\n sipcall.createOffer({\n tracks: tracks,\n success: function (jsep) {\n videoRenegotiationInFlightRef.current = false\n sipcall.send({ message: { request: 'update' }, jsep: jsep })\n eventDispatch('phone-island-video-disabled', {})\n },\n error: function (error) {\n videoRenegotiationInFlightRef.current = false\n console.error('WebRTC error... ' + JSON.stringify(error))\n },\n })\n }\n useEventListener('phone-island-video-disable', () => {\n disableVideo()\n })\n\n const toggleVideo = async () => {\n let cameraPermission = await checkCameraPermission()\n if (cameraPermission) {\n if (isLocalVideoEnabled) {\n disableVideo()\n } else {\n enableVideo()\n }\n }\n }\n\n const shareScreen = () => {\n if (!janus.current.isExtensionEnabled()) {\n janus.current.error?.(\n \"This browser doesn't support screensharing (getDisplayMedia unavailable)\",\n )\n return\n }\n\n // Create a new room\n const roomName = janus.current.randomString(32)\n\n let create = {\n request: 'create',\n description: roomName,\n bitrate: 500000,\n publishers: 1,\n }\n\n const { plugin } = store.getState().screenShare\n\n plugin.send({\n message: create,\n success: function (result) {\n if (result['error']) {\n janus.current.error?.(\"Couldn't create room: \" + result['error'])\n return\n }\n let event = result['videoroom']\n janus.current.debug?.('Event: ' + event)\n if (event) {\n // Our own screen sharing session has been created, join it\n\n const room = result['room']\n // Set room to the store\n dispatch.screenShare.update({\n room: room,\n })\n\n janus.current.log?.('Screen sharing session created: ' + room)\n\n const { username } = store.getState().currentUser\n\n if (screenSharePublisherJoinRequestedRef.current) {\n janus.current.log?.(\n 'Screen share publisher join already requested on this handle, skipping duplicate join',\n )\n return\n }\n\n screenSharePublisherJoinRequestedRef.current = true\n\n let register = {\n request: 'join',\n room: room,\n ptype: 'publisher',\n display: username,\n }\n plugin.send({ message: register })\n }\n },\n })\n }\n\n const initScreenShare = () => {\n janusInstance?.attach({\n plugin: 'janus.plugin.videoroom',\n opaqueId: janus.current.randomString(32),\n success: function (pluginHandle) {\n // Set plugin to the store\n dispatch.screenShare.update({\n plugin: pluginHandle,\n })\n const { role } = store.getState().screenShare\n\n if (role === 'publisher') {\n // trigger event to nethlink\n eventDispatch('phone-island-screen-share-initialized', {})\n\n setTimeout(function () {\n shareScreen()\n }, 500)\n } else if (role === 'listener') {\n joinScreenShare()\n }\n eventDispatch('phone-island-screen-share-started', {})\n },\n error: function (error) {\n janus.current.error?.('Error attaching videoroom plugin', error)\n },\n consentDialog: function (on) {},\n iceState: function (state) {\n janus.current.log?.('ICE state changed to ' + state)\n },\n mediaState: function (medium, on) {\n janus.current.log?.('Janus ' + (on ? 'started' : 'stopped') + ' receiving our ' + medium)\n },\n webrtcState: function (on) {\n janus.current.log?.(\n 'Janus says our WebRTC PeerConnection is ' + (on ? 'up' : 'down') + ' now',\n )\n },\n slowLink: function (uplink, lost, mid) {\n janus.current.warn?.(\n 'Janus reports problems ' +\n (uplink ? 'sending' : 'receiving') +\n ' packets on mid ' +\n mid +\n ' (' +\n lost +\n ' lost packets)',\n )\n },\n onmessage: function (msg, jsep) {\n janus.current.debug?.(' ::: Got a message (publisher) :::', msg)\n const { plugin, role } = store.getState().screenShare\n const event = msg['videoroom']\n janus.current.debug?.('Event: ' + event)\n\n if (event) {\n if (event === 'joined') {\n if (role === 'publisher') {\n // This is our session, publish our stream\n janus.current.debug?.('Negotiating WebRTC stream for our screen')\n\n plugin.createOffer({\n // We want sendonly audio and screensharing\n tracks: [\n { type: 'audio', capture: true, recv: false },\n { type: 'screen', capture: true, recv: false },\n ],\n success: function (jsep) {\n janus.current.debug?.('Got publisher SDP!', jsep)\n let publish = { request: 'configure', audio: true, video: true }\n plugin.send({ message: publish, jsep: jsep })\n },\n error: function (error) {\n screenSharePublisherJoinRequestedRef.current = false\n janus.current.error?.('WebRTC error:', error)\n dispatch.screenShare.update({ active: false, role: '' })\n },\n })\n } else {\n // We're just watching a session, any feed to attach to?\n if (msg['publishers']) {\n let list = msg['publishers']\n janus.current.debug?.('Got a list of available publishers/feeds:', list)\n for (let f in list) {\n if (list[f]['dummy']) continue\n let id = list[f]['id']\n let display = list[f]['display']\n janus.current.debug?.(' >> [' + id + '] ' + display)\n newRemoteFeed(id, display)\n }\n }\n }\n } else if (event === 'event') {\n // Any feed to attach to?\n if (role === 'listener' && msg['publishers']) {\n let list = msg['publishers']\n janus.current.debug?.('Got a list of available publishers/feeds:', list)\n for (let f in list) {\n if (list[f]['dummy']) continue\n let id = list[f]['id']\n let display = list[f]['display']\n janus.current.debug?.(' >> [' + id + '] ' + display)\n newRemoteFeed(id, display)\n }\n } else if (msg['leaving']) {\n // One of the publishers has gone away?\n let leaving = msg['leaving']\n janus.current.log?.('Publisher left: ' + leaving)\n } else if (msg['error']) {\n janus.current.error?.('Error event: ' + msg['error'])\n }\n }\n }\n if (jsep) {\n janus.current.debug?.('Handling SDP as well...', jsep)\n plugin.handleRemoteJsep({ jsep: jsep })\n }\n },\n onlocaltrack: function (track, on) {\n janus.current.debug?.('Local track ' + (on ? 'added' : 'removed') + ':', track)\n // We use the track ID as name of the element, but it may contain invalid characters\n let trackId = track.id.replace(/[{}]/g, '')\n if (!on) {\n // Track removed, get rid of the stream and the rendering\n let stream = localTracks?.[trackId]\n if (stream) {\n try {\n let tracks = stream.getTracks()\n for (let i in tracks) {\n let mst = tracks[i]\n if (mst) mst.stop()\n }\n // eslint-disable-next-line no-unused-vars\n } catch (e) {}\n }\n if (track.kind === 'video') {\n dispatch.screenShare.update({\n localVideos: localVideos - 1,\n })\n }\n\n // remove track\n const filteredTracks = localTracks?.filter((track) => track !== localTracks[trackId])\n dispatch.screenShare.update({\n localTracks: filteredTracks,\n })\n return\n }\n // If we're here, a new track was added\n let stream = localTracks?.[trackId]\n if (stream) {\n // We've been here already\n return\n }\n\n if (track.kind === 'video') {\n // New video track: create a stream out of it\n dispatch.screenShare.update({\n localVideos: localVideos + 1,\n })\n let stream = new MediaStream([track])\n\n // Save the new video stream to the store\n store.dispatch.screenShare.update({\n localScreenStream: stream,\n })\n\n janus.current.log?.('Created local stream: ' + stream)\n const localScreenElement = store.getState().player.localScreen\n\n if (localScreenElement?.current) {\n janus.current.attachMediaStream?.(localScreenElement.current, stream)\n inviteOtherUser()\n\n // Listen for the 'ended' event on the screen-sharing track\n track.addEventListener('ended', () => {\n stopScreenShare()\n })\n }\n }\n const { plugin } = store.getState().screenShare\n\n if (\n plugin.webrtcStuff.pc.iceConnectionState !== 'completed' &&\n plugin.webrtcStuff.pc.iceConnectionState !== 'connected'\n ) {\n }\n },\n // eslint-disable-next-line no-unused-vars\n onremotetrack: function (track, mid, on) {\n // The publisher stream is sendonly, we don't expect anything here\n },\n oncleanup: function () {\n janus.current.log?.(' ::: Got a cleanup notification :::')\n screenSharePublisherJoinRequestedRef.current = false\n\n dispatch.screenShare.update({\n localTracks: {},\n localVideos: 0,\n })\n },\n })\n }\n\n const updateScreenStreams = () => {\n const localScreenElement = store.getState().player.localScreen\n const remoteScreenElement = store.getState().player.remoteScreen\n const { localScreenStream, remoteScreenStream } = store.getState().screenShare\n\n // local screen stream\n\n if (localScreenElement?.current) {\n if (janus.current.attachMediaStream) {\n janus.current.attachMediaStream(\n localScreenElement.current,\n localScreenStream as MediaStream,\n )\n }\n }\n\n // remote screen stream\n\n if (remoteScreenElement?.current) {\n if (janus.current.attachMediaStream) {\n janus.current.attachMediaStream(\n remoteScreenElement.current,\n remoteScreenStream as MediaStream,\n )\n }\n }\n }\n\n const inviteOtherUser = () => {\n // send message to websocket to invite the other user\n const { socket } = store.getState().websocket\n const { username: destUsername } = store.getState().currentCall\n const { room } = store.getState().screenShare\n const { username } = store.getState().currentUser\n\n socket.emit('message', {\n message: 'screenSharingStart',\n roomId: room,\n destUser: destUsername,\n callUser: username,\n } as ScreenSharingMessage)\n }\n\n const initAndStartScreenShare = () => {\n screenSharePublisherJoinRequestedRef.current = false\n dispatch.screenShare.update({ active: true, role: 'publisher' })\n initScreenShare()\n }\n useEventListener('phone-island-screen-share-start', () => {\n initAndStartScreenShare()\n })\n\n const initAndJoinScreenShare = () => {\n dispatch.screenShare.update({ active: true, role: 'listener' })\n initScreenShare()\n eventDispatch('phone-island-screen-share-joined', {})\n }\n\n const joinScreenShare = () => {\n const { room } = store.getState().screenShare\n const { username } = store.getState().currentUser\n\n const joinMessage = {\n request: 'join',\n room: room,\n ptype: 'publisher',\n display: username,\n }\n\n const { plugin } = store.getState().screenShare\n plugin.send({ message: joinMessage })\n }\n\n const leaveScreenShare = () => {\n const { remoteScreenStream } = store.getState().screenShare\n janus.current.stopAllTracks(remoteScreenStream)\n dispatch.screenShare.update({ active: false })\n eventDispatch('phone-island-screen-share-left', {})\n }\n\n const handleMouseMove = () => {\n setUiShown(true)\n\n if (uiTimeoutRef.current) {\n clearTimeout(uiTimeoutRef.current)\n uiTimeoutRef.current = null\n }\n }\n\n const startHideTimer = () => {\n // start a timer when mouse stops moving to hide video UI\n uiTimeoutRef.current = setTimeout(() => {\n setUiShown(false)\n }, 3000)\n }\n\n const handleMouseMoveWithDebounce = () => {\n handleMouseMove()\n\n // clear the previous debounce timer\n if (debounceTimerRef.current) {\n clearTimeout(debounceTimerRef.current)\n }\n\n // set a new debounce timer - when this isn't cleared, it means the mouse has stopped\n debounceTimerRef.current = setTimeout(() => {\n startHideTimer()\n }, 100) // small delay to detect \"stopped moving\"\n }\n\n const stopScreenShare = () => {\n const { plugin, localScreenStream } = store.getState().screenShare\n\n screenSharePublisherJoinRequestedRef.current = false\n janus.current.stopAllTracks(localScreenStream)\n dispatch.screenShare.update({ active: false })\n plugin.detach()\n\n // send message to websocket to tell the other user the screen share has stopped\n const { socket } = store.getState().websocket\n const { username: destUsername } = store.getState().currentCall\n const { room } = store.getState().screenShare\n const { username } = store.getState().currentUser\n\n socket.emit('message', {\n message: 'screenSharingStop',\n roomId: room,\n destUser: destUsername,\n callUser: username,\n } as ScreenSharingMessage)\n\n eventDispatch('phone-island-screen-share-stopped', {})\n }\n useEventListener('phone-island-screen-share-stop', () => {\n stopScreenShare()\n })\n\n const pauseCall = () => {\n pauseCurrentCall()\n stopScreenShare()\n }\n\n const [isVideoCallButtonVisible, setIsVideoCallButtonVisible] = useState(true)\n\n const checkCameraPermission = async () => {\n if (videoInputDevices?.length > 0) {\n const isWebCamAccepted = await checkWebCamPermission()\n if (isWebCamAccepted) {\n setIsVideoCallButtonVisible(true)\n return true\n } else {\n setIsVideoCallButtonVisible(false)\n return false\n }\n } else {\n setIsVideoCallButtonVisible(false)\n return false\n }\n }\n\n return (\n <>\n {isOpen ? (\n <div\n ref={screenShareViewRef}\n onMouseMove={() => handleMouseMoveWithDebounce()}\n className={isFullscreen ? 'pi-h-screen' : 'pi-h-[480px] pi-w-[600px]'}\n >\n <div className={`pi-flex pi-relative pi-justify-center pi-w-full pi-h-full`}>\n {/* large remote screen */}\n <video\n autoPlay\n muted={true}\n ref={remoteScreen}\n className={`pi-rounded-2xl pi-w-full pi-h-full ${\n !screenShareActive || screenShareRole !== 'listener' ? 'pi-hidden' : ''\n }`}\n ></video>\n {/* large local screen */}\n <video\n autoPlay\n muted={true}\n ref={localScreen}\n className={`pi-rounded-2xl pi-w-full pi-h-full ${\n !screenShareActive || screenShareRole !== 'publisher' ? 'pi-hidden' : ''\n }`}\n ></video>\n {/* large remote video */}\n <video\n autoPlay\n muted={true}\n ref={largeRemoteVideo}\n className={`pi-rounded-2xl ${\n screenShareActive || showRemoteVideoPlaceHolder ? 'pi-hidden' : ''\n }`}\n ></video>\n {/* remote video placeholder */}\n <div\n className={`pi-w-full pi-bg-gray-200 dark:pi-bg-gray-800 pi-flex pi-items-center pi-justify-center ${\n screenShareActive || !showRemoteVideoPlaceHolder ? 'pi-hidden' : ''\n }`}\n >\n <div className='pi-rounded-full pi-bg-gray-700 dark:pi-bg-gray-200 pi-w-32 pi-h-32 pi-flex pi-items-center pi-justify-center'>\n <span className='pi-text-4xl pi-text-gray-50 dark:pi-text-gray-900'>\n {getInitials(displayName)}\n </span>\n </div>\n </div>\n {/* small local video */}\n <video\n muted={true}\n autoPlay\n ref={localVideo}\n className={`pi-max-w-32 pi-max-h-32 pi-absolute pi-top-5 pi-right-5 pi-rounded-lg ${\n !isLocalVideoEnabled ? 'pi-hidden' : ''\n }`}\n ></video>\n {/* small local video placeholder */}\n <div\n className={`pi-w-32 pi-h-24 pi-absolute pi-top-5 pi-right-5 pi-rounded-lg pi-bg-gray-200 dark:pi-bg-gray-900 pi-flex pi-items-center pi-justify-center ${\n isLocalVideoEnabled || !hasVideoTrackAdded ? 'pi-hidden' : ''\n }`}\n >\n <div className='pi-rounded-full pi-bg-gray-700 dark:pi-bg-gray-200 pi-w-12 pi-h-12 pi-flex pi-items-center pi-justify-center'>\n <span className='pi-text-base pi-text-gray-50 dark:pi-text-gray-900'>\n {getInitials(userInfo.name || '-')}\n </span>\n </div>\n </div>\n {/* small remote video */}\n <video\n muted={true}\n autoPlay\n ref={smallRemoteVideo}\n className={`pi-max-w-32 pi-max-h-32 pi-absolute pi-top-32 pi-right-5 pi-rounded-lg ${\n !screenShareActive || showRemoteVideoPlaceHolder ? 'pi-hidden' : ''\n }`}\n ></video>\n {/* small remote video placeholder */}\n <div\n className={`pi-w-32 pi-h-24 pi-absolute pi-top-32 pi-right-5 pi-rounded-lg pi-bg-gray-200 dark:pi-bg-gray-900 pi-flex pi-items-center pi-justify-center ${\n !screenShareActive || !showRemoteVideoPlaceHolder || !hasVideoTrackAdded\n ? 'pi-hidden'\n : ''\n }`}\n >\n <div className='pi-rounded-full pi-bg-gray-700 dark:pi-bg-gray-200 pi-w-12 pi-h-12 pi-flex pi-items-center pi-justify-center'>\n <span className='pi-text-base pi-text-gray-50 dark:pi-text-gray-900'>\n {getInitials(displayName)}\n </span>\n </div>\n </div>\n </div>\n\n <div\n className={`${\n !isUiShown && 'pi-opacity-0 pi-pointer-events-none'\n } pi-absolute pi-bottom-0 pi-bg-gray-950/65 pi-w-full pi-p-6 pi-rounded-bl-[20px] pi-rounded-br-[20px] pi-transition-all`}\n >\n <div className='pi-flex pi-items-center pi-justify-center pi-gap-6 pi-mb-5'>\n {/* mute button */}\n {!intrudeListenStatus?.isListen && (\n <Button\n variant='default'\n active={muted ? true : false}\n onClick={() => (muted ? unmuteCurrentCall() : muteCurrentCall())}\n data-tooltip-id='tooltip-mute'\n data-tooltip-content={muted ? `${t('Tooltip.Unmute')}` : `${t('Tooltip.Mute')}`}\n >\n {muted ? (\n <FontAwesomeIcon className='pi-h-6 pi-w-6' icon={faMicrophoneSlash} />\n ) : (\n <FontAwesomeIcon className='pi-h-6 pi-w-6' icon={faMicrophone} />\n )}\n </Button>\n )}\n\n {/* video button */}\n {videoInputDevices?.length > 0 && (\n <Button\n variant='default'\n onClick={() => toggleVideo()}\n data-tooltip-id='tooltip-toggle-video'\n data-tooltip-content={`${\n !isVideoCallButtonVisible\n ? t('Tooltip.Enable camera permission') || ''\n : isLocalVideoEnabled\n ? t('Tooltip.Disable camera')\n : t('Tooltip.Enable camera')\n }`}\n disabled={!isVideoCallButtonVisible}\n className={`${!isVideoCallButtonVisible ? 'pi-cursor-auto' : ''}`}\n >\n <FontAwesomeIcon\n className='pi-h-6 pi-w-6'\n icon={isLocalVideoEnabled ? faVideoSlash : faVideo}\n />\n </Button>\n )}\n\n {/* Share screen button */}\n {janus.current.webRTCAdapter.browserDetails.browser !== 'safari' &&\n userInfo?.profile?.macro_permissions?.nethvoice_cti?.permissions?.screen_sharing\n ?.value &&\n !screenShareActive && (\n <Button\n variant='default'\n onClick={() => initAndStartScreenShare()}\n data-tooltip-id='tooltip-start-screen-share'\n data-tooltip-content={t('Tooltip.Share screen') || ''}\n >\n <FontAwesomeIcon className='pi-h-6 pi-w-6' icon={faDisplay} />\n </Button>\n )}\n\n {/* stop screen share */}\n {screenShareActive && screenShareRole === 'publisher' && (\n <Button\n variant='default'\n onClick={() => stopScreenShare()}\n data-tooltip-id='tooltip-stop-screen-share'\n data-tooltip-content={t('Tooltip.Stop sharing')}\n >\n <FontAwesomeIcon className='pi-h-6 pi-w-6' icon={faDisplaySlash} />\n </Button>\n )}\n\n {/* fullscreen */}\n {screenShareActive && screenShareRole === 'listener' && (\n <Button\n variant='default'\n onClick={() => toggleFullScreen()}\n data-tooltip-id='tooltip-toggle-fullscreen'\n data-tooltip-content={\n isFullscreen ? t('Tooltip.Exit fullscreen') : t('Tooltip.Enter fullscreen')\n }\n >\n <FontAwesomeIcon\n className='pi-h-6 pi-w-6'\n icon={isFullscreen ? faCompress : faExpand}\n />\n </Button>\n )}\n\n {/* record */}\n {userInfo?.profile?.macro_permissions?.settings?.permissions?.recording?.value && (\n <Button\n variant='default'\n onClick={() => recordCurrentCall(isRecording)}\n data-tooltip-id='tooltip-record-video-view'\n data-tooltip-content={\n isRecording ? t('Tooltip.Stop recording') : t('Tooltip.Record')\n }\n >\n <FontAwesomeIcon\n className='pi-h-6 pi-w-6'\n icon={isRecording ? faStop : faRecord}\n />\n </Button>\n )}\n\n {/* hold */}\n {!(intrudeListenStatus?.isIntrude || intrudeListenStatus?.isListen) && (\n <Button\n variant='default'\n onClick={() => (paused ? unpauseCurrentCall() : pauseCall())}\n data-tooltip-id='tooltip-pause-video-view'\n data-tooltip-content={paused ? t('Tooltip.Play') : t('Tooltip.Pause')}\n >\n <FontAwesomeIcon className='pi-h-6 pi-w-6' icon={paused ? faPlay : faPause} />\n </Button>\n )}\n </div>\n <Hangup buttonsVariant='default' />\n </div>\n {/* Buttons tooltips */}\n <CustomThemedTooltip className='pi-z-20' id='tooltip-mute-video-view' place='bottom' />\n <CustomThemedTooltip className='pi-z-20' id='tooltip-toggle-video' place='bottom' />\n <CustomThemedTooltip className='pi-z-20' id='tooltip-toggle-fullscreen' place='bottom' />\n <CustomThemedTooltip className='pi-z-20' id='tooltip-start-screen-share' place='bottom' />\n <CustomThemedTooltip className='pi-z-20' id='tooltip-stop-screen-share' place='bottom' />\n <CustomThemedTooltip className='pi-z-20' id='tooltip-record-video-view' place='bottom' />\n <CustomThemedTooltip className='pi-z-20' id='tooltip-pause-video-view' place='bottom' />\n </div>\n ) : (\n // collapsed view\n <>\n <div className='pi-flex pi-justify-between pi-items-center'>\n <Avatar />\n <Timer startTime={startTime} isNotAlwaysWhite />\n {!isOpen && remoteAudioStream && !isPhysical() && (\n <AudioBars\n audioStream={remoteAudioStream}\n paused={paused}\n size={isOpen ? 'large' : 'small'}\n />\n )}\n </div>\n </>\n )}\n </>\n )\n}\n\nexport default VideoView\n"],"names":["VideoView","dispatch","useDispatch","_l","useSelector","state","currentCall","muted","startTime","isRecording","paused","isLocalVideoEnabled","showRemoteVideoPlaceHolder","hasVideoTrackAdded","displayName","isStartingVideoCall","_m","screenShare","localTracks","localVideos","screenShareRole","role","screenShareActive","active","isStartingScreenShare","isJoiningScreenShare","isLeavingScreenShare","intrudeListenStatus","listen","isOpen","island","_o","webrtc","janusInstance","remoteAudioStream","userInfo","store","getState","currentUser","_p","useState","isFullscreen","setIsFullscreen","_q","isUiShown","setUiShown","uiTimeoutRef","useRef","debounceTimerRef","videoRenegotiationInFlightRef","screenSharePublisherJoinRequestedRef","screenShareViewRef","localScreen","remoteScreen","localVideo","largeRemoteVideo","smallRemoteVideo","janus","JanusLib","videoInputDevices","select","mediaDevices","useIsomorphicLayoutEffect","player","updatePlayer","useEffect","updateScreenStreams","updateVideoStreams","addEventListener","handleFullscreenChange","removeEventListener","current","clearTimeout","enableVideo","updateCurrentCall","initAndStartScreenShare","update","initAndJoinScreenShare","leaveScreenShare","localVideoElement","largeRemoteVideoElement","smallRemoteVideoElement","_a","localVideoStream","remoteVideoStream","attachMediaStream","MediaStream","getVideoTracks","length","document","fullscreenElement","toggleFullScreen","exitFullscreen","eventDispatch","requestFullscreen","useEventListener","newRemoteFeed","id","display","source","remoteFeed","attach","plugin","opaqueId","randomString","success","pluginHandle","remoteTracks","remoteVideos","_b","log","call","getPlugin","getId","_d","_c","request","room","ptype","feed","send","message","error","iceState","rfindex","webrtcState","on","slowLink","uplink","lost","mid","warn","onmessage","msg","jsep","debug","event","_f","_e","_h","_g","_k","_j","createAnswer","tracks","type","body","onlocaltrack","track","onremotetrack","metadata","reason","kind","remoteScreenStream","stopAllTracks","stream","remoteScreenElement","oncleanup","sipcall","currentVideoInputDeviceId","getCurrentVideoInputDeviceId","recv","capture","deviceId","exact","videoTransceiver","webrtcStuff","pc","getTransceivers","find","transceiver","receiver","sender","Boolean","replace","setVideoTrackAdded","add","push","createOffer","socket","destUser","callUser","websocket","username","emit","dispatchVideoCallStarted","initiator","console","JSON","stringify","disableVideo","updateLocalVideoStream","setLocalVideoEnabled","__assign","remove","initScreenShare","setTimeout","isExtensionEnabled","create","description","bitrate","publishers","result","register","shareScreen","joinScreenShare","consentDialog","mediaState","medium","_w","audio","video","list","f","leaving","_r","_t","_s","_v","_u","handleRemoteJsep","trackId","stream_2","localScreenStream","localScreenElement","inviteOtherUser","stopScreenShare","iceConnectionState","stream_1","getTracks","i","mst","stop","e","filteredTracks","filter","destUsername","roomId","joinMessage","handleMouseMoveWithDebounce","detach","isVideoCallButtonVisible","setIsVideoCallButtonVisible","checkCameraPermission","__awaiter","checkWebCamPermission","sent","React","createElement","Fragment","ref","onMouseMove","className","autoPlay","concat","getInitials","name","isListen","Button","variant","onClick","unmuteCurrentCall","muteCurrentCall","t","FontAwesomeIcon","icon","faMicrophoneSlash","faMicrophone","disabled","faVideoSlash","faVideo","webRTCAdapter","browserDetails","browser","profile","macro_permissions","nethvoice_cti","permissions","screen_sharing","value","faDisplay","faDisplaySlash","faCompress","faExpand","settings","recording","recordCurrentCall","faStop","faRecord","isIntrude","unpauseCurrentCall","pauseCurrentCall","faPlay","faPause","Hangup","buttonsVariant","CustomThemedTooltip","place","Avatar","Timer","isNotAlwaysWhite","isPhysical","AudioBars","audioStream","size"],"mappings":"s1CA0DaA,EAAgC,mCACrCC,EAAWC,EAAAA,cACXC,EAUFC,EAAAA,aAAY,SAACC,GAAqB,OAAAA,EAAMC,WAAW,IATrDC,EAAKJ,EAAAI,MACLC,EAASL,EAAAK,UACTC,EAAWN,EAAAM,YACXC,EAAMP,EAAAO,OACNC,EAAmBR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UA,cAC1CtD,EAAAA,QAAAC,cAACsD,YACC,CAAAC,YAAa7Q,GACbxB,OAAQA,EACRsS,KAAMnR,GAAS,QAAU,YAQzC"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),i=require("../utils/customHooks/useEventListener.js"),r=require("../utils/genericFunctions/eventDispatch.js");require("../node_modules/tslib/tslib.es6.js"),require("../store/index.js");var t=require("../lib/player/audio.js");require("../node_modules/react-redux/es/index.js");var a=require("../node_modules/react-redux/es/hooks/useDispatch.js");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("../node_modules/react-redux/es/components/Context.js"),require("../node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js"),require("../node_modules/react-redux/node_modules/react-is/index.js");var s=n(e);exports.PlayerEvents=function(){var e=a.useDispatch();return i.useEventListener("phone-island-audio-player-start",(function(i){if(i.type){if("ringtone_preview"===i.type)return void(i.base64_audio_file&&(e.island.setIslandView("player"),e.player.setAudioPlayerType("ringtone_preview"),e.player.updateStartAudioPlayer({src:i.base64_audio_file,useRingtoneOutput:!0}),i.description&&e.player.setAudioPlayerTrackName(i.description)));if(!i.id)return void console.error("phone-island-audio-player-start: when a type is provided, the id is required");"announcement"===i.type?(t.getAnnouncementName(null==i?void 0:i.id),t.playAnnouncement(null==i?void 0:i.id)):"call_recording"===(null==i?void 0:i.type)?(t.getRecordingName(null==i?void 0:i.id),t.playCallRecording(null==i?void 0:i.id)):"voicemail"===(null==i?void 0:i.type)&&(t.getVoicemailName(null==i?void 0:i.id),t.playVoicemail(null==i?void 0:i.id))}else i.base64_audio_file&&(e.island.setIslandView("player"),e.player.resetAudioPlayerType(),e.player.updateStartAudioPlayer({src:i.base64_audio_file})),i.description&&e.player.setAudioPlayerTrackName(i.description)})),s.default.createElement(s.default.Fragment,null)},exports.dispatchAudioPlayerStarted=function(){r.eventDispatch("phone-island-audio-player-started",{})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),i=require("../utils/customHooks/useEventListener.js"),r=require("../utils/genericFunctions/eventDispatch.js");require("../node_modules/tslib/tslib.es6.js"),require("../store/index.js");var t=require("../lib/player/audio.js");require("../node_modules/react-redux/es/index.js");var a=require("../node_modules/react-redux/es/hooks/useDispatch.js");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("../node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js"),require("../node_modules/react-redux/node_modules/react-is/index.js");var s=n(e);exports.PlayerEvents=function(){var e=a.useDispatch();return i.useEventListener("phone-island-audio-player-start",(function(i){if(i.type){if("ringtone_preview"===i.type)return void(i.base64_audio_file&&(e.island.setIslandView("player"),e.player.setAudioPlayerType("ringtone_preview"),e.player.updateStartAudioPlayer({src:i.base64_audio_file,useRingtoneOutput:!0}),i.description&&e.player.setAudioPlayerTrackName(i.description)));if(!i.id)return void console.error("phone-island-audio-player-start: when a type is provided, the id is required");"announcement"===i.type?(t.getAnnouncementName(null==i?void 0:i.id),t.playAnnouncement(null==i?void 0:i.id)):"call_recording"===(null==i?void 0:i.type)?(t.getRecordingName(null==i?void 0:i.id),t.playCallRecording(null==i?void 0:i.id)):"voicemail"===(null==i?void 0:i.type)&&(t.getVoicemailName(null==i?void 0:i.id),t.playVoicemail(null==i?void 0:i.id))}else i.base64_audio_file&&(e.island.setIslandView("player"),e.player.resetAudioPlayerType(),e.player.updateStartAudioPlayer({src:i.base64_audio_file})),i.description&&e.player.setAudioPlayerTrackName(i.description)})),s.default.createElement(s.default.Fragment,null)},exports.dispatchAudioPlayerStarted=function(){r.eventDispatch("phone-island-audio-player-started",{})};
2
2
  //# sourceMappingURL=PlayerEvents.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PlayerEvents.js","sources":["../../src/events/PlayerEvents.tsx"],"sourcesContent":["// Copyright (C) 2024 Nethesis S.r.l.\n// SPDX-License-Identifier: AGPL-3.0-or-later\n\nimport React, { type FC } from 'react'\nimport { eventDispatch } from '../utils'\nimport { useEventListener } from '../utils'\nimport {\n playAnnouncement,\n playCallRecording,\n getRecordingName,\n getAnnouncementName,\n getVoicemailName,\n playVoicemail,\n} from '../lib/player/audio'\nimport { type PlayerStartTypes } from '../types'\nimport { useDispatch } from 'react-redux'\nimport { Dispatch } from '../store'\n\nexport const PlayerEvents: FC = () => {\n const dispatch = useDispatch<Dispatch>()\n\n /**\n * Event listner for phone-island-audio-player-start event\n */\n useEventListener('phone-island-audio-player-start', (data: PlayerStartTypes) => {\n if (data.type) {\n // Handle ringtone preview separately (doesn't require id)\n if (data.type === 'ringtone_preview') {\n if (data.base64_audio_file) {\n dispatch.island.setIslandView('player')\n dispatch.player.setAudioPlayerType('ringtone_preview')\n dispatch.player.updateStartAudioPlayer({\n src: data.base64_audio_file,\n useRingtoneOutput: true,\n })\n if (data.description) {\n dispatch.player.setAudioPlayerTrackName(data.description)\n }\n }\n return\n }\n \n // Check the id required when a type is provided (for other types)\n if (!data.id) {\n console.error(\n 'phone-island-audio-player-start: when a type is provided, the id is required',\n )\n return\n }\n // Manage types\n if (data.type === 'announcement') {\n getAnnouncementName(data?.id)\n playAnnouncement(data?.id)\n } else if (data?.type === 'call_recording') {\n getRecordingName(data?.id)\n playCallRecording(data?.id)\n } else if (data?.type === 'voicemail') {\n getVoicemailName(data?.id)\n playVoicemail(data?.id)\n }\n } else {\n if (data.base64_audio_file) {\n // Play the base64 audio file\n dispatch.island.setIslandView('player')\n dispatch.player.resetAudioPlayerType()\n dispatch.player.updateStartAudioPlayer({\n src: data.base64_audio_file,\n })\n }\n if (data.description) {\n dispatch.player.setAudioPlayerTrackName(data.description)\n }\n }\n })\n\n return <></>\n}\n\n/**\n * Dispatch call start\n */\nexport function dispatchAudioPlayerStarted() {\n eventDispatch('phone-island-audio-player-started', {})\n}\n"],"names":["dispatch","useDispatch","useEventListener","data","type","base64_audio_file","island","setIslandView","player","setAudioPlayerType","updateStartAudioPlayer","src","useRingtoneOutput","description","setAudioPlayerTrackName","id","console","error","getAnnouncementName","playAnnouncement","getRecordingName","playCallRecording","getVoicemailName","playVoicemail","resetAudioPlayerType","React","eventDispatch"],"mappings":"yvBAkBgC,WAC9B,IAAMA,EAAWC,EAAAA,cAwDjB,OAnDAC,mBAAiB,mCAAmC,SAACC,GACnD,GAAIA,EAAKC,KAAM,CAEb,GAAkB,qBAAdD,EAAKC,KAYP,YAXID,EAAKE,oBACPL,EAASM,OAAOC,cAAc,UAC9BP,EAASQ,OAAOC,mBAAmB,oBACnCT,EAASQ,OAAOE,uBAAuB,CACrCC,IAAKR,EAAKE,kBACVO,mBAAmB,IAEjBT,EAAKU,aACPb,EAASQ,OAAOM,wBAAwBX,EAAKU,eAOnD,IAAKV,EAAKY,GAIR,YAHAC,QAAQC,MACN,gFAKc,iBAAdd,EAAKC,MACPc,sBAAoBf,eAAAA,EAAMY,IAC1BI,mBAAiBhB,eAAAA,EAAMY,KACC,oBAAfZ,aAAI,EAAJA,EAAMC,OACfgB,mBAAiBjB,eAAAA,EAAMY,IACvBM,oBAAkBlB,eAAAA,EAAMY,KACA,eAAfZ,aAAI,EAAJA,EAAMC,QACfkB,mBAAiBnB,eAAAA,EAAMY,IACvBQ,gBAAcpB,eAAAA,EAAMY,IAEvB,MACKZ,EAAKE,oBAEPL,EAASM,OAAOC,cAAc,UAC9BP,EAASQ,OAAOgB,uBAChBxB,EAASQ,OAAOE,uBAAuB,CACrCC,IAAKR,EAAKE,qBAGVF,EAAKU,aACPb,EAASQ,OAAOM,wBAAwBX,EAAKU,YAGnD,IAEOY,gDACT,gDAMEC,gBAAc,oCAAqC,CAAA,EACrD"}
1
+ {"version":3,"file":"PlayerEvents.js","sources":["../../src/events/PlayerEvents.tsx"],"sourcesContent":["// Copyright (C) 2024 Nethesis S.r.l.\n// SPDX-License-Identifier: AGPL-3.0-or-later\n\nimport React, { type FC } from 'react'\nimport { eventDispatch } from '../utils'\nimport { useEventListener } from '../utils'\nimport {\n playAnnouncement,\n playCallRecording,\n getRecordingName,\n getAnnouncementName,\n getVoicemailName,\n playVoicemail,\n} from '../lib/player/audio'\nimport { type PlayerStartTypes } from '../types'\nimport { useDispatch } from 'react-redux'\nimport { Dispatch } from '../store'\n\nexport const PlayerEvents: FC = () => {\n const dispatch = useDispatch<Dispatch>()\n\n /**\n * Event listner for phone-island-audio-player-start event\n */\n useEventListener('phone-island-audio-player-start', (data: PlayerStartTypes) => {\n if (data.type) {\n // Handle ringtone preview separately (doesn't require id)\n if (data.type === 'ringtone_preview') {\n if (data.base64_audio_file) {\n dispatch.island.setIslandView('player')\n dispatch.player.setAudioPlayerType('ringtone_preview')\n dispatch.player.updateStartAudioPlayer({\n src: data.base64_audio_file,\n useRingtoneOutput: true,\n })\n if (data.description) {\n dispatch.player.setAudioPlayerTrackName(data.description)\n }\n }\n return\n }\n \n // Check the id required when a type is provided (for other types)\n if (!data.id) {\n console.error(\n 'phone-island-audio-player-start: when a type is provided, the id is required',\n )\n return\n }\n // Manage types\n if (data.type === 'announcement') {\n getAnnouncementName(data?.id)\n playAnnouncement(data?.id)\n } else if (data?.type === 'call_recording') {\n getRecordingName(data?.id)\n playCallRecording(data?.id)\n } else if (data?.type === 'voicemail') {\n getVoicemailName(data?.id)\n playVoicemail(data?.id)\n }\n } else {\n if (data.base64_audio_file) {\n // Play the base64 audio file\n dispatch.island.setIslandView('player')\n dispatch.player.resetAudioPlayerType()\n dispatch.player.updateStartAudioPlayer({\n src: data.base64_audio_file,\n })\n }\n if (data.description) {\n dispatch.player.setAudioPlayerTrackName(data.description)\n }\n }\n })\n\n return <></>\n}\n\n/**\n * Dispatch call start\n */\nexport function dispatchAudioPlayerStarted() {\n eventDispatch('phone-island-audio-player-started', {})\n}\n"],"names":["dispatch","useDispatch","useEventListener","data","type","base64_audio_file","island","setIslandView","player","setAudioPlayerType","updateStartAudioPlayer","src","useRingtoneOutput","description","setAudioPlayerTrackName","id","console","error","getAnnouncementName","playAnnouncement","getRecordingName","playCallRecording","getVoicemailName","playVoicemail","resetAudioPlayerType","React","eventDispatch"],"mappings":"yrBAkBgC,WAC9B,IAAMA,EAAWC,EAAAA,cAwDjB,OAnDAC,mBAAiB,mCAAmC,SAACC,GACnD,GAAIA,EAAKC,KAAM,CAEb,GAAkB,qBAAdD,EAAKC,KAYP,YAXID,EAAKE,oBACPL,EAASM,OAAOC,cAAc,UAC9BP,EAASQ,OAAOC,mBAAmB,oBACnCT,EAASQ,OAAOE,uBAAuB,CACrCC,IAAKR,EAAKE,kBACVO,mBAAmB,IAEjBT,EAAKU,aACPb,EAASQ,OAAOM,wBAAwBX,EAAKU,eAOnD,IAAKV,EAAKY,GAIR,YAHAC,QAAQC,MACN,gFAKc,iBAAdd,EAAKC,MACPc,sBAAoBf,eAAAA,EAAMY,IAC1BI,mBAAiBhB,eAAAA,EAAMY,KACC,oBAAfZ,aAAI,EAAJA,EAAMC,OACfgB,mBAAiBjB,eAAAA,EAAMY,IACvBM,oBAAkBlB,eAAAA,EAAMY,KACA,eAAfZ,aAAI,EAAJA,EAAMC,QACfkB,mBAAiBnB,eAAAA,EAAMY,IACvBQ,gBAAcpB,eAAAA,EAAMY,IAEvB,MACKZ,EAAKE,oBAEPL,EAASM,OAAOC,cAAc,UAC9BP,EAASQ,OAAOgB,uBAChBxB,EAASQ,OAAOE,uBAAuB,CACrCC,IAAKR,EAAKE,qBAGVF,EAAKU,aACPb,EAASQ,OAAOM,wBAAwBX,EAAKU,YAGnD,IAEOY,gDACT,gDAMEC,gBAAc,oCAAqC,CAAA,EACrD"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),require("../../node_modules/mic-check/lib/index.js");var e=require("../webrtc/janus.js"),i=require("../../store/index.js"),r=require("../user/default_device.js");require("react");var t=require("../../utils/genericFunctions/localStorage.js");require("../../node_modules/tslib/tslib.es6.js");var n=require("../../_virtual/index9.js"),o=e.default;exports.checkMediaPermissions=function(){if(r.isPhysical())return i.store.dispatch.alerts.removeAlert("browser_permissions"),i.store.dispatch.alerts.removeAlert("user_permissions"),i.store.dispatch.alerts.removeAlert("busy_camera"),void i.store.dispatch.alerts.removeAlert("unknown_media_permissions");n.__exports.requestMediaPermissions({audio:!0}).then((function(){})).catch((function(e){var r,t,s=e.type,d=null!==(t=((r={})[n.__exports.MediaPermissionsErrorType.SystemPermissionDenied]={alert:"browser_permissions",message:"WebRTC: browser does not have permission to access camera or microphone"},r[n.__exports.MediaPermissionsErrorType.UserPermissionDenied]={alert:"user_permissions",message:"WebRTC: user didn't allow app to access camera or microphone"},r)[s])&&void 0!==t?t:{alert:"unknown_media_permissions",message:"WebRTC: can't access audio or camera on this device. unknown error"};i.store.dispatch.alerts.setAlert(d.alert),o.error&&o.error(d.message)}))},exports.checkWebCamPermission=function(){return new Promise((function(e){n.__exports.requestMediaPermissions({video:!0}).then((function(){e(!0)})).catch((function(i){console.error("Error requesting webcam permission:",i),e(!1)}))}))},exports.getCurrentAudioInputDeviceId=function(){var e=t.getJSONItem("phone-island-audio-input-device").deviceId||null,r=i.store.select.mediaDevices.audioInputDevices(i.store.getState());if(r.find((function(i){return i.deviceId===e})))return e;var n=r.find((function(e){return"default"===e.deviceId||""===e.deviceId}))||r[0],o=n?n.deviceId:"default";return null!==e&&o!==e&&(console.warn("Audio input device ".concat(e," no longer available, falling back to default device")),t.setJSONItem("phone-island-audio-input-device",{deviceId:o})),o},exports.getCurrentAudioOutputDeviceId=function(){var e=t.getJSONItem("phone-island-audio-output-device").deviceId||null,r=i.store.select.mediaDevices.audioOutputDevices(i.store.getState());if(r.find((function(i){return i.deviceId===e})))return e;var n=r.find((function(e){return"default"===e.deviceId||""===e.deviceId}))||r[0],o=n?n.deviceId:"default";return null!==e&&o!==e&&(console.warn("Audio output device ".concat(e," no longer available, falling back to default device")),t.setJSONItem("phone-island-audio-output-device",{deviceId:o})),o},exports.getCurrentVideoInputDeviceId=function(){var e=t.getJSONItem("phone-island-video-input-device").deviceId||null,r=i.store.select.mediaDevices.videoInputDevices(i.store.getState());if(r.find((function(i){return i.deviceId===e})))return e;var n=r.find((function(e){return"default"===e.deviceId||""===e.deviceId}))||r[0],o=n?n.deviceId:"default";return null!==e&&o!==e&&(console.warn("Video input device ".concat(e," no longer available, falling back to default device")),t.setJSONItem("phone-island-video-input-device",{deviceId:o})),o},exports.getSupportedDevices=function(e){var i,r,t=!1,n=!1,s=!1,d=!1;i=function(){var i={audio:t,audioCap:s,video:n,videoCap:d};o.log&&o.log("supportedDevices=",i),e()},r=[],navigator.mediaDevices.enumerateDevices().then((function(e){e.forEach((function(e){var i=!1;r.forEach((function(r){r.deviceId===e.deviceId&&r.kind===e.kind&&(i=!0)})),i||("videoinput"!==e.kind||d||(d=!0),"audioinput"!==e.kind||s||(s=!0),"audioinput"===e.kind&&(t=!0),e.kind,"videoinput"===e.kind&&(n=!0),r.push(e))})),i&&i()}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),require("../../node_modules/mic-check/lib/index.js");var e=require("../webrtc/janus.js"),i=require("../../store/index.js"),r=require("../user/default_device.js");require("react");var t=require("../../utils/genericFunctions/localStorage.js");require("../../node_modules/tslib/tslib.es6.js");var n=require("../../_virtual/index6.js"),o=e.default;exports.checkMediaPermissions=function(){if(r.isPhysical())return i.store.dispatch.alerts.removeAlert("browser_permissions"),i.store.dispatch.alerts.removeAlert("user_permissions"),i.store.dispatch.alerts.removeAlert("busy_camera"),void i.store.dispatch.alerts.removeAlert("unknown_media_permissions");n.__exports.requestMediaPermissions({audio:!0}).then((function(){})).catch((function(e){var r,t,s=e.type,d=null!==(t=((r={})[n.__exports.MediaPermissionsErrorType.SystemPermissionDenied]={alert:"browser_permissions",message:"WebRTC: browser does not have permission to access camera or microphone"},r[n.__exports.MediaPermissionsErrorType.UserPermissionDenied]={alert:"user_permissions",message:"WebRTC: user didn't allow app to access camera or microphone"},r)[s])&&void 0!==t?t:{alert:"unknown_media_permissions",message:"WebRTC: can't access audio or camera on this device. unknown error"};i.store.dispatch.alerts.setAlert(d.alert),o.error&&o.error(d.message)}))},exports.checkWebCamPermission=function(){return new Promise((function(e){n.__exports.requestMediaPermissions({video:!0}).then((function(){e(!0)})).catch((function(i){console.error("Error requesting webcam permission:",i),e(!1)}))}))},exports.getCurrentAudioInputDeviceId=function(){var e=t.getJSONItem("phone-island-audio-input-device").deviceId||null,r=i.store.select.mediaDevices.audioInputDevices(i.store.getState());if(r.find((function(i){return i.deviceId===e})))return e;var n=r.find((function(e){return"default"===e.deviceId||""===e.deviceId}))||r[0],o=n?n.deviceId:"default";return null!==e&&o!==e&&(console.warn("Audio input device ".concat(e," no longer available, falling back to default device")),t.setJSONItem("phone-island-audio-input-device",{deviceId:o})),o},exports.getCurrentAudioOutputDeviceId=function(){var e=t.getJSONItem("phone-island-audio-output-device").deviceId||null,r=i.store.select.mediaDevices.audioOutputDevices(i.store.getState());if(r.find((function(i){return i.deviceId===e})))return e;var n=r.find((function(e){return"default"===e.deviceId||""===e.deviceId}))||r[0],o=n?n.deviceId:"default";return null!==e&&o!==e&&(console.warn("Audio output device ".concat(e," no longer available, falling back to default device")),t.setJSONItem("phone-island-audio-output-device",{deviceId:o})),o},exports.getCurrentVideoInputDeviceId=function(){var e=t.getJSONItem("phone-island-video-input-device").deviceId||null,r=i.store.select.mediaDevices.videoInputDevices(i.store.getState());if(r.find((function(i){return i.deviceId===e})))return e;var n=r.find((function(e){return"default"===e.deviceId||""===e.deviceId}))||r[0],o=n?n.deviceId:"default";return null!==e&&o!==e&&(console.warn("Video input device ".concat(e," no longer available, falling back to default device")),t.setJSONItem("phone-island-video-input-device",{deviceId:o})),o},exports.getSupportedDevices=function(e){var i,r,t=!1,n=!1,s=!1,d=!1;i=function(){var i={audio:t,audioCap:s,video:n,videoCap:d};o.log&&o.log("supportedDevices=",i),e()},r=[],navigator.mediaDevices.enumerateDevices().then((function(e){e.forEach((function(e){var i=!1;r.forEach((function(r){r.deviceId===e.deviceId&&r.kind===e.kind&&(i=!0)})),i||("videoinput"!==e.kind||d||(d=!0),"audioinput"!==e.kind||s||(s=!0),"audioinput"===e.kind&&(t=!0),e.kind,"videoinput"===e.kind&&(n=!0),r.push(e))})),i&&i()}))};
2
2
  //# sourceMappingURL=devices.js.map