Add call handling logic. Outbound voice calls work!

This commit is contained in:
Kegan Dougal 2015-07-15 15:36:45 +01:00
parent 7e30c0f47b
commit 6316f1b195
2 changed files with 94 additions and 1 deletions

View file

@ -28,7 +28,25 @@ var VideoView = ComponentBroker.get('molecules/voip/VideoView');
module.exports = React.createClass({
displayName: 'CallHandler',
mixins: [CallHandlerController],
getVideoView: function() {
return this.refs.video;
},
render: function(){
if (this.state && this.state.call) {
if (this.state.call.type === "video") {
return (
<VideoView ref="video"/>
);
}
else if (this.state.call.type === "voice") {
// <WaveformView /> in the future.
return (
<div></div>
);
}
}
return (
<div></div>
);