Socket
Socket
Sign inDemoInstall

cordova-plugin-iosrtc

Package Overview
Dependencies
17
Maintainers
3
Versions
61
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 6.0.21 to 8.0.0

.github/FUNDING.yml

18

CHANGELOG.md

@@ -0,1 +1,19 @@

#### Version 8.0.0
* implement RTCPeerConnection.addTransceiver #589 via @agelito
* add support for local description rollback #704 via @slavchev
* fix RtpSenders inconsistency after removeTrack call #702 via @RSATom
* fix RTCRtpSender MediaStreamTrack replace #699 via @RSATom
* fix requestPermission returns true if AVAuthorizationStatus is notDetermined #692
* fix crash when used with Janus Audiobridge #691 via @RSATom
* fix Warning [LayoutConstraints] Unable to simultaneously satisfy constraints. #422 via @slavchev
* fixcrash when used with Janus Audiobridge #691 via @RSATom
* extend transceiver/sender/receiver functionality #664 via @slavchev
* fix updateTransceiversState call #661 @ducile
* Update to WebRTC.framework M87
* Update to WebRTC.framework M84
#### Version 7.0.0
* Update to WebRTC.framework M79
* Update to WebRTC.framework M75
#### Version 6.0.21

@@ -2,0 +20,0 @@ * fix Canvas drawImage memory leak fix #681

1

extra/ios_arch.js

@@ -41,2 +41,3 @@ #!/usr/bin/env node

archs.forEach((arch) => {
//console.log(`lipo -extract ${arch} WebRTC -o WebRTC-${arch}`, cwd);
exec(`lipo -extract ${arch} WebRTC -o WebRTC-${arch}`, { cwd: cwd });

@@ -43,0 +44,0 @@ });

10

js/iosrtc.js

@@ -26,4 +26,5 @@ /**

MediaStream = require('./MediaStream'),
MediaStreamTrack = require('./MediaStreamTrack'),
videoElementsHandler = require('./videoElementsHandler');
{ MediaStreamTrack } = require('./MediaStreamTrack'),
videoElementsHandler = require('./videoElementsHandler'),
{ RTCRtpTransceiver } = require('./RTCRtpTransceiver');

@@ -221,2 +222,3 @@ /**

window.MediaStreamTrack = MediaStreamTrack;
window.RTCRtpTransceiver = RTCRtpTransceiver;

@@ -263,3 +265,5 @@ // Apply CanvasRenderingContext2D.drawImage monkey patch

// Create a new image from binary data
const imageDataBlob = convertDataURIToBlob('data:image/jpg;base64,' + base64Image);
const imageDataBlob = convertDataURIToBlob(
'data:image/jpg;base64,' + base64Image
);

@@ -266,0 +270,0 @@ // Create a new object URL object

@@ -16,3 +16,3 @@ /**

EventTarget = require('./EventTarget'),
MediaStreamTrack = require('./MediaStreamTrack'),
{ MediaStreamTrack } = require('./MediaStreamTrack'),
/**

@@ -19,0 +19,0 @@ * Local variables.

/**
* Expose the MediaStreamTrack class.
*/
module.exports = MediaStreamTrack;
module.exports.MediaStreamTrack = MediaStreamTrack;
module.exports.newMediaStreamTrackId = newMediaStreamTrackId;

@@ -51,2 +52,4 @@ /**

this.dataFromEvent = dataFromEvent;
function onResultOK(data) {

@@ -98,3 +101,4 @@ onEvent.call(self, data);

readyState: this.readyState,
enabled: this.enabled
enabled: this.enabled,
trackId: this.dataFromEvent.trackId
});

@@ -101,0 +105,0 @@ };

@@ -144,34 +144,36 @@ /**

if (typeof data === 'string' || data instanceof String) {
exec(null, null, 'iosrtcPlugin', 'RTCPeerConnection_RTCDataChannel_sendString', [
this.peerConnection.pcId,
this.dcId,
data
]);
} else if (window.ArrayBuffer && data instanceof window.ArrayBuffer) {
exec(null, null, 'iosrtcPlugin', 'RTCPeerConnection_RTCDataChannel_sendBinary', [
this.peerConnection.pcId,
this.dcId,
data
]);
} else if (
(window.Int8Array && data instanceof window.Int8Array) ||
(window.Uint8Array && data instanceof window.Uint8Array) ||
(window.Uint8ClampedArray && data instanceof window.Uint8ClampedArray) ||
(window.Int16Array && data instanceof window.Int16Array) ||
(window.Uint16Array && data instanceof window.Uint16Array) ||
(window.Int32Array && data instanceof window.Int32Array) ||
(window.Uint32Array && data instanceof window.Uint32Array) ||
(window.Float32Array && data instanceof window.Float32Array) ||
(window.Float64Array && data instanceof window.Float64Array) ||
(window.DataView && data instanceof window.DataView)
) {
exec(null, null, 'iosrtcPlugin', 'RTCPeerConnection_RTCDataChannel_sendBinary', [
this.peerConnection.pcId,
this.dcId,
data.buffer
]);
} else {
throw new Error('invalid data type');
}
setImmediate(() => {
if (typeof data === 'string' || data instanceof String) {
exec(null, null, 'iosrtcPlugin', 'RTCPeerConnection_RTCDataChannel_sendString', [
this.peerConnection.pcId,
this.dcId,
data
]);
} else if (window.ArrayBuffer && data instanceof window.ArrayBuffer) {
exec(null, null, 'iosrtcPlugin', 'RTCPeerConnection_RTCDataChannel_sendBinary', [
this.peerConnection.pcId,
this.dcId,
data
]);
} else if (
(window.Int8Array && data instanceof window.Int8Array) ||
(window.Uint8Array && data instanceof window.Uint8Array) ||
(window.Uint8ClampedArray && data instanceof window.Uint8ClampedArray) ||
(window.Int16Array && data instanceof window.Int16Array) ||
(window.Uint16Array && data instanceof window.Uint16Array) ||
(window.Int32Array && data instanceof window.Int32Array) ||
(window.Uint32Array && data instanceof window.Uint32Array) ||
(window.Float32Array && data instanceof window.Float32Array) ||
(window.Float64Array && data instanceof window.Float64Array) ||
(window.DataView && data instanceof window.DataView)
) {
exec(null, null, 'iosrtcPlugin', 'RTCPeerConnection_RTCDataChannel_sendBinary', [
this.peerConnection.pcId,
this.dcId,
data.buffer
]);
} else {
throw new Error('invalid data type');
}
});
};

@@ -178,0 +180,0 @@

@@ -20,7 +20,6 @@ /**

RTCRtpSender = require('./RTCRtpSender'),
RTCRtpTransceiver = require('./RTCRtpTransceiver'),
RTCStatsResponse = require('./RTCStatsResponse'),
{ RTCRtpTransceiver, addTransceiverToPeerConnection } = require('./RTCRtpTransceiver'),
RTCStatsReport = require('./RTCStatsReport'),
MediaStream = require('./MediaStream'),
MediaStreamTrack = require('./MediaStreamTrack'),
{ MediaStreamTrack, newMediaStreamTrackId } = require('./MediaStreamTrack'),
Errors = require('./Errors');

@@ -59,2 +58,12 @@

);
Object.defineProperty(
this,
'addTransceiver',
RTCPeerConnection.prototype_descriptor.addTransceiver
);
Object.defineProperty(
this,
'getOrCreateTrack',
RTCPeerConnection.prototype_descriptor.getOrCreateTrack
);

@@ -73,5 +82,6 @@ // Public atributes.

this.remoteStreams = {};
this.localTracks = {};
this.remoteTracks = {};
this.tracks = {};
this.transceivers = [];
function onResultOK(data) {

@@ -160,2 +170,6 @@ onEvent.call(self, data);

if (data.transceivers) {
self.updateTransceiversState(data.transceivers);
}
var desc = new RTCSessionDescription(data);

@@ -202,2 +216,6 @@

if (data.transceivers) {
self.updateTransceiversState(data.transceivers);
}
var desc = new RTCSessionDescription(data);

@@ -257,5 +275,9 @@

if (data.transceivers) {
self.updateTransceiversState(data.transceivers);
}
debug('setLocalDescription() | success');
// Update localDescription.
self._localDescription = new RTCSessionDescription(data);
self._localDescription = data.type === '' ? null : new RTCSessionDescription(data);
resolve();

@@ -304,5 +326,8 @@ }

type: desc.type,
sdp: desc.sdp.split('\n').filter((line) => {
return line.trim() !== 'a=extmap-allow-mixed';
}).join('\n')
sdp: desc.sdp
.split('\n')
.filter((line) => {
return line.trim() !== 'a=extmap-allow-mixed';
})
.join('\n')
});

@@ -327,2 +352,6 @@ }

if (data.transceivers) {
self.updateTransceiversState(data.transceivers);
}
debug('setRemoteDescription() | success');

@@ -449,63 +478,19 @@ // Update remoteDescription.

RTCPeerConnection.prototype.getReceivers = function () {
var self = this,
tracks = [],
id;
for (id in this.remoteTracks) {
if (this.remoteTracks.hasOwnProperty(id)) {
tracks.push(this.remoteTracks[id]);
}
}
return tracks.map(function (track) {
return new RTCRtpReceiver({
pc: self,
track: track
});
});
return this.getTransceivers()
.filter((transceiver) => !transceiver.stopped)
.map((transceiver) => transceiver.receiver);
};
RTCPeerConnection.prototype.getSenders = function () {
var self = this,
tracks = [],
id;
for (id in this.localTracks) {
if (this.localTracks.hasOwnProperty(id)) {
tracks.push(this.localTracks[id]);
}
}
return tracks.map(function (track) {
return new RTCRtpSender({
pc: self,
track: track
});
});
return this.getTransceivers()
.filter((transceiver) => !transceiver.stopped)
.map((transceiver) => transceiver.sender);
};
RTCPeerConnection.prototype.getTransceivers = function () {
var transceivers = [];
this.getReceivers().map(function (receiver) {
transceivers.push(
new RTCRtpTransceiver({
receiver: receiver
})
);
});
this.getSenders().map(function (sender) {
transceivers.push(
new RTCRtpTransceiver({
sender: sender
})
);
});
return transceivers;
return this.transceivers;
};
RTCPeerConnection.prototype.addTrack = function (track, stream) {
var id;
RTCPeerConnection.prototype.addTrack = function (track, ...streams) {
var stream = streams[0];

@@ -525,7 +510,17 @@ if (isClosed.call(this)) {

for (id in this.localStreams) {
if (this.localStreams.hasOwnProperty(id)) {
var transceiver = new RTCRtpTransceiver(this, {
sender: new RTCRtpSender(this, {
track: track
}),
receiver: new RTCRtpReceiver(this),
direction: 'sendrecv',
currentDirection: null,
mid: null
});
for (var streamId in this.localStreams) {
if (this.localStreams.hasOwnProperty(streamId)) {
// Target provided stream argument or first added stream to group track
if (!stream || (stream && stream.id === id)) {
stream = this.localStreams[id];
if (!stream || (stream && stream.id === streamId)) {
stream = this.localStreams[streamId];
stream.addTrack(track);

@@ -535,3 +530,6 @@ exec(null, null, 'iosrtcPlugin', 'RTCPeerConnection_addTrack', [

track.id,
id
transceiver._id,
transceiver.receiver._id,
transceiver.sender._id,
streamId
]);

@@ -545,10 +543,17 @@ break;

if (!stream) {
exec(null, null, 'iosrtcPlugin', 'RTCPeerConnection_addTrack', [this.pcId, track.id, null]);
exec(null, null, 'iosrtcPlugin', 'RTCPeerConnection_addTrack', [
this.pcId,
track.id,
transceiver._id,
transceiver.receiver._id,
transceiver.sender._id,
null
]);
}
this.localTracks[track.id] = track;
this.getOrCreateTrack(track);
return new RTCRtpSender({
track: track
});
this.transceivers.push(transceiver);
return transceiver.sender;
};

@@ -579,6 +584,5 @@

this.pcId,
track.id,
stream.id
sender._id
]);
delete this.localTracks[track.id];
delete this.tracks[track.id];
break;

@@ -591,11 +595,10 @@ }

if (!stream) {
for (id in this.localTracks) {
if (this.localTracks.hasOwnProperty(id)) {
for (id in this.tracks) {
if (this.tracks.hasOwnProperty(id)) {
if (track.id === id) {
exec(null, null, 'iosrtcPlugin', 'RTCPeerConnection_removeTrack', [
this.pcId,
track.id,
null
sender._id
]);
delete this.localTracks[track.id];
delete this.tracks[track.id];
}

@@ -607,2 +610,123 @@ }

RTCPeerConnection.prototype.getOrCreateTrack = function (trackInput) {
var { id } = trackInput,
existingTrack = this.tracks[id];
if (existingTrack) {
return existingTrack;
}
var track;
if (trackInput instanceof MediaStreamTrack) {
track = trackInput;
} else {
track = new MediaStreamTrack(trackInput);
}
this.tracks[id] = track;
track.addEventListener('ended', () => {
delete this.tracks[id];
});
return track;
};
RTCPeerConnection.prototype.addTransceiver = function (trackOrKind, init) {
if (isClosed.call(this)) {
throw new Errors.InvalidStateError('peerconnection is closed');
}
var kind,
track = null,
self = this,
trackIdOrKind;
if (trackOrKind instanceof MediaStreamTrack) {
kind = trackOrKind.kind;
track = trackOrKind;
trackIdOrKind = trackOrKind.id;
} else {
if (!(trackOrKind === 'audio' || trackOrKind === 'video')) {
throw new TypeError(
'An invalid string was specified as trackOrKind. The string must be either "audio" or "video".'
);
}
kind = trackOrKind;
trackIdOrKind = trackOrKind;
}
var receiverTrackID = newMediaStreamTrackId();
var receiver = new RTCRtpReceiver(this, {
track: new MediaStreamTrack({
id: receiverTrackID,
kind,
enabled: true,
readyState: 'live',
trackId: 'unknown'
})
});
var sender = new RTCRtpSender(this, {
track
});
var data = init || {};
data.sender = sender;
data.receiver = receiver;
var transceiver = new RTCRtpTransceiver(this, data);
this.transceivers.push(transceiver);
var initJson = {};
if (init && init.direction) {
initJson.direction = init.direction;
} else {
initJson.direction = 'sendrecv';
}
if (init && init.sendEncodings) {
initJson.sendEncodings = init.sendEncodings;
}
if (init && init.streams) {
initJson.streams = init.streams.map((stream) => stream.id);
} else {
initJson.streams = [];
}
debug(
'addTransceiver() [trackIdOrKind:%s, init:%o, initJson: %o]',
trackIdOrKind,
init,
initJson
);
addTransceiverToPeerConnection(this, trackIdOrKind, initJson, transceiver)
.then((update) => {
self.updateTransceiversState(update.transceivers);
})
.catch((error) => {
debugerror('addTransceiver() | failure: %s', error);
});
return transceiver;
};
RTCPeerConnection.prototype.updateTransceiversState = function (transceivers) {
debug('updateTransceiversState()');
this.transceivers = transceivers.map((transceiver) => {
const existingTransceiver = this.transceivers.find(
(localTransceiver) => localTransceiver._id === transceiver.id
);
if (existingTransceiver) {
existingTransceiver.update(transceiver);
return existingTransceiver;
}
return new RTCRtpTransceiver(this, transceiver);
});
};
RTCPeerConnection.prototype.getStreamById = function (id) {

@@ -637,6 +761,3 @@ debug('getStreamById()');

stream.getTracks().forEach(function (track) {
self.localTracks[track.id] = track;
track.addEventListener('ended', function () {
delete self.localTracks[track.id];
});
self.getOrCreateTrack(track);
});

@@ -668,3 +789,3 @@

stream.getTracks().forEach(function (track) {
delete self.localTracks[track.id];
delete self.tracks[track.id];
});

@@ -720,7 +841,3 @@

var res = [];
array.forEach(function (stat) {
res.push(new RTCStatsReport(stat));
});
resolve(new RTCStatsResponse(res));
resolve(new RTCStatsReport(array));
}

@@ -804,2 +921,3 @@

dataChannel,
transceiver,
id;

@@ -811,2 +929,6 @@

if (data.transceivers) {
this.updateTransceiversState(data.transceivers);
}
switch (type) {

@@ -854,4 +976,6 @@ case 'signalingstatechange':

var track = (event.track = new MediaStreamTrack(data.track));
event.receiver = new RTCRtpReceiver({ track: track });
event.transceiver = new RTCRtpTransceiver({ receiver: event.receiver });
event.receiver = new RTCRtpReceiver(self, { track: track });
transceiver = this.transceivers.find((t) => t.receiver.track.id === track.id);
event.transceiver = transceiver;
event.streams = [];

@@ -866,6 +990,3 @@

// Store remote track
this.remoteTracks[track.id] = track;
track.addEventListener('ended', function () {
delete self.remoteTracks[track.id];
});
this.getOrCreateTrack(track);

@@ -872,0 +993,0 @@ break;

@@ -6,7 +6,29 @@ /**

function RTCRtpReceiver(data) {
var randomNumber = require('random-number').generator({ min: 10000, max: 99999, integer: true });
function RTCRtpReceiver(pc, data) {
data = data || {};
this._id = data.id || randomNumber();
this._pc = data.pc;
this.track = data.track;
this._pc = pc;
this.track = data.track ? pc.getOrCreateTrack(data.track) : null;
this.params = data.params || {};
}
RTCRtpReceiver.prototype.getParameters = function () {
return this.params;
};
RTCRtpReceiver.prototype.getStats = function () {
return this._pc.getStats();
};
RTCRtpReceiver.prototype.update = function ({ track, params }) {
if (track) {
this.track = this._pc.getOrCreateTrack(track);
} else {
this.track = null;
}
this.params = params;
};

@@ -6,7 +6,15 @@ /**

function RTCRtpSender(data) {
/**
* Dependencies.
*/
var exec = require('cordova/exec'),
{ MediaStreamTrack } = require('./MediaStreamTrack'),
randomNumber = require('random-number').generator({ min: 10000, max: 99999, integer: true });
function RTCRtpSender(pc, data) {
data = data || {};
this._id = data.id || randomNumber();
this._pc = data.pc;
this.track = data.track;
this._pc = pc;
this.track = data.track ? pc.getOrCreateTrack(data.track) : null;
this.params = data.params || {};

@@ -19,5 +27,25 @@ }

RTCRtpSender.prototype.getStats = function () {
return this._pc.getStats();
};
RTCRtpSender.prototype.setParameters = function (params) {
Object.assign(this.params, params);
return Promise.resolve(this.params);
return new Promise((resolve, reject) => {
function onResultOK(result) {
resolve(result);
}
function onResultError(error) {
reject(error);
}
exec(
onResultOK,
onResultError,
'iosrtcPlugin',
'RTCPeerConnection_RTCRtpSender_setParameters',
[this._pc.pcId, this._id, params]
);
});
};

@@ -29,7 +57,22 @@

return new Promise(function (resolve, reject) {
pc.removeTrack(self);
pc.addTrack(withTrack);
self.track = withTrack;
return new Promise((resolve, reject) => {
function onResultOK(result) {
self.track = result.track ? new MediaStreamTrack(result.track) : null;
resolve();
}
function onResultError(error) {
reject(error);
}
var trackId = withTrack ? withTrack.id : null;
exec(
onResultOK,
onResultError,
'iosrtcPlugin',
'RTCPeerConnection_RTCRtpSender_replaceTrack',
[this._pc.pcId, this._id, trackId]
);
// https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/negotiationneeded_event

@@ -50,1 +93,11 @@ var event = new Event('negotiationneeded');

};
RTCRtpSender.prototype.update = function ({ track, params }) {
if (track) {
this.track = this._pc.getOrCreateTrack(track);
} else {
this.track = null;
}
this.params = params;
};

@@ -0,17 +1,155 @@

const RTCRtpSender = require('./RTCRtpSender');
const RTCRtpReceiver = require('./RTCRtpReceiver');
/**
* Expose the RTCRtpTransceiver class.
*/
module.exports = RTCRtpTransceiver;
module.exports = { RTCRtpTransceiver, addTransceiverToPeerConnection };
function RTCRtpTransceiver(data) {
/**
* Dependencies.
*/
var debugerror = require('debug')('iosrtc:ERROR:RTCRtpTransceiver'),
exec = require('cordova/exec'),
randomNumber = require('random-number').generator({ min: 10000, max: 99999, integer: true }),
EventTarget = require('./EventTarget');
debugerror.log = console.warn.bind(console);
function addTransceiverToPeerConnection(peerConnection, trackIdOrKind, init, transceiver) {
return new Promise((resolve, reject) => {
exec(onResultOK, reject, 'iosrtcPlugin', 'RTCPeerConnection_addTransceiver', [
peerConnection.pcId,
trackIdOrKind,
init,
transceiver._id,
transceiver.sender ? transceiver.sender._id : 0,
transceiver.receiver ? transceiver.receiver._id : 0,
transceiver.receiver && transceiver.receiver.track
? transceiver.receiver.track.id
: null
]);
function onResultOK(data) {
resolve(data);
}
});
}
function RTCRtpTransceiver(peerConnection, data) {
data = data || {};
this.receiver = data.receiver;
this.sender = data.sender;
this.peerConnection = peerConnection;
this._id = data.id || randomNumber();
this._receiver =
data.receiver instanceof RTCRtpReceiver
? data.receiver
: new RTCRtpReceiver(peerConnection, data.receiver);
this._sender =
data.sender instanceof RTCRtpSender
? data.sender
: new RTCRtpSender(peerConnection, data.sender);
this._stopped = false;
if (data.mid) {
this._mid = data.mid;
} else {
this._mid = null;
}
if (data.direction) {
this._direction = data.direction;
this._currentDirection = data.direction;
} else {
this._direction = 'sendrecv';
this._currentDirection = 'sendrecv';
}
}
// TODO
// https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpTransceiver/currentDirection
// https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpTransceiverDirection
// https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpTransceiver/mid
// https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpTransceiver/stop
RTCRtpTransceiver.prototype = Object.create(EventTarget.prototype);
RTCRtpTransceiver.prototype.constructor = RTCRtpTransceiver;
Object.defineProperties(RTCRtpTransceiver.prototype, {
currentDirection: {
get: function () {
return this._currentDirection;
}
},
direction: {
get: function () {
return this._direction;
},
set: function (direction) {
var self = this;
this._direction = direction;
exec(
onResultOK,
null,
'iosrtcPlugin',
'RTCPeerConnection_RTCRtpTransceiver_setDirection',
[this.peerConnection.pcId, this._id, direction]
);
function onResultOK(data) {
self.peerConnection.updateTransceiversState(data.transceivers);
}
}
},
mid: {
get: function () {
return this._mid;
}
},
receiver: {
get: function () {
return this._receiver;
}
},
sender: {
get: function () {
return this._sender;
}
},
stopped: {
get: function () {
return this._stopped;
}
},
receiverId: {
get: function () {
return this._receiver.track.id;
}
}
});
RTCRtpTransceiver.prototype.stop = function () {
var self = this;
exec(onResultOK, null, 'iosrtcPlugin', 'RTCPeerConnection_RTCRtpTransceiver_stop', [
this.peerConnection.pcId,
this._id
]);
function onResultOK(data) {
self.peerConnection.updateTransceiversState(data.transceivers);
}
};
RTCRtpTransceiver.prototype.update = function (data) {
if (data.direction) {
this._direction = data.direction;
}
if (data.currentDirection) {
this._currentDirection = data.currentDirection;
}
if (data.mid) {
this._mid = data.mid;
}
this._stopped = data.stopped;
this.receiver.update(data.receiver);
this.sender.update(data.sender);
};

@@ -1,20 +0,31 @@

/**
* Expose the RTCStatsReport class.
*/
module.exports = RTCStatsReport;
class RTCStatsReport {
constructor(data) {
const arr = data || [];
this.data = {};
arr.forEach((el) => {
this.data[el.reportId] = el;
});
this.size = arr.length;
}
function RTCStatsReport(data) {
data = data || {};
entries() {
return this.keys().map((k) => [k, this.data[k]]);
}
this.id = data.reportId;
this.timestamp = data.timestamp;
this.type = data.type;
keys() {
return Object.getOwnPropertyNames(this.data);
}
this.names = function () {
return Object.keys(data.values);
};
values() {
return this.keys().map((k) => this.data[k]);
}
this.stat = function (key) {
return data.values[key] || '';
};
get(key) {
return this.data[key];
}
}
/**
* Expose the RTCStatsReport class.
*/
module.exports = RTCStatsReport;
{
"name": "cordova-plugin-iosrtc",
"version": "6.0.21",
"version": "8.0.0",
"description": "Cordova iOS plugin exposing the full WebRTC W3C JavaScript APIs",

@@ -39,3 +39,3 @@ "author": "Iñaki Baz Castillo (https://inakibaz.me)",

"random-number": "^0.0.7",
"xcode": "^2.0.0",
"xcode": "^3.0.1",
"yaeti": "^1.0.2"

@@ -42,0 +42,0 @@ },

@@ -6,3 +6,3 @@ ![cordova-rtc-logo](https://raw.githubusercontent.com/cordova-rtc/cordova-plugin-iosrtc/master/art/cordova-rtc-logo.png)

[![npm version](https://img.shields.io/npm/v/cordova-plugin-iosrtc.svg?style=flat)](https://www.npmjs.com/package/cordova-plugin-iosrtc)
[![Build Status](https://travis-ci.org/cordova-rtc/cordova-plugin-iosrtc.svg?branch=master)](https://travis-ci.org/cordova-rtc/cordova-plugin-iosrtc)
[![Build Status](https://travis-ci.com/cordova-rtc/cordova-plugin-iosrtc.svg?branch=master)](https://travis-ci.com/cordova-rtc/cordova-plugin-iosrtc)

@@ -41,3 +41,3 @@ [![NPM](https://nodei.co/npm/cordova-plugin-iosrtc.png)](https://npmjs.org/package/cordova-plugin-iosrtc)

* WebRTC W3C v1.0.0
* WebRTC.framework => M69
* WebRTC.framework => M87
* Janus => 0.7.4

@@ -48,4 +48,4 @@ * JSSip => 3.1.2

* openvidu => 2.11.0
* Ionic => v8
* Jitsi ~ 3229
* Ionic => v8
* Jitsi ~ 3229
* Apizee => 2.6.11

@@ -66,3 +66,3 @@ * Twillio => 2.4.0

* Last [Tested WebRTC.framework](./lib/WebRTC.framework/) version: M69 on cordova-plugin-iosrtc version 6.0.0
* Last [Tested WebRTC.framework](./lib/WebRTC.framework/) version: M87 on cordova-plugin-iosrtc version 8.0.0+
* [Building](docs/Building.md): Guidelines for building a Cordova iOS application including the *cordova-plugin-iosrtc* plugin.

@@ -96,3 +96,3 @@ * [Building `libwebrtc`](docs/BuildingLibWebRTC.md): Guidelines for building Google's *libwebrtc* with modifications needed by the *cordova-plugin-iosrtc* plugin (just in case you want to use a different version of *libwebrtc* or apply your own changes to it).

//
//
var localStream, localVideoEl;

@@ -120,3 +120,3 @@ function TestGetUserMedia() {

frameRate:{ min: 15.0, max: 30.0 } // Note: Back camera may only support max 30 fps
},
},
audio: {

@@ -139,3 +139,3 @@ deviceId: {

return localStream;
}).catch(function (err) {

@@ -148,3 +148,3 @@ console.log('getUserMedia.error', err, err.stack);

// Sample RTCPeerConnection
//
//

@@ -176,5 +176,5 @@ var pc1, pc2;

pc2 = new RTCPeerConnection(peerConnectionConfig);
if (useTrackEvent) {
// Add local stream tracks to RTCPeerConnection

@@ -186,4 +186,4 @@ var localPeerStream = new MediaStream();

});
// Note: Deprecated but supported
// Note: Deprecated but supported
} else {

@@ -207,3 +207,3 @@ pc1.addStream(localStream);

});
pc2.addEventListener('icecandidate', function (e) {

@@ -235,6 +235,6 @@ onAddIceCandidate(pc1, e.candidate);

setPeerVideoStream(newPeerStream);
newPeerStream.addTrack(e.track);
newPeerStream.addTrack(e.track);
});
// Note: Deprecated but supported
// Note: Deprecated but supported
} else {

@@ -250,3 +250,3 @@ pc2.addEventListener('addstream', function(e) {

if (pc1.iceConnectionState === 'completed') {
if (pc1.iceConnectionState === 'completed') {
console.log('pc1.getSenders', pc1.getSenders());

@@ -302,3 +302,3 @@ console.log('pc2.getReceivers', pc2.getReceivers());

function TestRTCPeerConnectionLocal() {
// Note: This allow this sample to run on any Browser

@@ -318,3 +318,3 @@ var cordova = window.cordova;

TestGetUserMedia().then(function (localStream) {
TestRTCPeerConnection(localStream);
TestRTCPeerConnection(localStream);
});

@@ -326,3 +326,3 @@ }

} else {
window.addEventListener("DOMContentLoaded", TestRTCPeerConnectionLocal);
window.addEventListener("DOMContentLoaded", TestRTCPeerConnectionLocal);
}

@@ -413,7 +413,10 @@

**If you like this project you can support me.**
<a href="https://www.buymeacoffee.com/hthetiot" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/default-white.png" alt="Buy Me A Coffee" style="height: 51px !important;width: 217px !important;" ></a>
**If you like this project you can support me.**
<a href="https://www.buymeacoffee.com/hthetiot" target="_blank">
<img src="https://cdn.buymeacoffee.com/buttons/default-white.png" alt="Buy Me A Coffee" style="height: 51px !important;width: 217px !important;" >
</a>
## License
[MIT](./LICENSE) :)

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

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

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 too big to display

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc