openvidu-browser: do not force wss in token

pull/672/merge
pabloFuente 2022-07-26 15:46:53 +02:00
parent d071529e12
commit fd83b6693a
1 changed files with 2 additions and 2 deletions

View File

@ -1348,7 +1348,7 @@ export class Session extends EventDispatcher {
* @hidden * @hidden
*/ */
getTokenParams(token: string) { getTokenParams(token: string) {
const match = token.match(/^(wss?\:)\/\/(([^:\/?#]*)(?:\:([0-9]+))?)([\/]{0,1}[^?#]*)(\?[^#]*|)(#.*|)$/); const match = token.match(/^(wss?)\:\/\/(([^:\/?#]*)(?:\:([0-9]+))?)([\/]{0,1}[^?#]*)(\?[^#]*|)(#.*|)$/);
if (!!match) { if (!!match) {
const url = { const url = {
protocol: match[1], protocol: match[1],
@ -1376,7 +1376,7 @@ export class Session extends EventDispatcher {
webrtcStatsInterval: queryParams['webrtcStatsInterval'], webrtcStatsInterval: queryParams['webrtcStatsInterval'],
sendBrowserLogs: queryParams['sendBrowserLogs'], sendBrowserLogs: queryParams['sendBrowserLogs'],
edition: queryParams['edition'], edition: queryParams['edition'],
wsUri: 'wss://' + url.host + '/openvidu', wsUri: url.protocol + '://' + url.host + '/openvidu',
httpUri: 'https://' + url.host httpUri: 'https://' + url.host
}; };