Webrtc Web Browser Client SDK API Reference Guide Ver. 1.15
Total Page:16
File Type:pdf, Size:1020Kb
API Reference Guide AudioCodes WebRTC Solutions for Enterprises WebRTC Web Browser Client Version 1.15 API Reference Guide Contents Table of Contents 1 Introduction ....................................................................................................... 11 1.1 Purpose ................................................................................................................ 11 1.2 Scope ................................................................................................................... 11 1.3 Benefits ................................................................................................................ 11 2 API Classes ........................................................................................................ 13 2.1 AudioCodesUA ..................................................................................................... 13 2.1.1 Standard Methods ...................................................................................................15 2.1.1.1 constructor ................................................................................................15 2.1.1.2 init .............................................................................................................15 2.1.1.3 setServerConfig ........................................................................................15 2.1.1.4 setAccount ................................................................................................16 2.1.1.5 login ..........................................................................................................16 2.1.1.6 logout ........................................................................................................16 2.1.1.7 setListeners ..............................................................................................16 2.1.1.8 call ............................................................................................................17 2.1.2 Advanced Methods ..................................................................................................18 2.1.2.1 setRegisterExtraHeaders .........................................................................18 2.1.2.2 call ............................................................................................................18 2.1.2.3 setUseSessionTimer ................................................................................19 2.1.2.4 setRegisterExpires ...................................................................................19 2.1.2.5 isInitialized ................................................................................................19 2.1.2.6 version ......................................................................................................19 2.1.2.7 setChromeAudioConstraints ....................................................................20 2.1.2.8 setConstraints ..........................................................................................20 2.1.2.9 setBrowsersConstraints ...........................................................................22 2.1.2.10 setUserAgent ............................................................................................23 2.1.2.11 setAcLogger .............................................................................................23 2.1.2.12 setJsSipLogger .........................................................................................23 2.1.2.13 setWebSocketKeepAlive ..........................................................................24 2.1.2.14 setReconnectIntervals ..............................................................................26 2.1.2.15 deinit .........................................................................................................26 2.1.2.16 setDtmfOptions .........................................................................................26 2.1.2.17 setOAuthToken ........................................................................................27 2.1.2.18 setEnableAddVideo ..................................................................................27 2.1.2.21 checkAvailableDevices .............................................................................28 2.1.2.22 getWR().stream.getInfo ............................................................................28 2.1.2.23 getWR().connection.getTransceiversInfo .................................................29 2.1.2.25 sendMessage ...........................................................................................29 2.1.2.26 setModes ..................................................................................................30 2.1.2.27 getNumberOfSBC ....................................................................................32 2.1.2.28 switchSBC ................................................................................................32 2.1.2.29 openScreenSharing ..................................................................................33 2.1.2.30 closeScreenSharing .................................................................................34 2.1.2.31 isScreenSharingSupported ......................................................................34 2.1.2.32 setNetworkPriority ....................................................................................34 2.1.2.33 subscribe ..................................................................................................34 2.1.2.34 notify .........................................................................................................35 2.2 AudioCodesSession ............................................................................................. 36 2.2.1 Standard Methods ...................................................................................................37 2.2.1.1 answer ......................................................................................................37 2.2.1.2 reject .........................................................................................................37 2.2.1.3 redirect......................................................................................................38 2.2.1.4 terminate...................................................................................................38 Version 1.15 3 WebRTC WebRTC Web Browser Client 2.2.1.5 muteAudio ................................................................................................39 2.2.1.6 muteVideo ................................................................................................39 2.2.1.7 isAudioMute ..............................................................................................39 2.2.1.8 isVideoMute ..............................................................................................39 2.2.1.9 sendDTMF ................................................................................................40 2.2.1.10 isOutgoing ................................................................................................40 2.2.1.11 data: map<String, Object> .......................................................................40 2.2.1.12 duration.....................................................................................................41 2.2.1.13 wasAccepted ............................................................................................41 2.2.1.14 isLocalHold ...............................................................................................41 2.2.1.15 isRemoteHold ...........................................................................................42 2.2.1.16 IsReadyToReOffer ...................................................................................42 2.2.1.17 hold ...........................................................................................................42 2.2.2 Advanced Methods ..................................................................................................43 2.2.2.1 answer ......................................................................................................43 2.2.2.2 reject .........................................................................................................43 2.2.2.3 redirect......................................................................................................43 2.2.2.4 getReplacesHeader ..................................................................................44 2.2.2.5 getRTCPeerConnection ...........................................................................44 2.2.2.6 getRTCLocalStream .................................................................................44 2.2.2.7 getRTCRemoteStream .............................................................................45 2.2.2.8 startSendingVideo ....................................................................................45 2.2.2.9 stopSendingVideo ....................................................................................46 2.2.2.10 hasVideo, hasSendVideo, hasReceiveVideo ...........................................46 2.2.2.11 getVideoStatus .........................................................................................46 2.2.2.12 hasEnabledSendVideo, hasEnabledReceiveVideo .................................47 2.2.2.13 getEnabledVideoStatus ............................................................................47 2.2.2.14 setRemoteHoldState ................................................................................47