Skip to content

Commit 006f0b0

Browse files
committed
Try refing the container using a functiob as it currently seems to be endinh up with no refs some of the time
1 parent fe07075 commit 006f0b0

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

‎src/skins/vector/views/molecules/voip/VideoView.js‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,17 @@ module.exports = React.createClass({
3838
return this.refs.local.getDOMNode();
3939
},
4040

41+
setContainer: function(c) {
42+
this.container = c;
43+
},
44+
4145
onAction: function(payload) {
4246
switch (payload.action) {
4347
case 'video_fullscreen':
44-
if (!this.refs.container) {
48+
if (!this.container) {
4549
return;
4650
}
47-
var element = this.refs.container.getDOMNode();
51+
var element = this.container.getDOMNode();
4852
var requestMethod = element.requestFullScreen || element.webkitRequestFullScreen || element.mozRequestFullScreen || element.msRequestFullscreen;
4953
requestMethod.call(element);
5054
break;
@@ -54,7 +58,7 @@ module.exports = React.createClass({
5458
render: function() {
5559
var VideoFeed = sdk.getComponent('atoms.voip.VideoFeed');
5660
return (
57-
<div className="mx_VideoView" ref="container">
61+
<div className="mx_VideoView" ref={this.setContainer}>
5862
<div className="mx_VideoView_remoteVideoFeed">
5963
<VideoFeed ref="remote"/>
6064
</div>

0 commit comments

Comments
 (0)