fix: Fixes loading web on mobile browser.
Adds missing url prop to DialInSummary and safeguard the URL creation.
This commit is contained in:
parent
8bb5c114f8
commit
75d80ad879
|
@ -40,6 +40,11 @@ type Props = {
|
||||||
*/
|
*/
|
||||||
_room: string,
|
_room: string,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The page current url.
|
||||||
|
*/
|
||||||
|
_url: URL,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used to dispatch actions from the buttons.
|
* Used to dispatch actions from the buttons.
|
||||||
*/
|
*/
|
||||||
|
@ -90,7 +95,7 @@ class DeepLinkingMobilePage extends Component<Props> {
|
||||||
* @returns {ReactElement}
|
* @returns {ReactElement}
|
||||||
*/
|
*/
|
||||||
render() {
|
render() {
|
||||||
const { _downloadUrl, _room, t } = this.props;
|
const { _downloadUrl, _room, t, _url } = this.props;
|
||||||
const { HIDE_DEEP_LINKING_LOGO, NATIVE_APP_NAME, SHOW_DEEP_LINKING_IMAGE } = interfaceConfig;
|
const { HIDE_DEEP_LINKING_LOGO, NATIVE_APP_NAME, SHOW_DEEP_LINKING_IMAGE } = interfaceConfig;
|
||||||
const downloadButtonClassName
|
const downloadButtonClassName
|
||||||
= `${_SNS}__button ${_SNS}__button_primary`;
|
= `${_SNS}__button ${_SNS}__button_primary`;
|
||||||
|
@ -181,7 +186,8 @@ class DeepLinkingMobilePage extends Component<Props> {
|
||||||
<DialInSummary
|
<DialInSummary
|
||||||
className = 'deep-linking-dial-in'
|
className = 'deep-linking-dial-in'
|
||||||
clickableNumbers = { true }
|
clickableNumbers = { true }
|
||||||
room = { _room } />
|
room = { _room }
|
||||||
|
url = { _url } />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@ -274,9 +280,12 @@ class DeepLinkingMobilePage extends Component<Props> {
|
||||||
* @returns {Props}
|
* @returns {Props}
|
||||||
*/
|
*/
|
||||||
function _mapStateToProps(state) {
|
function _mapStateToProps(state) {
|
||||||
|
const { locationURL = {} } = state['features/base/connection'];
|
||||||
|
|
||||||
return {
|
return {
|
||||||
_downloadUrl: interfaceConfig[`MOBILE_DOWNLOAD_LINK_${Platform.OS.toUpperCase()}`],
|
_downloadUrl: interfaceConfig[`MOBILE_DOWNLOAD_LINK_${Platform.OS.toUpperCase()}`],
|
||||||
_room: decodeURIComponent(state['features/base/conference'].room)
|
_room: decodeURIComponent(state['features/base/conference'].room),
|
||||||
|
_url: locationURL
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ type Props = {
|
||||||
/**
|
/**
|
||||||
* The url where we were loaded.
|
* The url where we were loaded.
|
||||||
*/
|
*/
|
||||||
url: string,
|
url: URL | string,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Invoked to obtain translated strings.
|
* Invoked to obtain translated strings.
|
||||||
|
@ -182,7 +182,14 @@ class DialInSummary extends Component<Props, State> {
|
||||||
return Promise.resolve();
|
return Promise.resolve();
|
||||||
}
|
}
|
||||||
|
|
||||||
return getDialInConferenceID(dialInConfCodeUrl, room, mucURL, new URL(this.props.url))
|
|
||||||
|
let url = this.props.url || {};
|
||||||
|
|
||||||
|
if (typeof url === 'string' || url instanceof String) {
|
||||||
|
url = new URL(url);
|
||||||
|
}
|
||||||
|
|
||||||
|
return getDialInConferenceID(dialInConfCodeUrl, room, mucURL, url)
|
||||||
.catch(() => Promise.reject(this.props.t('info.genericError')));
|
.catch(() => Promise.reject(this.props.t('info.genericError')));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue