Fix videocall react cable
This commit is contained in:
parent
032d2adbd4
commit
6887ea8bb8
@ -19,6 +19,7 @@
|
||||
// require components
|
||||
//= require qrcode.min.js
|
||||
//= require eyecandy
|
||||
//= require cable
|
||||
//= require bundle
|
||||
// require react-rails-hot-loader
|
||||
// require_tree .
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -6,8 +6,8 @@
|
||||
//= require_tree ./channels
|
||||
|
||||
(function() {
|
||||
this.VideoCall || (this.VideoCall = {});
|
||||
this.App || (this.App = {});
|
||||
|
||||
VideoCall.cable = ActionCable.createConsumer();
|
||||
App.cable = ActionCable.createConsumer();
|
||||
|
||||
}).call(this);
|
||||
|
||||
@ -22,7 +22,7 @@ class VideoCall extends React.Component{
|
||||
joinCall(e){
|
||||
console.log("Hello from joinCall");
|
||||
console.log(e);
|
||||
VideoCall.cable.subscriptions.create(
|
||||
App.cable.subscriptions.create(
|
||||
{ channel: "CallChannel" },
|
||||
{
|
||||
connected: () => {
|
||||
@ -130,7 +130,7 @@ class VideoCall extends React.Component{
|
||||
.forEach(function (track) { track.stop(); })
|
||||
|
||||
this.localVideo.srcObject = null;
|
||||
VideoCall.cable.subscriptions.subscriptions = [];
|
||||
App.cable.subscriptions.subscriptions = [];
|
||||
this.remoteVideoContainer.innerHTML = "";
|
||||
broadcastData({ type: LEAVE_CALL, from: this.userId });
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user