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

Tidy up - removed cruft from the webrtc ib stack; moved stream dependency to core #321

Merged
merged 1 commit into from
Jul 20, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .meteor/packages
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,5 @@ yasaricli:slugify
meteorhacks:kadira
meteorhacks:flow-router
meteorhacks:flow-layout
arunoda:streams@0.1.17
rocketchat:webrtc
1 change: 0 additions & 1 deletion packages/rocketchat-webrtc-ib/common.js

This file was deleted.

5 changes: 1 addition & 4 deletions packages/rocketchat-webrtc-ib/package.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,12 @@ Package.onUse(function(api) {

api.use([
'coffeescript',
'rocketchat:lib@0.0.1',
'arunoda:streams@0.1.17'
'rocketchat:lib@0.0.1'
]);

api.addFiles('common.js');
api.addFiles('adapter.js', ['client']);
api.addFiles('webrtc.js', ['client']);
api.addFiles('webrtcmsg.coffee', ['client']);
api.addFiles('server.js', ['server']);

api.export('webrtc')
});
Expand Down
18 changes: 0 additions & 18 deletions packages/rocketchat-webrtc-ib/server.js

This file was deleted.

2 changes: 0 additions & 2 deletions packages/rocketchat-webrtc-ib/webrtc.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ webrtc = {
{url: "stun:stun.l.google.com:19302"}
]
},
stream: stream,
send: function(data) {
console.log
data.to = webrtc.to;
Expand All @@ -24,7 +23,6 @@ webrtc = {
msg: JSON.stringify(data),
rid: webrtc.room
});
// stream.emit('send', data);

},
stop: function(sendEvent) {
Expand Down
23 changes: 0 additions & 23 deletions packages/rocketchat-webrtc-ib/webrtcmsg.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,6 @@ class IncomingRtcMessageProcessor
if (message.to == Meteor.userId())
if (message.ts > webrtc.lastSeenTimestamp)
webrtc.lastSeenTimestamp = message.ts
# console.log('RTC ' + JSON.stringify(message))
webrtc.processIncomingRtcMessage(JSON.parse(message.msg), message.rid.replace(message.to, ''), message.rid)



# stream.on(Meteor.userId(), function(data) {
# webrtc.log('stream.on', Meteor.userId(), data)
# if (data.close == true) {
# webrtc.stop(false);
# }

# if (!webrtc.pc)
# webrtc.start(false, data.from);
#
# if (data.sdp) {
# webrtc.pc.setRemoteDescription(new RTCSessionDescription(data.sdp));
# } else {
# if( ["closed", "failed", "disconnected", "completed"].indexOf(webrtc.pc.iceConnectionState) === -1) {
# webrtc.pc.addIceCandidate(new RTCIceCandidate(data.candidate));
# }
# }
#});



RocketChat.callbacks.add 'renderRtcMessage', IncomingRtcMessageProcessor, RocketChat.callbacks.priority.LOW
3 changes: 1 addition & 2 deletions packages/rocketchat-webrtc/package.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ Package.onUse(function(api) {

api.use([
'coffeescript',
'rocketchat:lib@0.0.1',
'arunoda:streams@0.1.17'
'rocketchat:lib@0.0.1'
]);

api.addFiles('common.js');
Expand Down
10 changes: 7 additions & 3 deletions server/stream/streamBroadcast.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@


Meteor.startup ->
startStreamBroadcast
'webrtc.stream': webrtc.stream
'typing': typingStream
if webrtc
startStreamBroadcast
'webrtc.stream': webrtc.stream
'typing': typingStream
else
startStreamBroadcast
'typing': typingStream