mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-11-07 06:58:25 +00:00
binding makes no difference - put a null check in to catch the rogue exception
This commit is contained in:
@@ -27,7 +27,7 @@ module.exports = React.createClass({
|
|||||||
mixins: [VideoViewController],
|
mixins: [VideoViewController],
|
||||||
|
|
||||||
componentWillMount: function() {
|
componentWillMount: function() {
|
||||||
dis.register(this.onAction.bind(this));
|
dis.register(this.onAction);
|
||||||
},
|
},
|
||||||
|
|
||||||
getRemoteVideoElement: function() {
|
getRemoteVideoElement: function() {
|
||||||
@@ -41,6 +41,9 @@ module.exports = React.createClass({
|
|||||||
onAction: function(payload) {
|
onAction: function(payload) {
|
||||||
switch (payload.action) {
|
switch (payload.action) {
|
||||||
case 'video_fullscreen':
|
case 'video_fullscreen':
|
||||||
|
if (!this.refs.container) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
var element = this.refs.container.getDOMNode();
|
var element = this.refs.container.getDOMNode();
|
||||||
var requestMethod = element.requestFullScreen || element.webkitRequestFullScreen || element.mozRequestFullScreen || element.msRequestFullscreen;
|
var requestMethod = element.requestFullScreen || element.webkitRequestFullScreen || element.mozRequestFullScreen || element.msRequestFullscreen;
|
||||||
requestMethod.call(element);
|
requestMethod.call(element);
|
||||||
|
|||||||
Reference in New Issue
Block a user