let you join confs either as voice or video

pull/21833/head
Matthew Hodgson 2016-09-02 15:38:28 +01:00
parent d3bc2b7df7
commit f9d8829ba2
1 changed files with 11 additions and 6 deletions

View File

@ -57,10 +57,10 @@ module.exports = React.createClass({
} }
}, },
onConferenceNotificationClick: function() { onConferenceNotificationClick: function(type) {
dis.dispatch({ dis.dispatch({
action: 'place_call', action: 'place_call',
type: "video", type: type,
room_id: this.props.room.roomId, room_id: this.props.room.roomId,
}); });
}, },
@ -85,14 +85,19 @@ module.exports = React.createClass({
var conferenceCallNotification = null; var conferenceCallNotification = null;
if (this.props.displayConfCallNotification) { if (this.props.displayConfCallNotification) {
var supportedText; var supportedText, joinText;
if (!MatrixClientPeg.get().supportsVoip()) { if (!MatrixClientPeg.get().supportsVoip()) {
supportedText = " (unsupported)"; supportedText = " (unsupported)";
} }
else {
joinText = (<span>
Join as <a onClick={this.onConferenceNotificationClick.bind(this, 'voice')} href="#">voice</a> or <a onClick={this.onConferenceNotificationClick.bind(this, 'video')} href="#">video</a>.
</span>);
}
conferenceCallNotification = ( conferenceCallNotification = (
<div className="mx_RoomView_ongoingConfCallNotification" <div className="mx_RoomView_ongoingConfCallNotification">
onClick={this.onConferenceNotificationClick}> Ongoing conference call{ supportedText }. { joinText }
Ongoing conference call {supportedText}
</div> </div>
); );
} }