New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@enplug/sdk-player

Package Overview
Dependencies
Maintainers
8
Versions
101
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@enplug/sdk-player - npm Package Compare versions

Comparing version 0.10.13 to 0.10.16

src/desktop-alerts.ts

70

dist/player.js

@@ -94,6 +94,6 @@ var enplug =

\**********************/
/*! exports provided: name, version, description, main, typings, scripts, repository, keywords, author, license, bugs, files, homepage, devDependencies, config, default */
/*! exports provided: name, version, description, main, typings, scripts, repository, keywords, author, license, bugs, files, homepage, devDependencies, config, dependencies, default */
/***/ (function(module) {
module.exports = {"name":"@enplug/sdk-player","version":"0.10.12","description":"Enplug Player SDK","main":"./src/index.ts","typings":"./src/index.d.ts","scripts":{"clean":"rimraf dist/ && mkdirp dist","lint":"tslint -c tslint.json './src/**/*.ts' -e './**/*.d.ts'","test":"karma start test/karma.conf.js","bundle":"npm run clean && webpack","bundle:prod":"npm run clean && webpack --env.production","start":"npm-run-all clean lint test","release":"npm run bundle && enplug-release-sdk","release:prod":"npm run bundle:prod && enplug-release-sdk","release:dev":"npm run bundle && enplug-release-sdk --dev"},"repository":{"type":"git","url":"git+https://github.com/Enplug/sdk.git"},"keywords":["Enplug"],"author":"Enplug","license":"ISC","bugs":{"url":"https://github.com/Enplug/sdk/issues"},"files":["src/","dist/"],"homepage":"https://github.com/Enplug/sdk#readme","devDependencies":{"@enplug/scripts":"^1.9.1","@types/jasmine":"^2.6.0","@types/node":"^8.0.45","command-line-args":"^4.0.7","es6-shim":"^0.35.3","fs":"0.0.1-security","inquirer":"^6.0.0","jasmine":"^3.3.1","jasmine-core":"^2.99.1","karma":"^1.7.1","karma-chrome-launcher":"^2.2.0","karma-jasmine":"^1.1.2","karma-phantomjs-launcher":"~1.0.4","karma-phantomjs-shim":"~1.5.0","karma-spec-reporter":"0.0.31","karma-typescript":"~3.0.7","mkdirp":"^0.5.1","npm-run-all":"^4.1.1","path":"^0.12.7","rimraf":"^2.6.2","s3":"^4.4.0","shelljs":"^0.7.8","ts-loader":"^6.2.1","tslint":"^5.7.0","typescript":"^2.9.2","uglifyjs-webpack-plugin":"^2.2.0","webpack":"^4.41.2","webpack-cli":"^3.3.1"},"config":{"destination":"sdk/v1","destinationDev":"sdk/dev/","aws":{"buckets":["apps.enplug.in","apps.enplug.com"],"s3":{"cache":false,"overwrite":true,"region":"us-west-2","sslEnabled":true,"apiVersion":"2016-05-01","params":{"ACL":"public-read"}}}}};
module.exports = JSON.parse("{\"name\":\"@enplug/sdk-player\",\"version\":\"0.10.16\",\"description\":\"Enplug Player SDK\",\"main\":\"./src/index.ts\",\"typings\":\"./src/index.d.ts\",\"scripts\":{\"clean\":\"rimraf dist/ && mkdirp dist\",\"lint\":\"tslint -c tslint.json './src/**/*.ts' -e './**/*.d.ts'\",\"test\":\"karma start test/karma.conf.js\",\"bundle\":\"npm run clean && webpack\",\"bundle:prod\":\"npm run clean && webpack --env.production\",\"start\":\"npm-run-all clean lint test\",\"release\":\"npm run bundle && enplug-release-sdk\",\"release:prod\":\"npm run bundle:prod && enplug-release-sdk\",\"release:dev\":\"npm run bundle && enplug-release-sdk --dev\"},\"repository\":{\"type\":\"git\",\"url\":\"git+https://github.com/Enplug/sdk.git\"},\"keywords\":[\"Enplug\"],\"author\":\"Enplug\",\"license\":\"ISC\",\"bugs\":{\"url\":\"https://github.com/Enplug/sdk/issues\"},\"files\":[\"src/\",\"dist/\"],\"homepage\":\"https://github.com/Enplug/sdk#readme\",\"devDependencies\":{\"@enplug/scripts\":\"^1.9.1\",\"@types/jasmine\":\"^2.6.0\",\"@types/node\":\"^8.0.45\",\"command-line-args\":\"^4.0.7\",\"es6-shim\":\"^0.35.3\",\"fs\":\"0.0.1-security\",\"inquirer\":\"^6.0.0\",\"jasmine\":\"^3.5.0\",\"jasmine-core\":\"^3.5.0\",\"karma\":\"^5.1.0\",\"karma-chrome-launcher\":\"^3.1.0\",\"karma-coverage-istanbul-reporter\":\"^3.0.3\",\"karma-jasmine\":\"^3.3.1\",\"karma-jasmine-html-reporter\":\"^1.5.4\",\"karma-phantomjs-launcher\":\"~1.0.4\",\"karma-phantomjs-shim\":\"~1.5.0\",\"karma-spec-reporter\":\"0.0.31\",\"karma-typescript\":\"~3.0.7\",\"mkdirp\":\"^0.5.1\",\"npm-run-all\":\"^4.1.1\",\"path\":\"^0.12.7\",\"rimraf\":\"^2.6.2\",\"s3\":\"^4.4.0\",\"shelljs\":\"^0.7.8\",\"ts-loader\":\"^6.2.1\",\"tslint\":\"^5.7.0\",\"typescript\":\"^2.9.2\",\"uglifyjs-webpack-plugin\":\"^2.2.0\",\"webpack\":\"^4.41.2\",\"webpack-cli\":\"^3.3.1\"},\"config\":{\"destination\":\"sdk/v1\",\"destinationDev\":\"sdk/dev/\",\"aws\":{\"buckets\":[\"apps.enplug.in\",\"apps.enplug.com\"],\"s3\":{\"cache\":false,\"overwrite\":true,\"region\":\"us-west-2\",\"sslEnabled\":true,\"apiVersion\":\"2016-05-01\",\"params\":{\"ACL\":\"public-read\"}}}},\"dependencies\":{}}");

@@ -158,3 +158,3 @@ /***/ }),

clearTimeout(_this.serviceWorkerTimer);
resolve();
resolve(null);
return;

@@ -165,3 +165,3 @@ }

clearTimeout(_this.serviceWorkerTimer);
resolve();
resolve(null);
}

@@ -253,5 +253,9 @@ else if (state === 'redundant') {

body.addEventListener('click', function () {
console.log("[Player SDK] Screen was touched.");
console.log("[Player SDK] Screen was touched (click or touch).");
_this.bridge.send("status" /* AppStatus */, "screen-touched" /* ScreenTouched */);
}, true);
body.addEventListener('keyup', function () {
console.log("[Player SDK] Screen was touched (keyup).");
_this.bridge.send("status" /* AppStatus */, "screen-touched" /* ScreenTouched */);
}, true);
}

@@ -424,5 +428,19 @@ };

*/
Bridge.prototype.getQueryParam = function (key) {
var params = (new URL(window.location.href)).searchParams;
return params ? params.get(key) : '';
Bridge.prototype.getQueryParam = function (key, queryUrl) {
var url = queryUrl || new URL(window.location.href);
var params = url.searchParams;
var legacyParams = new Map();
// Older browsers don't support searchParams
if (!params && typeof url.search === 'string') {
var searchParams = url.search.replace('?', '').split('&');
for (var _i = 0, searchParams_1 = searchParams; _i < searchParams_1.length; _i++) {
var param = searchParams_1[_i];
var paramParts = param.split('=');
legacyParams.set(paramParts[0], paramParts[1]);
}
}
if (params) {
return params.get(key) || '';
}
return legacyParams.get(key) || '';
};

@@ -716,2 +734,34 @@ /**

/***/ "./src/desktop-alerts.ts":
/*!*******************************!*\
!*** ./src/desktop-alerts.ts ***!
\*******************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__, exports], __WEBPACK_AMD_DEFINE_RESULT__ = (function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var DesktopAlerts = /** @class */ (function () {
function DesktopAlerts(bridge) {
this.bridge = bridge;
}
DesktopAlerts.prototype.getNext = function () {
return this.bridge.send("desktop-alerts" /* DesktopAlerts */, "get-next" /* GetNext */);
};
DesktopAlerts.prototype.hide = function () {
return this.bridge.send("desktop-alerts" /* DesktopAlerts */, "hide" /* Hide */);
};
DesktopAlerts.prototype.ready = function () {
return this.bridge.send("desktop-alerts" /* DesktopAlerts */, "ready" /* Ready */);
};
return DesktopAlerts;
}());
exports.default = DesktopAlerts;
}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
/***/ }),
/***/ "./src/environment/environment.ts":

@@ -743,3 +793,3 @@ /*!****************************************!*\

var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__, exports, __webpack_require__(/*! ../package.json */ "./package.json"), __webpack_require__(/*! ./app-status */ "./src/app-status.ts"), __webpack_require__(/*! ./assets */ "./src/assets.ts"), __webpack_require__(/*! ./cache */ "./src/cache.ts"), __webpack_require__(/*! ./bridge/cef-bridge */ "./src/bridge/cef-bridge.ts"), __webpack_require__(/*! ./bridge/java-bridge */ "./src/bridge/java-bridge.ts"), __webpack_require__(/*! ./notifications */ "./src/notifications.ts"), __webpack_require__(/*! ./player-events */ "./src/player-events.ts"), __webpack_require__(/*! ./play-recorder */ "./src/play-recorder.ts"), __webpack_require__(/*! ./settings */ "./src/settings.ts"), __webpack_require__(/*! ./social */ "./src/social.ts"), __webpack_require__(/*! ./bridge/web-bridge */ "./src/bridge/web-bridge.ts")], __WEBPACK_AMD_DEFINE_RESULT__ = (function (require, exports, pkg, app_status_1, assets_1, cache_1, cef_bridge_1, java_bridge_1, notifications_1, player_events_1, play_recorder_1, settings_1, social_1, web_bridge_1) {
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__, exports, __webpack_require__(/*! ../package.json */ "./package.json"), __webpack_require__(/*! ./app-status */ "./src/app-status.ts"), __webpack_require__(/*! ./assets */ "./src/assets.ts"), __webpack_require__(/*! ./cache */ "./src/cache.ts"), __webpack_require__(/*! ./bridge/cef-bridge */ "./src/bridge/cef-bridge.ts"), __webpack_require__(/*! ./desktop-alerts */ "./src/desktop-alerts.ts"), __webpack_require__(/*! ./bridge/java-bridge */ "./src/bridge/java-bridge.ts"), __webpack_require__(/*! ./notifications */ "./src/notifications.ts"), __webpack_require__(/*! ./player-events */ "./src/player-events.ts"), __webpack_require__(/*! ./play-recorder */ "./src/play-recorder.ts"), __webpack_require__(/*! ./settings */ "./src/settings.ts"), __webpack_require__(/*! ./social */ "./src/social.ts"), __webpack_require__(/*! ./bridge/web-bridge */ "./src/bridge/web-bridge.ts")], __WEBPACK_AMD_DEFINE_RESULT__ = (function (require, exports, pkg, app_status_1, assets_1, cache_1, cef_bridge_1, desktop_alerts_1, java_bridge_1, notifications_1, player_events_1, play_recorder_1, settings_1, social_1, web_bridge_1) {
"use strict";

@@ -769,2 +819,3 @@ Object.defineProperty(exports, "__esModule", { value: true });

var cache = new cache_1.default(bridge);
var desktopAlerts = new desktop_alerts_1.default(bridge);
var events = new player_events_1.default(bridge);

@@ -782,2 +833,3 @@ var notifications = new notifications_1.default(bridge);

cache: cache,
desktopAlerts: desktopAlerts,
notifications: notifications,

@@ -784,0 +836,0 @@ off: events.off.bind(events),

17

package.json
{
"name": "@enplug/sdk-player",
"version": "0.10.13",
"version": "0.10.16",
"description": "Enplug Player SDK",

@@ -43,7 +43,9 @@ "main": "./src/index.ts",

"inquirer": "^6.0.0",
"jasmine": "^3.3.1",
"jasmine-core": "^2.99.1",
"karma": "^1.7.1",
"karma-chrome-launcher": "^2.2.0",
"karma-jasmine": "^1.1.2",
"jasmine": "^3.5.0",
"jasmine-core": "^3.5.0",
"karma": "^5.1.0",
"karma-chrome-launcher": "^3.1.0",
"karma-coverage-istanbul-reporter": "^3.0.3",
"karma-jasmine": "^3.3.1",
"karma-jasmine-html-reporter": "^1.5.4",
"karma-phantomjs-launcher": "~1.0.4",

@@ -85,3 +87,4 @@ "karma-phantomjs-shim": "~1.5.0",

}
}
},
"dependencies": {}
}

@@ -60,3 +60,3 @@ /**

clearTimeout(this.serviceWorkerTimer);
resolve();
resolve(null);
return;

@@ -66,3 +66,3 @@ } else if (state === 'activated') {

clearTimeout(this.serviceWorkerTimer);
resolve();
resolve(null);
} else if (state === 'redundant') {

@@ -156,7 +156,11 @@ console.log(`${SW_TAG} Service either failed to install or has been replaced by newer version.`);

body.addEventListener('click', () => {
console.log(`[Player SDK] Screen was touched.`);
console.log(`[Player SDK] Screen was touched (click or touch).`);
this.bridge.send(Service.AppStatus, Action.ScreenTouched);
}, true);
body.addEventListener('keyup', () => {
console.log(`[Player SDK] Screen was touched (keyup).`);
this.bridge.send(Service.AppStatus, Action.ScreenTouched);
}, true);
}
}
}

@@ -139,5 +139,20 @@ /**

*/
protected getQueryParam(key: string) {
const params = (new URL(window.location.href)).searchParams;
return params ? params.get(key) : '';
public getQueryParam(key: string, queryUrl?: URL) {
const url = queryUrl || new URL(window.location.href);
const params = url.searchParams;
const legacyParams: Map<string, string> = new Map();
// Older browsers don't support searchParams
if (!params && typeof url.search === 'string') {
const searchParams = url.search.replace('?', '').split('&');
for (const param of searchParams) {
const paramParts = param.split('=');
legacyParams.set(paramParts[0], paramParts[1]);
}
}
if (params) {
return params.get(key) || '';
}
return legacyParams.get(key) || '';
}

@@ -144,0 +159,0 @@

@@ -8,8 +8,9 @@ /**

Cache = 'cache',
DesktopAlerts = 'desktop-alerts',
Event = 'event',
Notifications = 'notification',
PlayRecorder = 'playrecorder',
Settings = 'settings',
Social = 'social',
Status = 'status',
PlayRecorder = 'playrecorder',
Notifications = 'notification',
Social = 'social',
}

@@ -37,2 +38,4 @@

GetFile = 'get-file',
// Desktop Alerts
Ready = 'ready', // also used: GetNext, Ready
// Settings

@@ -39,0 +42,0 @@ GetAll = 'get-all',

@@ -25,2 +25,7 @@ /**

}
namespace desktopAlerts {
const getNext: () => Promise<any>;
const hide: () => Promise<boolean>;
const ready: () => Promise<boolean>;
}
namespace notifications {

@@ -27,0 +32,0 @@ const post: (message: string) => Promise<string>;

@@ -10,5 +10,6 @@ /**

import Assets from './assets';
import Bridge from './bridge/bridge';
import Cache from './cache';
import Bridge from './bridge/bridge';
import CefBridge from './bridge/cef-bridge';
import DesktopAlerts from './desktop-alerts';
import JavaBridge from './bridge/java-bridge';

@@ -43,2 +44,3 @@ import Notifications from './notifications';

const cache = new Cache(bridge);
const desktopAlerts = new DesktopAlerts(bridge);
const events = new PlayerEvents(bridge);

@@ -58,2 +60,3 @@ const notifications = new Notifications(bridge);

cache,
desktopAlerts,
notifications,

@@ -71,2 +74,2 @@ off: events.off.bind(events),

export default createEnplugPlayerSDK(window);
export {createEnplugPlayerSDK};
export { createEnplugPlayerSDK };

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