Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jingle

Package Overview
Dependencies
Maintainers
2
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jingle - npm Package Compare versions

Comparing version 0.4.5 to 0.4.6

blah.patch

30

lib/mediaSession.js

@@ -25,3 +25,6 @@ var _ = require('underscore');

if (this.parent.localStream) {
if (opts.stream) {
this.pc.addStream(opts.stream);
this.localStream = opts.stream;
} else if (this.parent.localStream) {
this.pc.addStream(this.parent.localStream);

@@ -48,7 +51,24 @@ this.localStream = this.parent.localStream;

MediaSession.prototype = _.extend(MediaSession.prototype, {
start: function () {
start: function (constraints) {
var self = this;
this.state = 'pending';
this.pc.isInitiator = true;
this.pc.offer(function (err, sessDesc) {
this.pc.offer(constraints, function (err, sessDesc) {
// a workaround for missing a=sendonly
// https://code.google.com/p/webrtc/issues/detail?id=1553
if (constraints && constraints.mandatory) {
sessDesc.jingle.contents.forEach(function (content) {
if (!content.description || content.description.descType !== 'rtp') {
return;
}
if (!constraints.mandatory.OfferToReceiveAudio &&
content.description.media === 'audio') {
content.senders = 'initiator';
}
if (!constraints.mandatory.OfferToReceiveVideo &&
content.description.media === 'video') {
content.senders = 'initiator';
}
});
}
self.send('session-initiate', sessDesc.jingle);

@@ -185,8 +205,10 @@ });

onStreamAdded: function (event) {
var self = this;
log(this.sid + ': Remote media stream added');
// unfortunately, firefox does not support this yet
/*
event.stream.onended = function () {
self.onStreamRemoved({stream: event.stream});
};
*/

@@ -193,0 +215,0 @@ this.parent.emit('peerStreamAdded', this, event.stream);

3

lib/sessionManager.js

@@ -319,3 +319,3 @@ var _ = require('underscore');

Jingle.prototype.createMediaSession = function (peer, sid) {
Jingle.prototype.createMediaSession = function (peer, sid, stream) {
var session = new MediaSession({

@@ -325,2 +325,3 @@ sid: sid,

initiator: true,
stream: stream,
parent: this

@@ -327,0 +328,0 @@ });

{
"name": "jingle",
"description": "Generic Jingle via WebRTC session manager.",
"version": "0.4.5",
"version": "0.4.6",
"author": "Lance Stout <lance@andyet.net>",

@@ -6,0 +6,0 @@ "bugs": "https://github.com/legastero/jingle.js/issues",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc