Socket
Socket
Sign inDemoInstall

detection

Package Overview
Dependencies
1
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.8 to 0.0.9

5

lib/index.d.ts

@@ -81,2 +81,3 @@ /**

private speaker?;
private screen?;
testMicrophone(handle: Function): Promise<{

@@ -94,2 +95,6 @@ yes: () => void;

};
testShareScreen(handle: Function): Promise<{
yes: () => void;
no: () => void;
}>;
}

@@ -96,0 +101,0 @@ export declare function getTester(): Tester;

@@ -292,2 +292,37 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

}
testShareScreen(handle) {
return __awaiter(this, void 0, void 0, function* () {
try {
let video = document.createElement('video');
video.autoplay = true;
video.loop = true;
video.controls = true;
let mediaDevices = navigator.mediaDevices;
let stream = yield mediaDevices.getDisplayMedia({ video: true });
video.srcObject = stream;
handle(video);
const stop = () => {
stream.getTracks()[0].stop();
};
return {
yes: () => {
this.screen = true;
stop();
}, no: () => {
this.screen = false;
stop();
}
};
}
catch (e) {
this.screen = false;
return {
yes: () => {
},
no: () => {
},
};
}
});
}
}

@@ -294,0 +329,0 @@ export function getTester() {

2

package.json
{
"name": "detection",
"version": "0.0.8",
"version": "0.0.9",
"description": "",

@@ -5,0 +5,0 @@ "main": "./lib/index",

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