let you join confs either as voice or video

This commit is contained in:
Matthew Hodgson 2016-09-02 15:38:28 +01:00
parent d3bc2b7df7
commit f9d8829ba2

View file

@ -57,10 +57,10 @@ module.exports = React.createClass({
}
},
onConferenceNotificationClick: function() {
onConferenceNotificationClick: function(type) {
dis.dispatch({
action: 'place_call',
type: "video",
type: type,
room_id: this.props.room.roomId,
});
},
@ -85,14 +85,19 @@ module.exports = React.createClass({
var conferenceCallNotification = null;
if (this.props.displayConfCallNotification) {
var supportedText;
var supportedText, joinText;
if (!MatrixClientPeg.get().supportsVoip()) {
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 = (
<div className="mx_RoomView_ongoingConfCallNotification"
onClick={this.onConferenceNotificationClick}>
Ongoing conference call {supportedText}
<div className="mx_RoomView_ongoingConfCallNotification">
Ongoing conference call{ supportedText }. { joinText }
</div>
);
}