Auto detect https in bbb_webrtc_bridge_sip.js and select between wss and ws

This commit is contained in:
Ghazi Triki 2017-01-31 19:31:27 +01:00
parent dc73b512e1
commit 0d6acd27b4
3 changed files with 3 additions and 3 deletions

View File

@ -192,7 +192,7 @@ function createUAWithStuns(username, server, callback, stunsConfig, makeCallFunc
*/
var configuration = {
uri: 'sip:' + encodeURIComponent(username) + '@' + server,
wsServers: 'ws://' + server + '/ws',
wsServers: ('https:' == document.location.protocol ? 'wss://' : 'ws://') + server + '/ws',
displayName: username,
register: false,
traceSip: true,

View File

@ -192,7 +192,7 @@ function createUAWithStuns(username, server, callback, stunsConfig, makeCallFunc
*/
var configuration = {
uri: 'sip:' + encodeURIComponent(username) + '@' + server,
wsServers: 'ws://' + server + '/ws',
wsServers: ('https:' == document.location.protocol ? 'wss://' : 'ws://') + server + '/ws',
displayName: username,
register: false,
traceSip: true,

View File

@ -175,7 +175,7 @@ function createUAWithStuns(username, server, callback, stunsConfig, makeCallFunc
*/
var configuration = {
uri: 'sip:' + encodeURIComponent(username) + '@' + server,
wsServers: 'ws://' + server + '/ws',
wsServers: ('https:' == document.location.protocol ? 'wss://' : 'ws://') + server + '/ws',
displayName: username,
register: false,
traceSip: true,