Fix: Made host parsing compatible for servers deployed in subdirectory

This commit is contained in:
Akshit Kr Nagpal 2018-07-13 14:59:43 +05:30 committed by Saúl Ibarra Corretgé
parent c09e66ea09
commit fae2c069b3

View file

@ -6,7 +6,6 @@ import React, { Component } from 'react';
import type { Dispatch } from 'redux'; import type { Dispatch } from 'redux';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import { push } from 'react-router-redux'; import { push } from 'react-router-redux';
import URL from 'url';
import { import {
RemoteControl, RemoteControl,
@ -218,7 +217,7 @@ class Conference extends Component<Props, State> {
_onScriptLoad(parentNode: Object, roomName: string, serverURL: string) { _onScriptLoad(parentNode: Object, roomName: string, serverURL: string) {
const JitsiMeetExternalAPI = window.JitsiMeetExternalAPI; const JitsiMeetExternalAPI = window.JitsiMeetExternalAPI;
const { host } = URL.parse(serverURL); const host = serverURL.replace(/https?:\/\//, '');
const configOverwrite = { const configOverwrite = {
startWithAudioMuted: this.props._startWithAudioMuted, startWithAudioMuted: this.props._startWithAudioMuted,