Factor out a separate auxpanel, and cleanup the maxHeight management

Basically two changes here:

1. Factor out auxpanel from RoomView
2. Rather than setting maxHeight attributes by poking directly into the DOM,
pass them down as properties.
This commit is contained in:
Richard van der Hoff 2016-02-23 15:46:27 +00:00
parent bb6a36b911
commit 7a20fda7e7
6 changed files with 169 additions and 90 deletions

View file

@ -22,6 +22,9 @@ module.exports = React.createClass({
displayName: 'VideoFeed',
propTypes: {
// maxHeight style attribute for the video element
maxHeight: React.PropTypes.number,
// a callback which is called when the video element is resized
// due to a change in video metadata
onResize: React.PropTypes.func,
@ -43,7 +46,7 @@ module.exports = React.createClass({
render: function() {
return (
<video ref="vid">
<video ref="vid" style={{maxHeight: this.props.maxHeight}}>
</video>
);
},