-
Notifications
You must be signed in to change notification settings - Fork 10.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert WebRTC Package to Js #6775
Conversation
still need to add the coments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you are better than a coffee compiler, then fix the things they cant do right :) .
this.TransportClass = WebRTCTransportClass; | ||
this.selfId = selfId; | ||
this.room = room; | ||
this.config.iceServers = []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this line :) because its already defined at 160
url: URL.createObjectURL(remoteStream), | ||
state: peerConnection.iceConnectionState | ||
}; | ||
console.log(item); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
???
} | ||
|
||
setVideoEnabled(enabled) { | ||
if (enabled == null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use a default parameter.
} | ||
|
||
setScreenShareEnabled(enabled) { | ||
if (enabled == null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use a default parameter
this.active = false; | ||
this.monitor = false; | ||
this.remoteMonitoring = false; | ||
if ((this.localStream != null) && typeof this.localStream !== 'undefined') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove '(' ')'
*/ | ||
|
||
startCall(media) { | ||
if (media == null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use default parameter
if (this.autoAccept === true) { | ||
FlowRouter.goToRoomById(data.room); | ||
Meteor.defer(() => { | ||
return this.joinCall({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return
here is useless
desktop {Boolean} | ||
*/ | ||
|
||
joinCall(data) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use default parameter
ChromeScreenShare.screenCallback = callback; | ||
if (navigator === 'electron') { | ||
return fireGlobalEvent('get-sourceId', '*'); | ||
} else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you dont need an else statement if you have a return into the if
if (ChromeScreenShare.screenCallback != null) { | ||
return ChromeScreenShare.screenCallback('PermissionDeniedError'); | ||
} else { | ||
throw new Error('PermissionDeniedError'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you dont need an else statement if you have a return into the if
this.updateRemoteItems(); | ||
}); | ||
peerConnection.addEventListener('iceconnectionstatechange', () => { | ||
let ref; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MartinSchoeler let ref
is always undefined
@RocketChat/core