@nethesis/phone-island 0.13.2 → 0.13.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.
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react");require("../../node_modules/react-redux/es/index.js");var t=require("../../store/index.js"),i=require("../Button.js"),o=require("../../node_modules/@fortawesome/react-fontawesome/index.es.js"),r=require("../../node_modules/@fortawesome/free-solid-svg-icons/index.mjs.js"),n=require("../../node_modules/@nethesis/nethesis-solid-svg-icons/index.mjs.js");require("../../node_modules/@babel/runtime/helpers/defineProperty.js"),require("../../node_modules/@babel/runtime/helpers/objectWithoutProperties.js"),require("../../node_modules/@babel/runtime/helpers/typeof.js"),require("../../node_modules/html-parse-stringify/dist/html-parse-stringify.js"),require("../../node_modules/react-i18next/dist/es/context.js");var s=require("../../node_modules/react-i18next/dist/es/useTranslation.js");require("../../node_modules/@babel/runtime/helpers/slicedToArray.js");var l=require("../../lib/phone/call.js"),a=require("../CustomThemedTooltip.js"),d=require("../../utils/deviceUtils.js"),u=require("../../lib/webrtc/janus.js"),c=require("../../node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs.js"),p=require("../../node_modules/framer-motion/dist/es/render/dom/motion.mjs.js"),m=require("../../node_modules/react-redux/es/hooks/useDispatch.js"),f=require("../../node_modules/react-redux/es/hooks/useSelector.js");function v(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var h=v(e);exports.default=function(v){var w,x,g,j,b,q,S,_,E,T,C=v.isVisible,y=m.useDispatch(),A=f.useSelector((function(e){return e.island})).isOpen,V=f.useSelector((function(e){return e.currentCall})).isRecording,R=f.useSelector((function(e){return e.currentUser})),D=f.useSelector((function(e){return e.users})),I=s.useTranslation().t,k=e.useState([]),N=k[0],B=k[1],F=t.store.select.mediaDevices.videoInputDevices(t.store.getState()),P=e.useRef(u.default),O=function(e){y.island.toggleSideViewVisible(!1),null!==e&&y.island.setIslandView(e)};return e.useEffect((function(){B(d.getAvailableDevices(R,D))}),[]),h.default.createElement(h.default.Fragment,null,h.default.createElement(c.AnimatePresence,null,C&&h.default.createElement(p.motion.div,{className:"pi-absolute pi-h-full pi-bg-gray-700 pi-flex pi-flex-col pi-items-center pi-text-gray-50 dark:pi-text-gray-50 -pi-mr-10 pi-right-0 -pi-z-10 pi-pointer-events-auto ".concat(A?"pi-py-6":"pi-py-4"),style:{borderTopRightRadius:"20px",borderBottomRightRadius:"20px",width:"80px",transformOrigin:"right"},initial:{x:-76},animate:{x:4,transition:{duration:.2,ease:"easeOut"}},exit:{x:-76,transition:{duration:.2,ease:"easeIn"}}},h.default.createElement("div",{className:"pi-flex pi-flex-col pi-items-center pi-gap-3.5 pi-flex-1 pi-ml-9"},(null===(b=null===(j=null===(g=null===(x=null===(w=null==R?void 0:R.profile)||void 0===w?void 0:w.macro_permissions)||void 0===x?void 0:x.settings)||void 0===g?void 0:g.permissions)||void 0===j?void 0:j.recording)||void 0===b?void 0:b.value)&&h.default.createElement(i.Button,{active:V,"data-stop-propagation":!0,variant:"transparentSideView",onClick:function(){return l.recordCurrentCall(V)},"data-tooltip-id":"tooltip-record","data-tooltip-content":V?I("Tooltip.Stop recording")||"":I("Tooltip.Record")||""},V?h.default.createElement(o.FontAwesomeIcon,{icon:r.faStop,className:"pi-h-5 pi-w-5 pi-text-white"}):h.default.createElement(o.FontAwesomeIcon,{className:"pi-h-5 pi-w-5 pi-text-white",icon:n.faRecord})),(null==F?void 0:F.length)>0&&h.default.createElement(i.Button,{variant:"transparentSideView",onClick:function(){return O("video"),void t.store.dispatch.currentCall.updateCurrentCall({isLocalVideoEnabled:!0,isStartingVideoCall:!0})},"data-tooltip-id":"tooltip-video","data-tooltip-content":I("Tooltip.Enable camera")||""},h.default.createElement(o.FontAwesomeIcon,{className:"pi-h-5 pi-w-5 pi-text-white",icon:r.faVideo})),"safari"!==P.current.webRTCAdapter.browserDetails.browser&&(null===(T=null===(E=null===(_=null===(S=null===(q=null==R?void 0:R.profile)||void 0===q?void 0:q.macro_permissions)||void 0===S?void 0:S.nethvoice_cti)||void 0===_?void 0:_.permissions)||void 0===E?void 0:E.screen_sharing)||void 0===T?void 0:T.value)&&h.default.createElement(i.Button,{variant:"transparentSideView",onClick:function(){return O("video"),void t.store.dispatch.screenShare.update({isStartingScreenShare:!0})},"data-tooltip-id":"tooltip-screen-share","data-tooltip-content":I("Tooltip.Share screen")||""},h.default.createElement(o.FontAwesomeIcon,{className:"pi-h-5 pi-w-5 pi-text-white",icon:r.faDisplay})),(null==N?void 0:N.length)>0&&h.default.createElement(i.Button,{variant:"transparentSideView","data-tooltip-id":"tooltip-switch-device","data-tooltip-content":I("Tooltip.Switch device")||"",onClick:function(){return O("switchDevice")}},h.default.createElement(o.FontAwesomeIcon,{className:"pi-h-5 pi-w-5 pi-text-white",icon:n.faArrowsRepeat}))))),h.default.createElement(a.CustomThemedTooltip,{id:"tooltip-record",place:"left"}),h.default.createElement(a.CustomThemedTooltip,{id:"tooltip-video",place:"left"}),h.default.createElement(a.CustomThemedTooltip,{id:"tooltip-screen-share",place:"left"}),h.default.createElement(a.CustomThemedTooltip,{id:"tooltip-switch-device",place:"left"}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../node_modules/tslib/tslib.es6.js"),t=require("react");require("../../node_modules/react-redux/es/index.js");var i=require("../../store/index.js"),o=require("../Button.js"),r=require("../../node_modules/@fortawesome/react-fontawesome/index.es.js"),n=require("../../node_modules/@fortawesome/free-solid-svg-icons/index.mjs.js"),s=require("../../node_modules/@nethesis/nethesis-solid-svg-icons/index.mjs.js");require("../../node_modules/@babel/runtime/helpers/defineProperty.js"),require("../../node_modules/@babel/runtime/helpers/objectWithoutProperties.js"),require("../../node_modules/@babel/runtime/helpers/typeof.js"),require("../../node_modules/html-parse-stringify/dist/html-parse-stringify.js"),require("../../node_modules/react-i18next/dist/es/context.js");var a=require("../../node_modules/react-i18next/dist/es/useTranslation.js");require("../../node_modules/@babel/runtime/helpers/slicedToArray.js");var l=require("../../lib/phone/call.js"),d=require("../CustomThemedTooltip.js"),u=require("../../utils/deviceUtils.js"),c=require("../../lib/webrtc/janus.js"),p=require("../../lib/devices/devices.js"),m=require("../../node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs.js"),f=require("../../node_modules/framer-motion/dist/es/render/dom/motion.mjs.js"),v=require("../../node_modules/react-redux/es/hooks/useDispatch.js"),h=require("../../node_modules/react-redux/es/hooks/useSelector.js");function w(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var b=w(t);exports.default=function(w){var x,g,j,_,q,S,E,T,C,y,V=w.isVisible,A=v.useDispatch(),R=h.useSelector((function(e){return e.island})).isOpen,k=h.useSelector((function(e){return e.currentCall})).isRecording,D=h.useSelector((function(e){return e.currentUser})),I=h.useSelector((function(e){return e.users})),N=a.useTranslation().t,B=t.useState([]),F=B[0],P=B[1],O=i.store.select.mediaDevices.videoInputDevices(i.store.getState()),U=t.useRef(c.default),W=function(e){A.island.toggleSideViewVisible(!1),null!==e&&A.island.setIslandView(e)},z=t.useState(!0),L=z[0],M=z[1],G=function(){return e.__awaiter(void 0,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return O.length>0?[4,p.checkWebCamPermission()]:[3,2];case 1:return e.sent()?(M(!0),[2,!0]):(M(!1),[2,!1]);case 2:return M(!1),[2,!1];case 3:return[2]}}))}))};return t.useEffect((function(){P(u.getAvailableDevices(D,I))}),[]),b.default.createElement(b.default.Fragment,null,b.default.createElement(m.AnimatePresence,null,V&&b.default.createElement(f.motion.div,{className:"pi-absolute pi-h-full pi-bg-gray-700 pi-flex pi-flex-col pi-items-center pi-text-gray-50 dark:pi-text-gray-50 -pi-mr-10 pi-right-0 -pi-z-10 pi-pointer-events-auto ".concat(R?"pi-py-6":"pi-py-4"),style:{borderTopRightRadius:"20px",borderBottomRightRadius:"20px",width:"80px",transformOrigin:"right"},initial:{x:-76},animate:{x:4,transition:{duration:.2,ease:"easeOut"}},exit:{x:-76,transition:{duration:.2,ease:"easeIn"}}},b.default.createElement("div",{className:"pi-flex pi-flex-col pi-items-center pi-gap-3.5 pi-flex-1 pi-ml-9"},(null===(q=null===(_=null===(j=null===(g=null===(x=null==D?void 0:D.profile)||void 0===x?void 0:x.macro_permissions)||void 0===g?void 0:g.settings)||void 0===j?void 0:j.permissions)||void 0===_?void 0:_.recording)||void 0===q?void 0:q.value)&&b.default.createElement(o.Button,{active:k,"data-stop-propagation":!0,variant:"transparentSideView",onClick:function(){return l.recordCurrentCall(k)},"data-tooltip-id":"tooltip-record","data-tooltip-content":k?N("Tooltip.Stop recording")||"":N("Tooltip.Record")||""},k?b.default.createElement(r.FontAwesomeIcon,{icon:n.faStop,className:"pi-h-5 pi-w-5 pi-text-white"}):b.default.createElement(r.FontAwesomeIcon,{className:"pi-h-5 pi-w-5 pi-text-white",icon:s.faRecord})),(null==O?void 0:O.length)>0&&b.default.createElement(o.Button,{variant:"transparentSideView",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,G()];case 1:return e.sent()&&(W("video"),i.store.dispatch.currentCall.updateCurrentCall({isLocalVideoEnabled:!0,isStartingVideoCall:!0})),[2]}}))}))},"data-tooltip-id":"tooltip-video","data-tooltip-content":"".concat(L?N("Tooltip.Enable camera")||"":N("Tooltip.Enable permission camera")||""),disabled:!L,className:"".concat(L?"":"pi-cursor-auto")},b.default.createElement(r.FontAwesomeIcon,{className:"pi-h-5 pi-w-5 pi-text-white",icon:L?n.faVideo:n.faVideoSlash})),"safari"!==U.current.webRTCAdapter.browserDetails.browser&&(null===(y=null===(C=null===(T=null===(E=null===(S=null==D?void 0:D.profile)||void 0===S?void 0:S.macro_permissions)||void 0===E?void 0:E.nethvoice_cti)||void 0===T?void 0:T.permissions)||void 0===C?void 0:C.screen_sharing)||void 0===y?void 0:y.value)&&b.default.createElement(o.Button,{variant:"transparentSideView",onClick:function(){return W("video"),void i.store.dispatch.screenShare.update({isStartingScreenShare:!0})},"data-tooltip-id":"tooltip-screen-share","data-tooltip-content":N("Tooltip.Share screen")||""},b.default.createElement(r.FontAwesomeIcon,{className:"pi-h-5 pi-w-5 pi-text-white",icon:n.faDisplay})),(null==F?void 0:F.length)>0&&b.default.createElement(o.Button,{variant:"transparentSideView","data-tooltip-id":"tooltip-switch-device","data-tooltip-content":N("Tooltip.Switch device")||"",onClick:function(){return W("switchDevice")}},b.default.createElement(r.FontAwesomeIcon,{className:"pi-h-5 pi-w-5 pi-text-white",icon:s.faArrowsRepeat}))))),b.default.createElement(d.CustomThemedTooltip,{id:"tooltip-record",place:"left"}),b.default.createElement(d.CustomThemedTooltip,{id:"tooltip-video",place:"left"}),b.default.createElement(d.CustomThemedTooltip,{id:"tooltip-screen-share",place:"left"}),b.default.createElement(d.CustomThemedTooltip,{id:"tooltip-switch-device",place:"left"}))};
2
2
  //# sourceMappingURL=SideView.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SideView.js","sources":["../../../src/components/SideView/SideView.tsx"],"sourcesContent":["import React, { FC, useEffect, useRef, useState } from 'react'\nimport { useDispatch, useSelector } from 'react-redux'\nimport { Dispatch, RootState, store } from '../../store'\nimport { motion, AnimatePresence } from 'framer-motion'\nimport { Button } from '../Button'\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\nimport { faDisplay, faStop, faVideo } from '@fortawesome/free-solid-svg-icons'\nimport { faArrowsRepeat, faRecord } from '@nethesis/nethesis-solid-svg-icons'\nimport { useTranslation } from 'react-i18next'\nimport { recordCurrentCall } from '../../lib/phone/call'\nimport { CustomThemedTooltip } from '../CustomThemedTooltip'\nimport { getAvailableDevices } from '../../utils/deviceUtils'\nimport { JanusTypes } from '../../types/webrtc'\nimport JanusLib from '../../lib/webrtc/janus.js'\n\nconst SideView: FC<SideViewTypes> = ({ isVisible }) => {\n const dispatch = useDispatch<Dispatch>()\n const { isOpen } = useSelector((state: RootState) => state.island)\n const { isRecording } = useSelector((state: RootState) => state.currentCall)\n const userInformation = useSelector((state: RootState) => state.currentUser)\n const allUsersInformation = useSelector((state: RootState) => state.users)\n const { t } = useTranslation()\n const [availableDevices, setAvailableDevices] = useState([])\n const videoInputDevices = store.select.mediaDevices.videoInputDevices(store.getState())\n const janus = useRef<JanusTypes>(JanusLib)\n\n const closeSideViewAndLaunchEvent = (viewType: any) => {\n dispatch.island.toggleSideViewVisible(false)\n if (viewType !== null) {\n dispatch.island.setIslandView(viewType)\n }\n }\n\n const goToVideoCall = () => {\n closeSideViewAndLaunchEvent('video')\n\n store.dispatch.currentCall.updateCurrentCall({\n isLocalVideoEnabled: true,\n isStartingVideoCall: true,\n })\n }\n\n const goToScreenSharing = () => {\n closeSideViewAndLaunchEvent('video')\n\n store.dispatch.screenShare.update({\n isStartingScreenShare: true,\n })\n }\n\n useEffect(() => {\n // check available devices\n\n setAvailableDevices(getAvailableDevices(userInformation, allUsersInformation))\n }, [])\n\n return (\n <>\n <AnimatePresence>\n {isVisible && (\n <motion.div\n className={`pi-absolute pi-h-full pi-bg-gray-700 pi-flex pi-flex-col pi-items-center pi-text-gray-50 dark:pi-text-gray-50 -pi-mr-10 pi-right-0 -pi-z-10 pi-pointer-events-auto ${\n isOpen ? 'pi-py-6' : 'pi-py-4'\n }`}\n style={{\n borderTopRightRadius: '20px',\n borderBottomRightRadius: '20px',\n width: '80px',\n transformOrigin: 'right',\n }}\n initial={{ x: -76 }}\n animate={{\n x: 4,\n transition: {\n duration: 0.2,\n ease: 'easeOut',\n },\n }}\n exit={{\n x: -76,\n transition: {\n duration: 0.2,\n ease: 'easeIn',\n },\n }}\n >\n <div className='pi-flex pi-flex-col pi-items-center pi-gap-3.5 pi-flex-1 pi-ml-9'>\n {/* Recording button */}\n {userInformation?.profile?.macro_permissions?.settings?.permissions?.recording\n ?.value && (\n <Button\n active={isRecording}\n data-stop-propagation={true}\n variant='transparentSideView'\n onClick={() => recordCurrentCall(isRecording)}\n data-tooltip-id='tooltip-record'\n data-tooltip-content={\n isRecording ? t('Tooltip.Stop recording') || '' : t('Tooltip.Record') || ''\n }\n >\n {isRecording ? (\n <FontAwesomeIcon icon={faStop} className='pi-h-5 pi-w-5 pi-text-white' />\n ) : (\n <FontAwesomeIcon className='pi-h-5 pi-w-5 pi-text-white' icon={faRecord} />\n )}\n </Button>\n )}\n {/* Videocall button - show only if there are video devices */}\n {videoInputDevices?.length > 0 && (\n <Button\n variant='transparentSideView'\n onClick={() => goToVideoCall()}\n data-tooltip-id='tooltip-video'\n data-tooltip-content={t('Tooltip.Enable camera') || ''}\n >\n <FontAwesomeIcon className='pi-h-5 pi-w-5 pi-text-white' icon={faVideo} />\n </Button>\n )}\n {/* Share screen button */}\n {janus.current.webRTCAdapter.browserDetails.browser !== 'safari' &&\n userInformation?.profile?.macro_permissions?.nethvoice_cti?.permissions\n ?.screen_sharing?.value && (\n <Button\n variant='transparentSideView'\n onClick={() => goToScreenSharing()}\n data-tooltip-id='tooltip-screen-share'\n data-tooltip-content={t('Tooltip.Share screen') || ''}\n >\n <FontAwesomeIcon className='pi-h-5 pi-w-5 pi-text-white' icon={faDisplay} />\n </Button>\n )}\n {/* Switch device button - show only if there are available devices */}\n {availableDevices?.length > 0 && (\n <Button\n variant='transparentSideView'\n data-tooltip-id='tooltip-switch-device'\n data-tooltip-content={t('Tooltip.Switch device') || ''}\n onClick={() => closeSideViewAndLaunchEvent('switchDevice')}\n >\n <FontAwesomeIcon className='pi-h-5 pi-w-5 pi-text-white' icon={faArrowsRepeat} />\n </Button>\n )}\n </div>\n </motion.div>\n )}\n </AnimatePresence>\n <CustomThemedTooltip id='tooltip-record' place='left' />\n <CustomThemedTooltip id='tooltip-video' place='left' />\n <CustomThemedTooltip id='tooltip-screen-share' place='left' />\n <CustomThemedTooltip id='tooltip-switch-device' place='left' />\n </>\n )\n}\n\nexport default SideView\n\ninterface SideViewTypes {\n isVisible: boolean\n}\n"],"names":["_a","isVisible","dispatch","useDispatch","isOpen","useSelector","state","island","isRecording","currentCall","userInformation","currentUser","allUsersInformation","users","t","useTranslation","_m","useState","availableDevices","setAvailableDevices","videoInputDevices","store","select","mediaDevices","getState","janus","useRef","JanusLib","closeSideViewAndLaunchEvent","viewType","toggleSideViewVisible","setIslandView","useEffect","getAvailableDevices","React","createElement","Fragment","AnimatePresence","motion","div","className","style","borderTopRightRadius","borderBottomRightRadius","width","transformOrigin","initial","x","animate","transition","duration","ease","exit","_f","_d","_c","profile","_b","macro_permissions","settings","permissions","recording","value","Button","active","variant","onClick","recordCurrentCall","FontAwesomeIcon","icon","faStop","faRecord","length","updateCurrentCall","isLocalVideoEnabled","isStartingVideoCall","faVideo","current","webRTCAdapter","browserDetails","browser","_l","_k","_h","_g","nethvoice_cti","_j","screen_sharing","screenShare","update","isStartingScreenShare","faDisplay","faArrowsRepeat","CustomThemedTooltip","id","place"],"mappings":"y+CAeoC,SAACA,2BAAEC,EAASD,EAAAC,UACxCC,EAAWC,EAAAA,cACTC,EAAWC,eAAY,SAACC,GAAqB,OAAAA,EAAMC,iBACnDC,EAAgBH,eAAY,SAACC,GAAqB,OAAAA,EAAMG,2BAC1DC,EAAkBL,EAAWA,aAAC,SAACC,GAAqB,OAAAA,EAAMK,WAAN,IACpDC,EAAsBP,EAAWA,aAAC,SAACC,GAAqB,OAAAA,EAAMO,KAAN,IACtDC,EAAMC,qBACRC,EAA0CC,EAAAA,SAAS,IAAlDC,EAAgBF,EAAA,GAAEG,EAAmBH,EAAA,GACtCI,EAAoBC,EAAKA,MAACC,OAAOC,aAAaH,kBAAkBC,EAAKA,MAACG,YACtEC,EAAQC,SAAmBC,EAAAA,SAE3BC,EAA8B,SAACC,GACnC3B,EAASK,OAAOuB,uBAAsB,GACrB,OAAbD,GACF3B,EAASK,OAAOwB,cAAcF,EAElC,EAyBA,OANAG,EAAAA,WAAU,WAGRb,EAAoBc,EAAmBA,oBAACvB,EAAiBE,GAC1D,GAAE,IAGDsB,UAAAC,cAAAD,EAAA,QAAAE,SAAA,KACEF,EAAC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EAAAA,gBAAgB,CAAA5B,UAAU,8BAA8B6B,KAAMO,aAIX,WAAvDnD,EAAMoD,QAAQC,cAAcC,eAAeC,UAEtB,QADpBC,EACI,QADJC,EAA0D,kBAA1DC,EAA0B,QAA1BC,EAAA1E,eAAAA,EAAiB8C,eAAS,IAAA4B,OAAA,EAAAA,EAAA1B,wCAAmB2B,qBAAa,IAAAC,OAAA,EAAAA,EAAE1B,mBACxD,IAAAsB,OAAA,EAAAA,EAAAK,sBAAgB,IAAAN,OAAA,EAAAA,EAAAnB,QAClB5B,EAAC,QAAAC,cAAA4B,EAAMA,QACLE,QAAQ,sBACRC,QAAS,WAAM,OAjF/BtC,EAA4B,cAE5BP,QAAMnB,SAASsF,YAAYC,OAAO,CAChCC,uBAAuB,GA8EyB,oBAClB,uBAAsB,uBAChB5E,EAAE,yBAA2B,IAEnDoB,UAACC,cAAAiC,EAAAA,gBAAgB,CAAA5B,UAAU,8BAA8B6B,KAAMsB,gBAIpEzE,aAAA,EAAAA,EAAkBsD,QAAS,GAC1BtC,EAAC,QAAAC,cAAA4B,EAAMA,OACL,CAAAE,QAAQ,sBAAqB,kBACb,wBAAuB,uBACjBnD,EAAE,0BAA4B,GACpDoD,QAAS,WAAM,OAAAtC,EAA4B,kBAE3CM,EAAAA,QAAAC,cAACiC,kBAAe,CAAC5B,UAAU,8BAA8B6B,KAAMuB,uBAO3E1D,EAAC,QAAAC,cAAA0D,uBAAoBC,GAAG,iBAAiBC,MAAM,SAC/C7D,EAAC,QAAAC,cAAA0D,uBAAoBC,GAAG,gBAAgBC,MAAM,SAC9C7D,EAAC,QAAAC,cAAA0D,uBAAoBC,GAAG,uBAAuBC,MAAM,SACrD7D,UAAAC,cAAC0D,EAAAA,oBAAmB,CAACC,GAAG,wBAAwBC,MAAM,SAG5D"}
1
+ {"version":3,"file":"SideView.js","sources":["../../../src/components/SideView/SideView.tsx"],"sourcesContent":["import React, { FC, useEffect, useRef, useState } from 'react'\nimport { useDispatch, useSelector } from 'react-redux'\nimport { Dispatch, RootState, store } from '../../store'\nimport { motion, AnimatePresence } from 'framer-motion'\nimport { Button } from '../Button'\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\nimport {\n faDisplay,\n faStop,\n faVideo,\n faVideoSlash,\n IconDefinition,\n} from '@fortawesome/free-solid-svg-icons'\nimport { faArrowsRepeat, faRecord } from '@nethesis/nethesis-solid-svg-icons'\nimport { useTranslation } from 'react-i18next'\nimport { recordCurrentCall } from '../../lib/phone/call'\nimport { CustomThemedTooltip } from '../CustomThemedTooltip'\nimport { getAvailableDevices } from '../../utils/deviceUtils'\nimport { JanusTypes } from '../../types/webrtc'\nimport JanusLib from '../../lib/webrtc/janus.js'\nimport { checkWebCamPermission } from '../../lib/devices/devices'\nimport { check } from 'prettier'\n\nconst SideView: FC<SideViewTypes> = ({ isVisible }) => {\n const dispatch = useDispatch<Dispatch>()\n const { isOpen } = useSelector((state: RootState) => state.island)\n const { isRecording } = useSelector((state: RootState) => state.currentCall)\n const userInformation = useSelector((state: RootState) => state.currentUser)\n const allUsersInformation = useSelector((state: RootState) => state.users)\n const { t } = useTranslation()\n const [availableDevices, setAvailableDevices] = useState([])\n const videoInputDevices = store.select.mediaDevices.videoInputDevices(store.getState())\n const janus = useRef<JanusTypes>(JanusLib)\n\n const closeSideViewAndLaunchEvent = (viewType: any) => {\n dispatch.island.toggleSideViewVisible(false)\n if (viewType !== null) {\n dispatch.island.setIslandView(viewType)\n }\n }\n\n const [isVideoCallButtonVisible, setIsVideoCallButtonVisible] = useState(true)\n\n const goToVideoCall = async () => {\n let cameraPermission = await checkCameraPermission()\n if (cameraPermission) {\n closeSideViewAndLaunchEvent('video')\n\n store.dispatch.currentCall.updateCurrentCall({\n isLocalVideoEnabled: true,\n isStartingVideoCall: true,\n })\n }\n }\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 const goToScreenSharing = () => {\n closeSideViewAndLaunchEvent('video')\n\n store.dispatch.screenShare.update({\n isStartingScreenShare: true,\n })\n }\n\n useEffect(() => {\n // check available devices\n\n setAvailableDevices(getAvailableDevices(userInformation, allUsersInformation))\n }, [])\n\n return (\n <>\n <AnimatePresence>\n {isVisible && (\n <motion.div\n className={`pi-absolute pi-h-full pi-bg-gray-700 pi-flex pi-flex-col pi-items-center pi-text-gray-50 dark:pi-text-gray-50 -pi-mr-10 pi-right-0 -pi-z-10 pi-pointer-events-auto ${\n isOpen ? 'pi-py-6' : 'pi-py-4'\n }`}\n style={{\n borderTopRightRadius: '20px',\n borderBottomRightRadius: '20px',\n width: '80px',\n transformOrigin: 'right',\n }}\n initial={{ x: -76 }}\n animate={{\n x: 4,\n transition: {\n duration: 0.2,\n ease: 'easeOut',\n },\n }}\n exit={{\n x: -76,\n transition: {\n duration: 0.2,\n ease: 'easeIn',\n },\n }}\n >\n <div className='pi-flex pi-flex-col pi-items-center pi-gap-3.5 pi-flex-1 pi-ml-9'>\n {/* Recording button */}\n {userInformation?.profile?.macro_permissions?.settings?.permissions?.recording\n ?.value && (\n <Button\n active={isRecording}\n data-stop-propagation={true}\n variant='transparentSideView'\n onClick={() => recordCurrentCall(isRecording)}\n data-tooltip-id='tooltip-record'\n data-tooltip-content={\n isRecording ? t('Tooltip.Stop recording') || '' : t('Tooltip.Record') || ''\n }\n >\n {isRecording ? (\n <FontAwesomeIcon icon={faStop} className='pi-h-5 pi-w-5 pi-text-white' />\n ) : (\n <FontAwesomeIcon className='pi-h-5 pi-w-5 pi-text-white' icon={faRecord} />\n )}\n </Button>\n )}\n {/* Videocall button - show only if there are video devices */}\n {videoInputDevices?.length > 0 && (\n // && isVideoCallButtonVisible\n <Button\n variant='transparentSideView'\n onClick={() => goToVideoCall()}\n data-tooltip-id='tooltip-video'\n data-tooltip-content={`${\n isVideoCallButtonVisible\n ? t('Tooltip.Enable camera') || ''\n : t('Tooltip.Enable permission camera') || ''\n }`}\n disabled={!isVideoCallButtonVisible}\n className={`${!isVideoCallButtonVisible ? 'pi-cursor-auto' : ''}`}\n >\n <FontAwesomeIcon\n className='pi-h-5 pi-w-5 pi-text-white'\n icon={isVideoCallButtonVisible ? faVideo : faVideoSlash}\n />\n </Button>\n )}\n {/* Share screen button */}\n {janus.current.webRTCAdapter.browserDetails.browser !== 'safari' &&\n userInformation?.profile?.macro_permissions?.nethvoice_cti?.permissions\n ?.screen_sharing?.value && (\n <Button\n variant='transparentSideView'\n onClick={() => goToScreenSharing()}\n data-tooltip-id='tooltip-screen-share'\n data-tooltip-content={t('Tooltip.Share screen') || ''}\n >\n <FontAwesomeIcon className='pi-h-5 pi-w-5 pi-text-white' icon={faDisplay} />\n </Button>\n )}\n {/* Switch device button - show only if there are available devices */}\n {availableDevices?.length > 0 && (\n <Button\n variant='transparentSideView'\n data-tooltip-id='tooltip-switch-device'\n data-tooltip-content={t('Tooltip.Switch device') || ''}\n onClick={() => closeSideViewAndLaunchEvent('switchDevice')}\n >\n <FontAwesomeIcon className='pi-h-5 pi-w-5 pi-text-white' icon={faArrowsRepeat} />\n </Button>\n )}\n </div>\n </motion.div>\n )}\n </AnimatePresence>\n <CustomThemedTooltip id='tooltip-record' place='left' />\n <CustomThemedTooltip id='tooltip-video' place='left' />\n <CustomThemedTooltip id='tooltip-screen-share' place='left' />\n <CustomThemedTooltip id='tooltip-switch-device' place='left' />\n </>\n )\n}\n\nexport default SideView\n\ninterface SideViewTypes {\n isVisible: boolean\n}\n"],"names":["_a","isVisible","dispatch","useDispatch","isOpen","useSelector","state","island","isRecording","currentCall","userInformation","currentUser","allUsersInformation","users","t","useTranslation","_m","useState","availableDevices","setAvailableDevices","videoInputDevices","store","select","mediaDevices","getState","janus","useRef","JanusLib","closeSideViewAndLaunchEvent","viewType","toggleSideViewVisible","setIslandView","_o","isVideoCallButtonVisible","setIsVideoCallButtonVisible","checkCameraPermission","__awaiter","length","checkWebCamPermission","sent","useEffect","getAvailableDevices","React","createElement","Fragment","AnimatePresence","motion","div","className","style","borderTopRightRadius","borderBottomRightRadius","width","transformOrigin","initial","x","animate","transition","duration","ease","exit","_f","_d","_c","profile","_b","macro_permissions","settings","permissions","recording","value","Button","active","variant","onClick","recordCurrentCall","FontAwesomeIcon","icon","faStop","faRecord","updateCurrentCall","isLocalVideoEnabled","isStartingVideoCall","disabled","concat","faVideo","faVideoSlash","current","webRTCAdapter","browserDetails","browser","_l","_k","_h","_g","nethvoice_cti","_j","screen_sharing","screenShare","update","isStartingScreenShare","faDisplay","faArrowsRepeat","CustomThemedTooltip","id","place"],"mappings":"skDAuBoC,SAACA,2BAAEC,EAASD,EAAAC,UACxCC,EAAWC,EAAAA,cACTC,EAAWC,eAAY,SAACC,GAAqB,OAAAA,EAAMC,iBACnDC,EAAgBH,eAAY,SAACC,GAAqB,OAAAA,EAAMG,2BAC1DC,EAAkBL,EAAWA,aAAC,SAACC,GAAqB,OAAAA,EAAMK,WAAN,IACpDC,EAAsBP,EAAWA,aAAC,SAACC,GAAqB,OAAAA,EAAMO,KAAN,IACtDC,EAAMC,qBACRC,EAA0CC,EAAAA,SAAS,IAAlDC,EAAgBF,EAAA,GAAEG,EAAmBH,EAAA,GACtCI,EAAoBC,EAAKA,MAACC,OAAOC,aAAaH,kBAAkBC,EAAKA,MAACG,YACtEC,EAAQC,SAAmBC,EAAAA,SAE3BC,EAA8B,SAACC,GACnC3B,EAASK,OAAOuB,uBAAsB,GACrB,OAAbD,GACF3B,EAASK,OAAOwB,cAAcF,EAElC,EAEMG,EAA0Df,EAAAA,UAAS,GAAlEgB,EAAwBD,EAAA,GAAEE,EAA2BF,EAAA,GActDG,EAAwB,WAAA,OAAAC,EAAAA,eAAA,OAAA,OAAA,GAAA,yEACxB,OAAAhB,EAAkBiB,OAAS,EACE,CAAA,EAAAC,EAAqBA,yBADtB,CAAA,EAAA,UAE9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AM,OAAA9C,EAA4B,kBAE3Cc,EAAAA,QAAAC,cAACiC,kBAAe,CAAC5B,UAAU,8BAA8B6B,KAAMyB,uBAO3E5D,EAAC,QAAAC,cAAA4D,uBAAoBC,GAAG,iBAAiBC,MAAM,SAC/C/D,EAAC,QAAAC,cAAA4D,uBAAoBC,GAAG,gBAAgBC,MAAM,SAC9C/D,EAAC,QAAAC,cAAA4D,uBAAoBC,GAAG,uBAAuBC,MAAM,SACrD/D,UAAAC,cAAC4D,EAAAA,oBAAmB,CAACC,GAAG,wBAAwBC,MAAM,SAG5D"}
@@ -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"),r=require("../../store/index.js"),i=require("../user/default_device.js");require("react");var s=require("../../utils/genericFunctions/localStorage.js"),t=require("../../_virtual/index9.js"),o=e.default;exports.checkMediaPermissions=function(){if(i.isPhysical())return r.store.dispatch.alerts.removeAlert("browser_permissions"),r.store.dispatch.alerts.removeAlert("user_permissions"),r.store.dispatch.alerts.removeAlert("busy_camera"),void r.store.dispatch.alerts.removeAlert("unknown_media_permissions");t.__exports.requestMediaPermissions({audio:!0,video:!0}).then((function(){})).catch((function(e){var i,s,n=e.type,a=null!==(s=((i={})[t.__exports.MediaPermissionsErrorType.SystemPermissionDenied]={alert:"browser_permissions",message:"WebRTC: browser does not have permission to access camera or microphone"},i[t.__exports.MediaPermissionsErrorType.UserPermissionDenied]={alert:"user_permissions",message:"WebRTC: user didn't allow app to access camera or microphone"},i[t.__exports.MediaPermissionsErrorType.CouldNotStartVideoSource]={alert:"busy_camera",message:"WebRTC: camera is in use by another application (Zoom, Skype) or browser tab (Google Meet, Messenger Video)"},i)[n])&&void 0!==s?s:{alert:"unknown_media_permissions",message:"WebRTC: can't access audio or camera on this device. unknown error"};r.store.dispatch.alerts.setAlert(a.alert),o.error&&o.error(a.message)}))},exports.getCurrentAudioInputDeviceId=function(){var e=s.getJSONItem("phone-island-audio-input-device").deviceId||null;return r.store.select.mediaDevices.audioInputDevices(r.store.getState()).find((function(r){return r.deviceId===e}))?e:null},exports.getCurrentAudioOutputDeviceId=function(){var e=s.getJSONItem("phone-island-audio-output-device").deviceId||null;return r.store.select.mediaDevices.audioOutputDevices(r.store.getState()).find((function(r){return r.deviceId===e}))?e:null},exports.getCurrentVideoInputDeviceId=function(){var e=s.getJSONItem("phone-island-video-input-device").deviceId||null;return r.store.select.mediaDevices.videoInputDevices(r.store.getState()).find((function(r){return r.deviceId===e}))?e:null},exports.getSupportedDevices=function(e){var r,i,s=!1,t=!1,n=!1,a=!1;r=function(){var r={audio:s,audioCap:n,video:t,videoCap:a};o.log&&o.log("supportedDevices=",r),e()},i=[],navigator.mediaDevices.enumerateDevices().then((function(e){e.forEach((function(e){var r=!1;i.forEach((function(i){i.deviceId===e.deviceId&&i.kind===e.kind&&(r=!0)})),r||("videoinput"!==e.kind||a||(a=!0),"audioinput"!==e.kind||n||(n=!0),"audioinput"===e.kind&&(s=!0),e.kind,"videoinput"===e.kind&&(t=!0),i.push(e))})),r&&r()}))};
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"),s=require("../../_virtual/index9.js"),n=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");s.__exports.requestMediaPermissions({audio:!0}).then((function(){})).catch((function(e){var r,t,o=e.type,u=null!==(t=((r={})[s.__exports.MediaPermissionsErrorType.SystemPermissionDenied]={alert:"browser_permissions",message:"WebRTC: browser does not have permission to access camera or microphone"},r[s.__exports.MediaPermissionsErrorType.UserPermissionDenied]={alert:"user_permissions",message:"WebRTC: user didn't allow app to access camera or microphone"},r)[o])&&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(u.alert),n.error&&n.error(u.message)}))},exports.checkWebCamPermission=function(){return new Promise((function(e){s.__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;return i.store.select.mediaDevices.audioInputDevices(i.store.getState()).find((function(i){return i.deviceId===e}))?e:null},exports.getCurrentAudioOutputDeviceId=function(){var e=t.getJSONItem("phone-island-audio-output-device").deviceId||null;return i.store.select.mediaDevices.audioOutputDevices(i.store.getState()).find((function(i){return i.deviceId===e}))?e:null},exports.getCurrentVideoInputDeviceId=function(){var e=t.getJSONItem("phone-island-video-input-device").deviceId||null;return i.store.select.mediaDevices.videoInputDevices(i.store.getState()).find((function(i){return i.deviceId===e}))?e:null},exports.getSupportedDevices=function(e){var i,r,t=!1,s=!1,o=!1,u=!1;i=function(){var i={audio:t,audioCap:o,video:s,videoCap:u};n.log&&n.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||u||(u=!0),"audioinput"!==e.kind||o||(o=!0),"audioinput"===e.kind&&(t=!0),e.kind,"videoinput"===e.kind&&(s=!0),r.push(e))})),i&&i()}))};
2
2
  //# sourceMappingURL=devices.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"devices.js","sources":["../../../src/lib/devices/devices.ts"],"sourcesContent":["// Copyright (C) 2024 Nethesis S.r.l.\n// SPDX-License-Identifier: AGPL-3.0-or-later\n\nimport {\n MediaPermissionsError,\n MediaPermissionsErrorType,\n requestMediaPermissions,\n} from 'mic-check'\nimport JanusLib from '../webrtc/janus'\nimport { JanusTypes } from '../../types'\nimport { store } from '../../store'\nimport { isPhysical } from '../user/default_device'\nimport { getJSONItem } from '../../utils'\n\nconst Janus: JanusTypes = JanusLib\n\nexport const getSupportedDevices = function (origCallback: () => void) {\n let hasMicrophone = false\n let hasSpeakers = false\n let hasWebcam = false\n let isMicrophoneAlreadyCaptured = false\n let isWebcamAlreadyCaptured = false\n\n function checkDeviceSupport(callback: () => void) {\n const mediaDevices: MediaDeviceInfo[] = []\n\n navigator.mediaDevices.enumerateDevices().then((devices: MediaDeviceInfo[]) => {\n devices.forEach(function (device: MediaDeviceInfo) {\n let skip = false\n\n mediaDevices.forEach(function (d: MediaDeviceInfo) {\n if (d.deviceId === device.deviceId && d.kind === device.kind) {\n skip = true\n }\n })\n\n if (skip) {\n return\n }\n\n if (device.kind === 'videoinput' && !isWebcamAlreadyCaptured) {\n isWebcamAlreadyCaptured = true\n }\n if (device.kind === 'audioinput' && !isMicrophoneAlreadyCaptured) {\n isMicrophoneAlreadyCaptured = true\n }\n\n if (device.kind === 'audioinput') {\n hasMicrophone = true\n }\n\n if (device.kind === 'audiooutput') {\n hasSpeakers = true\n }\n\n if (device.kind === 'videoinput') {\n hasWebcam = true\n }\n\n mediaDevices.push(device)\n })\n\n if (callback) {\n callback()\n }\n })\n }\n\n // check for microphone/camera support!\n checkDeviceSupport(function () {\n const supportedDevices: any = {\n audio: hasMicrophone,\n audioCap: isMicrophoneAlreadyCaptured,\n video: hasWebcam,\n videoCap: isWebcamAlreadyCaptured,\n }\n\n Janus.log && Janus.log('supportedDevices=', supportedDevices)\n origCallback()\n })\n}\n\nexport const checkMediaPermissions = function () {\n //Remove all media alerts if default_device is physical\n if (isPhysical()) {\n store.dispatch.alerts.removeAlert('browser_permissions')\n store.dispatch.alerts.removeAlert('user_permissions')\n store.dispatch.alerts.removeAlert('busy_camera')\n store.dispatch.alerts.removeAlert('unknown_media_permissions')\n return\n }\n\n requestMediaPermissions({ audio: true, video: true })\n .then(() => {\n // Can successfully access camera and microphone streams\n // Save permissions state on rematch to get access globally on the app\n })\n .catch((err: any) => {\n const { type } = err\n\n // Define error mappings for different types of media permission errors\n const errorMap: any = {\n [MediaPermissionsErrorType.SystemPermissionDenied]: {\n alert: 'browser_permissions',\n message: 'WebRTC: browser does not have permission to access camera or microphone',\n },\n [MediaPermissionsErrorType.UserPermissionDenied]: {\n alert: 'user_permissions',\n message: \"WebRTC: user didn't allow app to access camera or microphone\",\n },\n [MediaPermissionsErrorType.CouldNotStartVideoSource]: {\n alert: 'busy_camera',\n message:\n 'WebRTC: camera is in use by another application (Zoom, Skype) or browser tab (Google Meet, Messenger Video)',\n },\n }\n\n // Get error details from map or use default error\n const error = errorMap[type] ?? {\n alert: 'unknown_media_permissions',\n message: \"WebRTC: can't access audio or camera on this device. unknown error\",\n }\n\n // Display alert only for non-physical devices\n store.dispatch.alerts.setAlert(error.alert)\n\n // Log error message if Janus logger is available\n if (Janus.error) {\n Janus.error(error.message)\n }\n })\n}\n\nexport const getCurrentVideoInputDeviceId = function () {\n const currentDeviceId = getJSONItem('phone-island-video-input-device').deviceId || null\n const videoInputDevices = store.select.mediaDevices.videoInputDevices(store.getState())\n\n // Check if the current device is still available\n const deviceFound = videoInputDevices.find((device) => device.deviceId === currentDeviceId)\n\n if (deviceFound) {\n return currentDeviceId\n } else {\n return null\n }\n}\n\nexport const getCurrentAudioInputDeviceId = function () {\n const currentDeviceId = getJSONItem('phone-island-audio-input-device').deviceId || null\n const audioInputDevices = store.select.mediaDevices.audioInputDevices(store.getState())\n\n // Check if the current device is still available\n const deviceFound = audioInputDevices.find((device) => device.deviceId === currentDeviceId)\n\n if (deviceFound) {\n return currentDeviceId\n } else {\n return null\n }\n}\n\nexport const getCurrentAudioOutputDeviceId = function () {\n const currentDeviceId = getJSONItem('phone-island-audio-output-device').deviceId || null\n const audioOutputDevices = store.select.mediaDevices.audioOutputDevices(store.getState())\n\n // Check if the current device is still available\n const deviceFound = audioOutputDevices.find((device) => device.deviceId === currentDeviceId)\n\n if (deviceFound) {\n return currentDeviceId\n } else {\n return null\n }\n}\n"],"names":["Janus","JanusLib","isPhysical","store","dispatch","alerts","removeAlert","requestMediaPermissions","audio","video","then","catch","err","type","error","_b","_a","MediaPermissionsErrorType","SystemPermissionDenied","alert","message","UserPermissionDenied","CouldNotStartVideoSource","setAlert","currentDeviceId","getJSONItem","deviceId","select","mediaDevices","audioInputDevices","getState","find","device","audioOutputDevices","videoInputDevices","origCallback","callback","hasMicrophone","hasWebcam","isMicrophoneAlreadyCaptured","isWebcamAlreadyCaptured","supportedDevices","audioCap","videoCap","log","navigator","enumerateDevices","devices","forEach","skip","d","kind","push"],"mappings":"2VAcMA,EAAoBC,EAAAA,sCAoEW,WAEnC,GAAIC,EAAUA,aAKZ,OAJAC,EAAAA,MAAMC,SAASC,OAAOC,YAAY,uBAClCH,EAAAA,MAAMC,SAASC,OAAOC,YAAY,oBAClCH,EAAAA,MAAMC,SAASC,OAAOC,YAAY,oBAClCH,EAAAA,MAAMC,SAASC,OAAOC,YAAY,6BAIpCC,EAAAA,UAAAA,wBAAwB,CAAEC,OAAO,EAAMC,OAAO,IAC3CC,MAAK,WAGN,IACCC,OAAM,SAACC,WACEC,EAASD,EAAGC,KAoBdC,EAA0B,QAAlBC,IAjBAC,EAAA,CAAA,GACXC,EAAAA,UAAAA,0BAA0BC,wBAAyB,CAClDC,MAAO,sBACPC,QAAS,2EAEXJ,EAACC,EAAAA,UAAAA,0BAA0BI,sBAAuB,CAChDF,MAAO,mBACPC,QAAS,gEAEXJ,EAACC,EAAAA,UAAAA,0BAA0BK,0BAA2B,CACpDH,MAAO,cACPC,QACE,kHAKiBP,UAAS,IAAAE,EAAAA,EAAA,CAC9BI,MAAO,4BACPC,QAAS,sEAIXjB,EAAKA,MAACC,SAASC,OAAOkB,SAAST,EAAMK,OAGjCnB,EAAMc,OACRd,EAAMc,MAAMA,EAAMM,QAEtB,GACJ,uCAgB4C,WAC1C,IAAMI,EAAkBC,EAA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,EAAOmB,OACTb,GAAY,GAGdV,EAAawB,KAAKpB,GACpB,IAEII,GACFA,GAEJ,GAeJ"}
1
+ {"version":3,"file":"devices.js","sources":["../../../src/lib/devices/devices.ts"],"sourcesContent":["// Copyright (C) 2024 Nethesis S.r.l.\n// SPDX-License-Identifier: AGPL-3.0-or-later\n\nimport {\n MediaPermissionsError,\n MediaPermissionsErrorType,\n requestMediaPermissions,\n} from 'mic-check'\nimport JanusLib from '../webrtc/janus'\nimport { JanusTypes } from '../../types'\nimport { store } from '../../store'\nimport { isPhysical } from '../user/default_device'\nimport { getJSONItem } from '../../utils'\n\nconst Janus: JanusTypes = JanusLib\n\nexport const getSupportedDevices = function (origCallback: () => void) {\n let hasMicrophone = false\n let hasSpeakers = false\n let hasWebcam = false\n let isMicrophoneAlreadyCaptured = false\n let isWebcamAlreadyCaptured = false\n\n function checkDeviceSupport(callback: () => void) {\n const mediaDevices: MediaDeviceInfo[] = []\n\n navigator.mediaDevices.enumerateDevices().then((devices: MediaDeviceInfo[]) => {\n devices.forEach(function (device: MediaDeviceInfo) {\n let skip = false\n\n mediaDevices.forEach(function (d: MediaDeviceInfo) {\n if (d.deviceId === device.deviceId && d.kind === device.kind) {\n skip = true\n }\n })\n\n if (skip) {\n return\n }\n\n if (device.kind === 'videoinput' && !isWebcamAlreadyCaptured) {\n isWebcamAlreadyCaptured = true\n }\n if (device.kind === 'audioinput' && !isMicrophoneAlreadyCaptured) {\n isMicrophoneAlreadyCaptured = true\n }\n\n if (device.kind === 'audioinput') {\n hasMicrophone = true\n }\n\n if (device.kind === 'audiooutput') {\n hasSpeakers = true\n }\n\n if (device.kind === 'videoinput') {\n hasWebcam = true\n }\n\n mediaDevices.push(device)\n })\n\n if (callback) {\n callback()\n }\n })\n }\n\n // check for microphone/camera support!\n checkDeviceSupport(function () {\n const supportedDevices: any = {\n audio: hasMicrophone,\n audioCap: isMicrophoneAlreadyCaptured,\n video: hasWebcam,\n videoCap: isWebcamAlreadyCaptured,\n }\n\n Janus.log && Janus.log('supportedDevices=', supportedDevices)\n origCallback()\n })\n}\n\nexport const checkMediaPermissions = function () {\n //Remove all media alerts if default_device is physical\n if (isPhysical()) {\n store.dispatch.alerts.removeAlert('browser_permissions')\n store.dispatch.alerts.removeAlert('user_permissions')\n store.dispatch.alerts.removeAlert('busy_camera')\n store.dispatch.alerts.removeAlert('unknown_media_permissions')\n return\n }\n\n requestMediaPermissions({ audio: true })\n .then(() => {\n // Can successfully access camera and microphone streams\n // Save permissions state on rematch to get access globally on the app\n })\n .catch((err: any) => {\n const { type } = err\n\n // Define error mappings for different types of media permission errors\n const errorMap: any = {\n [MediaPermissionsErrorType.SystemPermissionDenied]: {\n alert: 'browser_permissions',\n message: 'WebRTC: browser does not have permission to access camera or microphone',\n },\n [MediaPermissionsErrorType.UserPermissionDenied]: {\n alert: 'user_permissions',\n message: \"WebRTC: user didn't allow app to access camera or microphone\",\n },\n }\n\n // Get error details from map or use default error\n const error = errorMap[type] ?? {\n alert: 'unknown_media_permissions',\n message: \"WebRTC: can't access audio or camera on this device. unknown error\",\n }\n\n // Display alert only for non-physical devices\n store.dispatch.alerts.setAlert(error.alert)\n\n // Log error message if Janus logger is available\n if (Janus.error) {\n Janus.error(error.message)\n }\n })\n}\n\nexport const checkWebCamPermission = function (): Promise<boolean> {\n return new Promise((resolve) => {\n requestMediaPermissions({ video: true })\n .then(() => {\n resolve(true)\n })\n .catch((err: any) => {\n console.error('Error requesting webcam permission:', err)\n resolve(false)\n })\n })\n}\n\nexport const getCurrentVideoInputDeviceId = function () {\n const currentDeviceId = getJSONItem('phone-island-video-input-device').deviceId || null\n const videoInputDevices = store.select.mediaDevices.videoInputDevices(store.getState())\n\n // Check if the current device is still available\n const deviceFound = videoInputDevices.find((device) => device.deviceId === currentDeviceId)\n\n if (deviceFound) {\n return currentDeviceId\n } else {\n return null\n }\n}\n\nexport const getCurrentAudioInputDeviceId = function () {\n const currentDeviceId = getJSONItem('phone-island-audio-input-device').deviceId || null\n const audioInputDevices = store.select.mediaDevices.audioInputDevices(store.getState())\n\n // Check if the current device is still available\n const deviceFound = audioInputDevices.find((device) => device.deviceId === currentDeviceId)\n\n if (deviceFound) {\n return currentDeviceId\n } else {\n return null\n }\n}\n\nexport const getCurrentAudioOutputDeviceId = function () {\n const currentDeviceId = getJSONItem('phone-island-audio-output-device').deviceId || null\n const audioOutputDevices = store.select.mediaDevices.audioOutputDevices(store.getState())\n\n // Check if the current device is still available\n const deviceFound = audioOutputDevices.find((device) => device.deviceId === currentDeviceId)\n\n if (deviceFound) {\n return currentDeviceId\n } else {\n return null\n }\n}\n"],"names":["Janus","JanusLib","isPhysical","store","dispatch","alerts","removeAlert","requestMediaPermissions","audio","then","catch","err","type","error","_b","_a","MediaPermissionsErrorType","SystemPermissionDenied","alert","message","UserPermissionDenied","setAlert","Promise","resolve","video","console","currentDeviceId","getJSONItem","deviceId","select","mediaDevices","audioInputDevices","getState","find","device","audioOutputDevices","videoInputDevices","origCallback","callback","hasMicrophone","hasWebcam","isMicrophoneAlreadyCaptured","isWebcamAlreadyCaptured","supportedDevices","audioCap","videoCap","log","navigator","enumerateDevices","devices","forEach","skip","d","kind","push"],"mappings":"2VAcMA,EAAoBC,EAAAA,sCAoEW,WAEnC,GAAIC,EAAUA,aAKZ,OAJAC,EAAAA,MAAMC,SAASC,OAAOC,YAAY,uBAClCH,EAAAA,MAAMC,SAASC,OAAOC,YAAY,oBAClCH,EAAAA,MAAMC,SAASC,OAAOC,YAAY,oBAClCH,EAAAA,MAAMC,SAASC,OAAOC,YAAY,6BAIpCC,oCAAwB,CAAEC,OAAO,IAC9BC,MAAK,WAGN,IACCC,OAAM,SAACC,WACEC,EAASD,EAAGC,KAedC,EAA0B,QAAlBC,IAZAC,EAAA,CAAA,GACXC,EAAAA,UAAAA,0BAA0BC,wBAAyB,CAClDC,MAAO,sBACPC,QAAS,2EAEXJ,EAACC,EAAAA,UAAAA,0BAA0BI,sBAAuB,CAChDF,MAAO,mBACPC,QAAS,mEAKU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QP,EAAkC,GAExCiB,UAAUjB,aAAakB,mBAAmBvC,MAAK,SAACwC,GAC9CA,EAAQC,SAAQ,SAAUhB,GACxB,IAAIiB,GAAO,EAEXrB,EAAaoB,SAAQ,SAAUE,GACzBA,EAAExB,WAAaM,EAAON,UAAYwB,EAAEC,OAASnB,EAAOmB,OACtDF,GAAO,EAEX,IAEIA,IAIgB,eAAhBjB,EAAOmB,MAA0BX,IACnCA,GAA0B,GAER,eAAhBR,EAAOmB,MAA0BZ,IACnCA,GAA8B,GAGZ,eAAhBP,EAAOmB,OACTd,GAAgB,GAGdL,EAAOmB,KAIS,eAAhBnB,EAAOmB,OACTb,GAAY,GAGdV,EAAawB,KAAKpB,GACpB,IAEII,GACFA,GAEJ,GAeJ"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e={Intrude:"Intrude",Listen:"Listen","Start recording message before":"Click the button below to start recording","Start recording message after":"You can speak in a moment...",Recording:"Recording","Answer phone to start recording":"Answer phone to start recording","Close the call to stop recording":"Close the call to stop recording","Search or type a contact":"Search or type a contact","Enter a phone number":"Enter a phone number","Physical phone":"Physical phone",Close:"Close",Back:"Back","More actions":"More actions"},r={Hangup:"Hangup",Pause:"Hold",Play:"Resume",Mute:"Mute",Unmute:"Unmute",Transfer:"Transfer","Cancel transfer":"Cancel transfer",Collapse:"Collapse",Expand:"Expand",Keyboard:"Keyboard",Park:"Park","Back to call":"Back to call",Stop:"Stop",Delete:"Delete",Confirm:"Confirm","Start recording":"Start recording","Switch call":"Switch call","Call to transfer":"Click to transfer","Hangup and transfer":"Transfer",Answer:"Answer",Settings:"Settings",Record:"Record","Stop recording":"Stop recording",Recording:"Recording","Interrupt recording":"Interrupt recording","Other actions":"Other actions",Conference:"Add participant for conference call","Add user to conference":"Add to conference call","Go to settings":"Go to settings","Enable camera":"Enable camera","Switch device":"Switch device",Reload:"Reload","Close alert":"Close alert","Share screen":"Share screen","Stop sharing":"Stop sharing","Disable camera":"Disable camera","Enter fullscreen":"Enter fullscreen","Exit fullscreen":"Exit fullscreen"},n={"In progress...":"In progress...","Outgoing call":"Outgoing call","Incoming call":"Incoming call"},a={"No users found":"No users found"},o={browser_permissions:"Browser permissions error",user_permissions:"Media permissions error",unknown_media_permissions:"Generic media permission error",webrtc_down:"WebRTC is unavailable",socket_down:"Socket is unavailable",busy_camera:"Webcam is busy",call_transfered:"Transfer successful","The browser doesn't have permission to access camera or microphone.":"The browser doesn't have permission to access camera or microphone.","You must accept audio and video permissions.":"You must accept audio and video.","Web Phone can't access audio or camera on this device.":"Web Phone can't access audio or camera on this device.","Web Phone connection is down.":"Web Phone not communicating with server.","NethLink connection is down.":"Server connection is unavailable.","Server connection is down.":"Server connection is unavailable.","Camera is used by another application.":"Webcam is used by another application.","Unknown audio or camera permissions.":"Microphone or Webcam is unavailable","No microphone or camera permissions.":"You must accept browser permissions.","Call transferred successfully.":"The call is transferred successfully.","Camera is already used.":"Webcam is already in use."},t={Theme:"Theme",Dark:"Dark",Light:"Light",Speakers:"Speakers",Microphones:"Microphones",Cameras:"Cameras",Settings:"Settings"},i={Conference:"Conference","Add participant":"Add participant","Remove participant":"Remove participant","Waiting for the conference":"Waiting for conference","Start conference":"Start conference","Unmute participant":"Unmute participant","Mute participant":"Mute participant","Mute all participants":"Mute all participants","Unmute all participants":"Unmute all participants","In conference":"In conference","End conference":"End conference","No participants":"No participants","Add participants to conference":"Add participants to conference"},c={Common:e,Tooltip:r,Call:n,Transfer:a,Errors:o,Settings:t,"Switch device":{"Switch device":"Switch device","Switch information":"The call will continue in the selected device."},"Screen sharing":{Sharing:"Sharing"},"Phone Island":{"Mobile app":"Mobile app"},Conference:i};exports.Call=n,exports.Common=e,exports.Conference=i,exports.Errors=o,exports.Settings=t,exports.Tooltip=r,exports.Transfer=a,exports.default=c;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e={Intrude:"Intrude",Listen:"Listen","Start recording message before":"Click the button below to start recording","Start recording message after":"You can speak in a moment...",Recording:"Recording","Answer phone to start recording":"Answer phone to start recording","Close the call to stop recording":"Close the call to stop recording","Search or type a contact":"Search or type a contact","Enter a phone number":"Enter a phone number","Physical phone":"Physical phone",Close:"Close",Back:"Back","More actions":"More actions"},r={Hangup:"Hangup",Pause:"Hold",Play:"Resume",Mute:"Mute",Unmute:"Unmute",Transfer:"Transfer","Cancel transfer":"Cancel transfer",Collapse:"Collapse",Expand:"Expand",Keyboard:"Keyboard",Park:"Park","Back to call":"Back to call",Stop:"Stop",Delete:"Delete",Confirm:"Confirm","Start recording":"Start recording","Switch call":"Switch call","Call to transfer":"Click to transfer","Hangup and transfer":"Transfer",Answer:"Answer",Settings:"Settings",Record:"Record","Stop recording":"Stop recording",Recording:"Recording","Interrupt recording":"Interrupt recording","Other actions":"Other actions",Conference:"Add participant for conference call","Add user to conference":"Add to conference call","Go to settings":"Go to settings","Enable camera":"Enable camera","Enable permission camera":"Enable permission camera","Switch device":"Switch device",Reload:"Reload","Close alert":"Close alert","Share screen":"Share screen","Stop sharing":"Stop sharing","Disable camera":"Disable camera","Enter fullscreen":"Enter fullscreen","Exit fullscreen":"Exit fullscreen"},n={"In progress...":"In progress...","Outgoing call":"Outgoing call","Incoming call":"Incoming call"},a={"No users found":"No users found"},o={browser_permissions:"Browser permissions error",user_permissions:"Media permissions error",unknown_media_permissions:"Generic media permission error",webrtc_down:"WebRTC is unavailable",socket_down:"Socket is unavailable",busy_camera:"Webcam is busy",call_transfered:"Transfer successful","The browser doesn't have permission to access camera or microphone.":"The browser doesn't have permission to access camera or microphone.","You must accept audio and video permissions.":"You must accept audio and video.","Web Phone can't access audio or camera on this device.":"Web Phone can't access audio or camera on this device.","Web Phone connection is down.":"Web Phone not communicating with server.","NethLink connection is down.":"Server connection is unavailable.","Server connection is down.":"Server connection is unavailable.","Camera is used by another application.":"Webcam is used by another application.","Unknown audio or camera permissions.":"Microphone or Webcam is unavailable","No microphone or camera permissions.":"You must accept browser permissions.","Call transferred successfully.":"The call is transferred successfully.","Camera is already used.":"Webcam is already in use."},t={Theme:"Theme",Dark:"Dark",Light:"Light",Speakers:"Speakers",Microphones:"Microphones",Cameras:"Cameras",Settings:"Settings"},i={Conference:"Conference","Add participant":"Add participant","Remove participant":"Remove participant","Waiting for the conference":"Waiting for conference","Start conference":"Start conference","Unmute participant":"Unmute participant","Mute participant":"Mute participant","Mute all participants":"Mute all participants","Unmute all participants":"Unmute all participants","In conference":"In conference","End conference":"End conference","No participants":"No participants","Add participants to conference":"Add participants to conference"},c={Common:e,Tooltip:r,Call:n,Transfer:a,Errors:o,Settings:t,"Switch device":{"Switch device":"Switch device","Switch information":"The call will continue in the selected device."},"Screen sharing":{Sharing:"Sharing"},"Phone Island":{"Mobile app":"Mobile app"},Conference:i};exports.Call=n,exports.Common=e,exports.Conference=i,exports.Errors=o,exports.Settings=t,exports.Tooltip=r,exports.Transfer=a,exports.default=c;
2
2
  //# sourceMappingURL=translation.json.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e={Intrude:"Intromesso",Listen:"Ascolto","Start recording message before":"Premi il pulsante qui sotto per registrare","Start recording message after":"Puoi parlare tra poco...",Recording:"Registrazione","Answer phone to start recording":"Rispondi al telefono per iniziare la registrazione","Close the call to stop recording":"Chiudi la chiamata per fermare la registrazione","Search or type a contact":"Cerca o digita un contatto","Enter a phone number":"Inserisci un numero di telefono","Physical phone":"Telefono fisso",Close:"Chiudi",Back:"Indietro","More actions":"Altre azioni"},i={Hangup:"Chiudi",Pause:"Pausa",Play:"Riprendi",Mute:"Muto",Unmute:"Togli muto",Transfer:"Trasferisci","Cancel transfer":"Annulla trasferimento",Collapse:"Riduci",Expand:"Espandi",Keyboard:"Tastiera",Park:"Parcheggia","Back to call":"Torna alla chiamata",Stop:"Stop",Delete:"Elimina",Confirm:"Conferma","Start recording":"Inizia registrazione","Switch call":"Scambia chiamata","Call to transfer":"Clicca per trasferire","Hangup and transfer":"Trasferisci",Answer:"Rispondi",Settings:"Impostazioni",Record:"Registra","Stop recording":"Ferma registrazione",Recording:"Registrando","Interrupt recording":"Interrompi registrazione","Other actions":"Altre azioni",Conference:"Aggiungi partecipante per chiamata in conferenza","Add user to conference":"Aggiungi alla chiamata in conferenza","Go to settings":"Vai alle impostazioni","Enable camera":"Abilita video","Switch device":"Cambia dispositivo",Reload:"Ricarica","Close alert":"Chiudi avviso","Share screen":"Condividi schermo","Stop sharing":"Interrompi condivisione","Disable camera":"Disabilita video","Enter fullscreen":"Vai a schermo intero","Exit fullscreen":"Esci da schermo intero"},a={"In progress...":"In corso...","Outgoing call":"Chiamata in uscita","Incoming call":"Chiamata in arrivo"},o={"No users found":"Nessun utente trovato"},r={browser_permissions:"Errore nei permessi del browser",user_permissions:"Errore nei permessi dei media",unknown_media_permissions:"Errore generico nei permessi",webrtc_down:"WebRTC non disponibile",socket_down:"Socket non disponibile",busy_camera:"Webcam occupata",call_transfered:"Trasferimento riuscito","The browser doesn't have permission to access camera or microphone.":"Il browser non ha il permesso di accedere alla fotocamera o al microfono.","You must accept audio and video permissions.":"Devi accettare i permessi audio e video.","Web Phone can't access audio or camera on this device.":"Il Web Phone non può accedere all'audio o alla fotocamera su questo dispositivo.","Web Phone connection is down.":"Il Web Phone non comunica con il server.","NethLink connection is down.":"NethLink non disponibile.","Server connection is down.":"Connessione al server non disponibile.","Camera is used by another application.":"La fotocamera è utilizzata da un'altra applicazione.","Unknown audio or camera permissions.":"Microfono o fotocamera non disponibili.","No microphone or camera permissions.":"Devi accettare i permessi del browser.","Call transferred successfully.":"La chiamata è stata trasferita con successo.","Camera is already used.":"La Webcam è già in uso."},n={Theme:"Tema",Dark:"Scuro",Light:"Chiaro",Speakers:"Altoparlanti",Microphones:"Microfoni",Cameras:"Video",Settings:"Impostazioni"},t={Conference:"Conferenza","Add participant":"Aggiungi partecipante","Remove participant":"Rimuovi partecipante","Waiting for the conference":"In attesa della conferenza","Start conference":"Inizia conferenza","Unmute participant":"Attiva audio partecipante","Mute participant":"Disattiva audio partecipante","Mute all participants":"Disattiva audio a tutti","Unmute all participants":"Attiva audio a tutti","In conference":"In conferenza","End conference":"Termina conferenza","No participants":"Nessun partecipante","Add participants to conference":"Aggiungi partecipanti alla conferenza"},s={Common:e,Tooltip:i,Call:a,Transfer:o,Errors:r,Settings:n,"Switch device":{"Switch device":"Cambia dispositivo","Switch information":"La chiamata continuerà sul dispositivo selezionato."},"Screen sharing":{Sharing:"Condivisione"},"Phone island":{"Mobile app":"App mobile"},Conference:t};exports.Call=a,exports.Common=e,exports.Conference=t,exports.Errors=r,exports.Settings=n,exports.Tooltip=i,exports.Transfer=o,exports.default=s;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e={Intrude:"Intromesso",Listen:"Ascolto","Start recording message before":"Premi il pulsante qui sotto per registrare","Start recording message after":"Puoi parlare tra poco...",Recording:"Registrazione","Answer phone to start recording":"Rispondi al telefono per iniziare la registrazione","Close the call to stop recording":"Chiudi la chiamata per fermare la registrazione","Search or type a contact":"Cerca o digita un contatto","Enter a phone number":"Inserisci un numero di telefono","Physical phone":"Telefono fisso",Close:"Chiudi",Back:"Indietro","More actions":"Altre azioni"},i={Hangup:"Chiudi",Pause:"Pausa",Play:"Riprendi",Mute:"Muto",Unmute:"Togli muto",Transfer:"Trasferisci","Cancel transfer":"Annulla trasferimento",Collapse:"Riduci",Expand:"Espandi",Keyboard:"Tastiera",Park:"Parcheggia","Back to call":"Torna alla chiamata",Stop:"Stop",Delete:"Elimina",Confirm:"Conferma","Start recording":"Inizia registrazione","Switch call":"Scambia chiamata","Call to transfer":"Clicca per trasferire","Hangup and transfer":"Trasferisci",Answer:"Rispondi",Settings:"Impostazioni",Record:"Registra","Stop recording":"Ferma registrazione",Recording:"Registrando","Interrupt recording":"Interrompi registrazione","Other actions":"Altre azioni",Conference:"Aggiungi partecipante per chiamata in conferenza","Add user to conference":"Aggiungi alla chiamata in conferenza","Go to settings":"Vai alle impostazioni","Enable camera":"Abilita video","Enable permission camera":"Abilita permesso video","Switch device":"Cambia dispositivo",Reload:"Ricarica","Close alert":"Chiudi avviso","Share screen":"Condividi schermo","Stop sharing":"Interrompi condivisione","Disable camera":"Disabilita video","Enter fullscreen":"Vai a schermo intero","Exit fullscreen":"Esci da schermo intero"},a={"In progress...":"In corso...","Outgoing call":"Chiamata in uscita","Incoming call":"Chiamata in arrivo"},o={"No users found":"Nessun utente trovato"},r={browser_permissions:"Errore nei permessi del browser",user_permissions:"Errore nei permessi dei media",unknown_media_permissions:"Errore generico nei permessi",webrtc_down:"WebRTC non disponibile",socket_down:"Socket non disponibile",busy_camera:"Webcam occupata",call_transfered:"Trasferimento riuscito","The browser doesn't have permission to access camera or microphone.":"Il browser non ha il permesso di accedere alla fotocamera o al microfono.","You must accept audio and video permissions.":"Devi accettare i permessi audio e video.","Web Phone can't access audio or camera on this device.":"Il Web Phone non può accedere all'audio o alla fotocamera su questo dispositivo.","Web Phone connection is down.":"Il Web Phone non comunica con il server.","NethLink connection is down.":"NethLink non disponibile.","Server connection is down.":"Connessione al server non disponibile.","Camera is used by another application.":"La fotocamera è utilizzata da un'altra applicazione.","Unknown audio or camera permissions.":"Microfono o fotocamera non disponibili.","No microphone or camera permissions.":"Devi accettare i permessi del browser.","Call transferred successfully.":"La chiamata è stata trasferita con successo.","Camera is already used.":"La Webcam è già in uso."},n={Theme:"Tema",Dark:"Scuro",Light:"Chiaro",Speakers:"Altoparlanti",Microphones:"Microfoni",Cameras:"Video",Settings:"Impostazioni"},t={Conference:"Conferenza","Add participant":"Aggiungi partecipante","Remove participant":"Rimuovi partecipante","Waiting for the conference":"In attesa della conferenza","Start conference":"Inizia conferenza","Unmute participant":"Attiva audio partecipante","Mute participant":"Disattiva audio partecipante","Mute all participants":"Disattiva audio a tutti","Unmute all participants":"Attiva audio a tutti","In conference":"In conferenza","End conference":"Termina conferenza","No participants":"Nessun partecipante","Add participants to conference":"Aggiungi partecipanti alla conferenza"},s={Common:e,Tooltip:i,Call:a,Transfer:o,Errors:r,Settings:n,"Switch device":{"Switch device":"Cambia dispositivo","Switch information":"La chiamata continuerà sul dispositivo selezionato."},"Screen sharing":{Sharing:"Condivisione"},"Phone island":{"Mobile app":"App mobile"},Conference:t};exports.Call=a,exports.Common=e,exports.Conference=t,exports.Errors=r,exports.Settings=n,exports.Tooltip=i,exports.Transfer=o,exports.default=s;
2
2
  //# sourceMappingURL=translation.json.js.map
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nethesis/phone-island",
3
3
  "author": "Nethesis",
4
- "version": "0.13.2",
4
+ "version": "0.13.3",
5
5
  "description": "NethVoice CTI Phone Island",
6
6
  "keywords": [
7
7
  "nethserver",