Troubleshooting video chat component

This commit is contained in:
Jesse C. Fisher 2023-08-11 13:38:11 +00:00 committed by icwizardmonke
parent 108d5882a5
commit cf45d8c38c
2 changed files with 6 additions and 4 deletions

File diff suppressed because one or more lines are too long

View File

@ -20,7 +20,9 @@ class VideoCall extends React.Component{
} }
join(data){ this.createPC(data.from, true) } join(data){ this.createPC(data.from, true) }
joinCall(e){ joinCall(e){
VideoCall.cable.subscriptions.create( console.log("Hello from joinCall");
console.log(e);
App.cable.subscriptions.create(
{ channel: "CallChannel" }, { channel: "CallChannel" },
{ {
connected: () => { connected: () => {
@ -128,7 +130,7 @@ class VideoCall extends React.Component{
.forEach(function (track) { track.stop(); }) .forEach(function (track) { track.stop(); })
this.localVideo.srcObject = null; this.localVideo.srcObject = null;
VideoCall.cable.subscriptions.subscriptions = []; App.cable.subscriptions.subscriptions = [];
this.remoteVideoContainer.innerHTML = ""; this.remoteVideoContainer.innerHTML = "";
broadcastData({ type: LEAVE_CALL, from: this.userId }); broadcastData({ type: LEAVE_CALL, from: this.userId });
} }
@ -148,4 +150,4 @@ class VideoCall extends React.Component{
</div>) </div>)
} }
} }
export default VideoCall; export default App;