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

webrtc-adapter

Package Overview
Dependencies
Maintainers
3
Versions
120
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webrtc-adapter - npm Package Compare versions

Comparing version 6.1.4 to 6.1.5

.npmignore

4

package.json
{
"name": "webrtc-adapter",
"version": "6.1.4",
"version": "6.1.5",
"description": "A shim to insulate apps from WebRTC spec changes and browser prefix differences",

@@ -22,3 +22,3 @@ "license": "BSD-3-Clause",

"dependencies": {
"rtcpeerconnection-shim": "^1.2.9",
"rtcpeerconnection-shim": "^1.2.10",
"sdp": "^2.7.0"

@@ -25,0 +25,0 @@ },

@@ -44,3 +44,3 @@ [![Build Status](https://travis-ci.org/webrtc/adapter.svg)](https://travis-ci.org/webrtc/adapter)

Head over to [test/README.md](https://github.com/webrtc/samples/blob/gh-pages/test/README.md) and get started developing.
Head over to [test/README.md](https://github.com/webrtc/adapter/blob/gh-pages/test/README.md) and get started developing.

@@ -47,0 +47,0 @@ ## Publish a new version ##

@@ -252,3 +252,4 @@ /*

shimSendThrowTypeError: function(window) {
if (!window.RTCPeerConnection) {
if (!(window.RTCPeerConnection &&
'createDataChannel' in window.RTCPeerConnection.prototype)) {
return;

@@ -255,0 +256,0 @@ }

@@ -258,2 +258,6 @@ /*

if (offerOptions) {
if (typeof offerOptions.offerToReceiveAudio !== 'undefined') {
// support bit values
offerOptions.offerToReceiveAudio = !!offerOptions.offerToReceiveAudio;
}
var audioTransceiver = pc.getTransceivers().find(function(transceiver) {

@@ -282,2 +286,7 @@ return transceiver.sender.track &&

if (typeof offerOptions.offerToReceiveAudio !== 'undefined') {
// support bit values
offerOptions.offerToReceiveVideo = !!offerOptions.offerToReceiveVideo;
}
var videoTransceiver = pc.getTransceivers().find(function(transceiver) {

@@ -284,0 +293,0 @@ return transceiver.sender.track &&

@@ -107,3 +107,18 @@ /*

.then(() => {
let sender = pc1.getSenders().find(s => s.track.kind === 'audio');
if (!(window.RTCDTMFSender &&
'canInsertDTMF' in window.RTCDTMFSender.prototype)) {
return;
}
return new Promise((resolve) => {
setTimeout(function canInsert() {
const sender = pc1.getSenders().find(s => s.track.kind === 'audio');
if (sender.dtmf.canInsertDTMF) {
return resolve();
}
setTimeout(canInsert, 10);
}, 0);
});
})
.then(() => {
const sender = pc1.getSenders().find(s => s.track.kind === 'audio');
sender.dtmf.insertDTMF('1');

@@ -110,0 +125,0 @@ return new Promise(resolve => sender.dtmf.ontonechange = resolve);

@@ -135,2 +135,57 @@ /*

});
describe('legacy createOffer shim converts offer into transceivers', () => {
let pc, stub, options;
beforeEach(() => {
stub = sinon.stub();
window.RTCPeerConnection.prototype.createOffer = function() {};
shim.shimCreateOfferLegacy(window);
pc = new window.RTCPeerConnection();
pc.getTransceivers = function() {
return [];
};
pc.addTransceiver = stub;
options = {
offerToReceiveAudio: false,
offerToReceiveVideo: false,
};
});
it('when offerToReceive Audio is true', () => {
options.offerToReceiveAudio = true;
pc.createOffer(options);
expect(stub).to.have.been.calledWith('audio');
});
it('when offerToReceive Video is true', () => {
options.offerToReceiveVideo = true;
pc.createOffer(options);
expect(stub).to.have.been.calledWith('video');
});
it('when both offers are false', () => {
pc.createOffer(options);
expect(stub).to.not.have.been.calledWith('audio');
expect(stub).to.not.have.been.calledWith('video');
});
it('when both offers are true', () => {
options.offerToReceiveAudio = true;
options.offerToReceiveVideo = true;
pc.createOffer(options);
expect(stub).to.have.been.calledWith('audio');
expect(stub).to.have.been.calledWith('video');
});
it('when offerToReceive has bit values', () => {
options.offerToReceiveAudio = 0;
options.offerToReceiveVideo = 1;
pc.createOffer(options);
expect(stub).to.not.have.been.calledWith('audio');
expect(stub).to.have.been.calledWith('video');
});
});
describe('conversion of RTCIceServer.url', () => {

@@ -137,0 +192,0 @@ let nativeStub;

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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