The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Rocket.Chat/packages/rocketchat-livechat/app/client/views/videoCall.js

36 lines
731 B

/* globals LivechatVideoCall */
Template.videoCall.helpers({
visible() {
if (Template.instance().showToolbar.get()) {
return 'visible';
}
}
});
Template.videoCall.events({
'click .end-call'() {
LivechatVideoCall.finish();
},
'click .video-overlay'(e, instance) {
if (instance.timeout) {
clearTimeout(instance.timeout);
}
instance.showToolbar.set(!instance.showToolbar.get());
if (instance.showToolbar.get()) {
instance.timeout = setTimeout(() => {
instance.showToolbar.set(false);
}, 3000);
}
}
});
Template.videoCall.onCreated(function() {
this.timeout = null;
this.showToolbar = new ReactiveVar(true);
this.timeout = setTimeout(() => {
this.showToolbar.set(false);
}, 10000);
});