Skip to content
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

Merged
merged 10 commits into from
May 11, 2017
Merged

Convert WebRTC Package to Js #6775

merged 10 commits into from
May 11, 2017

Conversation

MartinSchoeler
Copy link
Contributor

@RocketChat/core

@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-6775 April 24, 2017 14:12 Inactive
@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-6775 April 24, 2017 14:18 Inactive
Copy link
Member

@ggazzo ggazzo left a 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 = [];
Copy link
Member

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);
Copy link
Member

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) {
Copy link
Member

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) {
Copy link
Member

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') {
Copy link
Member

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) {
Copy link
Member

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({
Copy link
Member

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) {
Copy link
Member

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 {
Copy link
Member

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');
Copy link
Member

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

ggazzo
ggazzo previously requested changes May 11, 2017
this.updateRemoteItems();
});
peerConnection.addEventListener('iceconnectionstatechange', () => {
let ref;
Copy link
Member

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

@rodrigok rodrigok merged commit 355532b into develop May 11, 2017
@rodrigok rodrigok deleted the webrtc-to-js branch May 11, 2017 20:33
@engelgabriel engelgabriel added this to the 0.57.0 milestone May 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants