1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-11 20:22:36 +03:00

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({ 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>
); );
} }