[RN] Add ability to share the URL for a conference

This commit is contained in:
Saúl Ibarra Corretgé
2017-01-31 10:52:29 +01:00
committed by Lyubo Marinov
parent 13e3375e8a
commit 54bb5f1879
5 changed files with 179 additions and 0 deletions

View File

@@ -7,6 +7,7 @@ import { MEDIA_TYPE, toggleCameraFacingMode } from '../../base/media';
import { Container } from '../../base/react';
import { ColorPalette } from '../../base/styles';
import { beginRoomLockRequest } from '../../room-lock';
import { beginShareRoom } from '../../share-room';
import {
abstractMapDispatchToProps,
@@ -45,6 +46,11 @@ class Toolbox extends Component {
*/
_onRoomLock: React.PropTypes.func,
/**
* Begins the UI procedure to share the conference/room URL.
*/
_onShareRoom: React.PropTypes.func,
/**
* Handler for toggle audio.
*/
@@ -211,6 +217,12 @@ class Toolbox extends Component {
onClick = { this.props._onToggleAudioOnly }
style = { style }
underlayColor = { underlayColor } />
<ToolbarButton
iconName = 'link'
iconStyle = { iconStyle }
onClick = { this.props._onShareRoom }
style = { style }
underlayColor = { underlayColor } />
</View>
);
@@ -257,6 +269,17 @@ function _mapDispatchToProps(dispatch) {
return dispatch(beginRoomLockRequest());
},
/**
* Begins the UI procedure to share the conference/room URL.
*
* @private
* @returns {void} Dispatched action.
* @type {Function}
*/
_onShareRoom() {
return dispatch(beginShareRoom());
},
/**
* Toggles the audio-only flag of the conference.
*