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

verto

Package Overview
Dependencies
Maintainers
4
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

verto - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

2

package.json
{
"name": "verto",
"version": "0.0.1",
"version": "0.0.2",
"devDependencies": {

@@ -5,0 +5,0 @@ "grunt": "~0.4.5",

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

this.enabled = true;
this.audioEnabled = true;
this.videoEnabled = true;

@@ -106,3 +107,3 @@

this.constraints = {
offerToReceiveAudio: true,
offerToReceiveAudio: this.options.useSpeak === "none" ? false : true,
offerToReceiveVideo: this.options.useVideo ? true : false,

@@ -115,3 +116,3 @@ };

}],mandatory: {
OfferToReceiveAudio: true,
OfferToReceiveAudio: this.options.useSpeak === "none" ? false : true,
OfferToReceiveVideo: this.options.useVideo ? true : false,

@@ -347,4 +348,4 @@ }

} else {
if (self.localVideoStream.active){
var tracks = self.localVideoStream.getTracks();
if (self.options.localVideoStream.active){
var tracks = self.options.localVideoStream.getTracks();
console.error(tracks);

@@ -367,3 +368,3 @@ tracks.forEach(function(track, index){

var self = this;
return self.enabled;
return self.audioEnabled;
}

@@ -389,8 +390,37 @@

self.enabled = audioTracks[i].enabled;
self.audioEnabled = audioTracks[i].enabled;
}
return !self.enabled;
return !self.audioEnabled;
}
$.FSRTC.prototype.getVideoMute = function() {
var self = this;
return self.videoEnabled;
}
$.FSRTC.prototype.setVideoMute = function(what) {
var self = this;
var videoTracks = self.localStream.getVideoTracks();
for (var i = 0, len = videoTracks.length; i < len; i++ ) {
switch(what) {
case "on":
videoTracks[i].enabled = true;
break;
case "off":
videoTracks[i].enabled = false;
break;
case "toggle":
videoTracks[i].enabled = !videoTracks[i].enabled;
default:
break;
}
self.videoEnabled = videoTracks[i].enabled;
}
return !self.videoEnabled;
}
$.FSRTC.prototype.createAnswer = function(params) {

@@ -492,3 +522,3 @@ var self = this;

audio = {
mandatory: obj.options.audioParams,
mandatory: {},
optional: []

@@ -501,2 +531,11 @@ };

if (obj.options.audioParams) {
for (var key in obj.options.audioParams) {
var con = {};
con[key] = obj.options.audioParams[key];
audio.optional.push(con);
}
}
}

@@ -523,13 +562,6 @@

if (window.moz) {
video = obj.options.videoParams;
if (!video.width) video.width = video.minWidth;
if (!video.height) video.height = video.minHeight;
if (!video.frameRate) video.frameRate = video.minFrameRate;
} else {
video = {
mandatory: obj.options.videoParams,
optional: []
}
}
video = {
mandatory: obj.options.videoParams,
optional: []
}

@@ -547,4 +579,5 @@ var useVideo = obj.options.useVideo;

if (bestFrameRate && !window.moz) {
video.optional.push({minFrameRate: bestFrameRate});
if (bestFrameRate) {
video.optional.push({minFrameRate: bestFrameRate});
video.optional.push({maxFrameRate: bestFrameRate});
}

@@ -1107,9 +1140,2 @@

if (window.moz) {
video = video.mandatory;
if (!video.width) video.width = video.minWidth;
if (!video.height) video.height = video.minHeight;
if (!video.frameRate) video.frameRate = video.minFrameRate;
}
getUserMedia({

@@ -1116,0 +1142,0 @@ constraints: {

@@ -94,2 +94,28 @@ /*

$.JsonRpcClient.prototype.speedTest = function (bytes, cb) {
var socket = this.options.getSocket(this.wsOnMessage);
if (socket !== null) {
this.speedCB = cb;
this.speedBytes = bytes;
socket.send("#SPU " + bytes);
var loops = bytes / 1024;
var rem = bytes % 1024;
var i;
var data = new Array(1024).join(".");
for (i = 0; i < loops; i++) {
socket.send("#SPB " + data);
}
if (rem) {
socket.send("#SPB " + data);
}
socket.send("#SPE");
}
};
/**

@@ -386,2 +412,22 @@ * @fn call

var response;
// Special sub proto
if (event.data[0] == "#" && event.data[1] == "S" && event.data[2] == "P") {
if (event.data[3] == "U") {
this.up_dur = parseInt(event.data.substring(4));
} else if (this.speedCB && event.data[3] == "D") {
this.down_dur = parseInt(event.data.substring(4));
var up_kps = (((this.speedBytes * 8) / (this.up_dur / 1000)) / 1024).toFixed(0);
var down_kps = (((this.speedBytes * 8) / (this.down_dur / 1000)) / 1024).toFixed(0);
console.info("Speed Test: Up: " + up_kps + " Down: " + down_kps);
this.speedCB(event, { upDur: this.up_dur, downDur: this.down_dur, upKPS: up_kps, downKPS: down_kps });
this.speedCB = null;
}
return;
}
try {

@@ -388,0 +434,0 @@ response = $.parseJSON(event.data);

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

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