|
400 | 400 | 'user_busy_error', |
401 | 401 | 'webrtc_error', |
402 | 402 | 'realtime_communication_error', |
| 403 | + 'vdi_strategy_not_supported', |
| 404 | + 'vdi_redir_not_supported', |
403 | 405 | 'other' |
404 | 406 | ]); |
405 | 407 |
|
@@ -26723,7 +26725,7 @@ AWS.apiLoader.services['connect']['2017-02-15'] = require('../apis/connect-2017- |
26723 | 26725 |
|
26724 | 26726 | connect.core = {}; |
26725 | 26727 | connect.core.initialized = false; |
26726 | | - connect.version = "2.11.0"; |
| 26728 | + connect.version = "2.12.0"; |
26727 | 26729 | connect.outerContextStreamsVersion = null; |
26728 | 26730 | connect.DEFAULT_BATCH_SIZE = 500; |
26729 | 26731 |
|
@@ -28216,7 +28218,7 @@ AWS.apiLoader.services['connect']['2017-02-15'] = require('../apis/connect-2017- |
28216 | 28218 | connect.assertNotNull(containerDiv, 'containerDiv'); |
28217 | 28219 | var iframe = document.createElement('iframe'); |
28218 | 28220 | iframe.src = initCCPParams.ccpUrl; |
28219 | | - iframe.allow = "microphone; camera; autoplay; clipboard-write"; |
| 28221 | + iframe.allow = "microphone; camera; autoplay; clipboard-write; identity-credentials-get"; |
28220 | 28222 | iframe.style = initCCPParams.style || "width: 100%; height: 100%"; |
28221 | 28223 | iframe.title = initCCPParams.iframeTitle || CCP_IFRAME_NAME; |
28222 | 28224 | iframe.name = CCP_IFRAME_NAME; |
@@ -31525,6 +31527,10 @@ AWS.apiLoader.services['connect']['2017-02-15'] = require('../apis/connect-2017- |
31525 | 31527 | global.lily = connect; |
31526 | 31528 | global.ccpVersion = "V2"; |
31527 | 31529 |
|
| 31530 | + const VDIPlatformType = { |
| 31531 | + CITRIX: "CITRIX", |
| 31532 | + } |
| 31533 | + |
31528 | 31534 | var RTPJobIntervalMs = 1000; |
31529 | 31535 | var statsReportingJobIntervalMs = 30000; |
31530 | 31536 | var streamBufferSize = 500; |
@@ -31594,16 +31600,56 @@ AWS.apiLoader.services['connect']['2017-02-15'] = require('../apis/connect-2017- |
31594 | 31600 | var self = this; |
31595 | 31601 | logger = new SoftphoneLogger(connect.getLog()); |
31596 | 31602 | logger.info("[Softphone Manager] softphone manager initialization has begun").sendInternalLogToServer(); |
| 31603 | + logger.info(`[SoftphoneManager] Client Provided Strategy: ${softphoneParams.VDIPlatform}`).sendInternalLogToServer(); |
| 31604 | + |
| 31605 | + let rtcJsStrategy; |
| 31606 | + if (softphoneParams.VDIPlatform) { |
| 31607 | + try { |
| 31608 | + if (softphoneParams.VDIPlatform === VDIPlatformType.CITRIX) { |
| 31609 | + rtcJsStrategy = new connect.CitrixVDIStrategy(); |
| 31610 | + logger.info(`[SoftphoneManager] Strategy constructor retrieved: ${rtcJsStrategy}`).sendInternalLogToServer(); |
| 31611 | + } else { |
| 31612 | + throw new Error("VDI Strategy not supported"); |
| 31613 | + } |
| 31614 | + } catch (error) { |
| 31615 | + if (error.message === "VDI Strategy not supported") { |
| 31616 | + publishError(SoftphoneErrorTypes.VDI_STRATEGY_NOT_SUPPORTED, error.message, ""); |
| 31617 | + throw error; |
| 31618 | + } |
| 31619 | + else if (error.message === "Citrix WebRTC redirection feature is NOT supported!") { |
| 31620 | + publishError(SoftphoneErrorTypes.VDI_REDIR_NOT_SUPPORTED, error.message, ""); |
| 31621 | + throw error; |
| 31622 | + } |
| 31623 | + else { |
| 31624 | + publishError(SoftphoneErrorTypes.OTHER, error.message, ""); |
| 31625 | + throw error; |
| 31626 | + } |
| 31627 | + } |
| 31628 | + } |
| 31629 | + |
31597 | 31630 | var rtcPeerConnectionFactory; |
31598 | 31631 | if (connect.RtcPeerConnectionFactory) { |
31599 | | - rtcPeerConnectionFactory = new connect.RtcPeerConnectionFactory(logger, |
31600 | | - connect.core.getWebSocketManager(), |
31601 | | - softphoneClientId, |
31602 | | - connect.hitch(self, requestIceAccess, { |
31603 | | - transportType: "softphone", |
31604 | | - softphoneClientId: softphoneClientId |
31605 | | - }), |
31606 | | - connect.hitch(self, publishError)); |
| 31632 | + if (rtcJsStrategy) { |
| 31633 | + rtcPeerConnectionFactory = new connect.RtcPeerConnectionFactory(logger, |
| 31634 | + connect.core.getWebSocketManager(), |
| 31635 | + softphoneClientId, |
| 31636 | + connect.hitch(self, requestIceAccess, { |
| 31637 | + transportType: "softphone", |
| 31638 | + softphoneClientId: softphoneClientId |
| 31639 | + }), |
| 31640 | + connect.hitch(self, publishError), |
| 31641 | + rtcJsStrategy |
| 31642 | + ); |
| 31643 | + } else { |
| 31644 | + rtcPeerConnectionFactory = new connect.RtcPeerConnectionFactory(logger, |
| 31645 | + connect.core.getWebSocketManager(), |
| 31646 | + softphoneClientId, |
| 31647 | + connect.hitch(self, requestIceAccess, { |
| 31648 | + transportType: "softphone", |
| 31649 | + softphoneClientId: softphoneClientId |
| 31650 | + }), |
| 31651 | + connect.hitch(self, publishError)); |
| 31652 | + } |
31607 | 31653 | } |
31608 | 31654 | if (!SoftphoneManager.isBrowserSoftPhoneSupported()) { |
31609 | 31655 | publishError(SoftphoneErrorTypes.UNSUPPORTED_BROWSER, |
@@ -31733,14 +31779,27 @@ AWS.apiLoader.services['connect']['2017-02-15'] = require('../apis/connect-2017- |
31733 | 31779 | if (callConfig.useWebSocketProvider) { |
31734 | 31780 | webSocketProvider = connect.core.getWebSocketManager(); |
31735 | 31781 | } |
31736 | | - var session = new connect.RTCSession( |
31737 | | - callConfig.signalingEndpoint, |
31738 | | - callConfig.iceServers, |
31739 | | - softphoneInfo.callContextToken, |
31740 | | - logger, |
31741 | | - contact.getContactId(), |
31742 | | - agentConnectionId, |
31743 | | - webSocketProvider); |
| 31782 | + var session; |
| 31783 | + if (rtcJsStrategy) { |
| 31784 | + session = new connect.RTCSession( |
| 31785 | + callConfig.signalingEndpoint, |
| 31786 | + callConfig.iceServers, |
| 31787 | + softphoneInfo.callContextToken, |
| 31788 | + logger, |
| 31789 | + contact.getContactId(), |
| 31790 | + agentConnectionId, |
| 31791 | + webSocketProvider, |
| 31792 | + rtcJsStrategy); |
| 31793 | + } else { |
| 31794 | + session = new connect.RTCSession( |
| 31795 | + callConfig.signalingEndpoint, |
| 31796 | + callConfig.iceServers, |
| 31797 | + softphoneInfo.callContextToken, |
| 31798 | + logger, |
| 31799 | + contact.getContactId(), |
| 31800 | + agentConnectionId, |
| 31801 | + webSocketProvider); |
| 31802 | + } |
31744 | 31803 |
|
31745 | 31804 | session.echoCancellation = !softphoneParams.disableEchoCancellation; |
31746 | 31805 |
|
@@ -31796,7 +31855,7 @@ AWS.apiLoader.services['connect']['2017-02-15'] = require('../apis/connect-2017- |
31796 | 31855 | }); |
31797 | 31856 | }; |
31798 | 31857 |
|
31799 | | - session.remoteAudioElement = document.getElementById('remote-audio'); |
| 31858 | + session.remoteAudioElement = document.getElementById('remote-audio') || window.parent.parent.document.getElementById('remote-audio'); |
31800 | 31859 | if (rtcPeerConnectionFactory) { |
31801 | 31860 | session.connect(rtcPeerConnectionFactory.get(callConfig.iceServers)); |
31802 | 31861 | } else { |
@@ -31993,7 +32052,7 @@ AWS.apiLoader.services['connect']['2017-02-15'] = require('../apis/connect-2017- |
31993 | 32052 | return; |
31994 | 32053 | } |
31995 | 32054 |
|
31996 | | - var remoteAudioElement = document.getElementById('remote-audio'); |
| 32055 | + var remoteAudioElement = document.getElementById('remote-audio') || window.parent.parent.document.getElementById('remote-audio'); |
31997 | 32056 | if (remoteAudioElement && typeof remoteAudioElement.setSinkId === 'function') { |
31998 | 32057 | remoteAudioElement.setSinkId(deviceId).then(() => { |
31999 | 32058 | connect.getLog().info(`[Audio Device Settings] Speaker device ${deviceId} successfully set to speaker audio element`).sendInternalLogToServer(); |
@@ -32478,7 +32537,6 @@ AWS.apiLoader.services['connect']['2017-02-15'] = require('../apis/connect-2017- |
32478 | 32537 | connect.SoftphoneManager = SoftphoneManager; |
32479 | 32538 | })(); |
32480 | 32539 |
|
32481 | | - |
32482 | 32540 | /***/ }), |
32483 | 32541 |
|
32484 | 32542 | /***/ 944: |
|
0 commit comments