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

cordova-plugin-playlist

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cordova-plugin-playlist - npm Package Compare versions

Comparing version 0.7.1 to 0.8.0

src/android/java/notification/PlaylistNotificationProvider.java

8

Notes.txt

@@ -18,1 +18,9 @@ Using cordova to extract the resources instead of using R:

Consuming apps might need:
android {
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
I mean, this build gradle might need it too..

3

package.json
{
"name": "cordova-plugin-playlist",
"description": "A Cordova plugin for Android and iOS with native support for audio playlists, background support, and lock screen controls",
"version": "0.7.1",
"version": "0.8.0",
"homepage": "https://github.com/Rolamix/cordova-plugin-playlist#readme",

@@ -76,2 +76,3 @@ "author": "Patrick <patrick@rolamix.com>",

"babel-plugin-add-header-comment": "^1.0.3",
"babel-plugin-transform-es2015-template-literals": "^6.22.0",
"eslint": "^4.19.1",

@@ -78,0 +79,0 @@ "eslint-config-airbnb-base": "^12.1.0",

@@ -54,2 +54,7 @@ import {

/**
* If retainPosition is true, this value will tell the plugin the uid of the "current" item to start from,
* rather than letting the plugin decide based on current playback.
*/
playFromId?: number;
/**
* If playback should immediately begin when calling setPlaylistItems on the plugin.

@@ -56,0 +61,0 @@ * Default is false;

@@ -37,2 +37,3 @@ /* global cordova:false */

RmxAudioStatusMessage.RMXSTATUS_LOADING, RmxAudioStatusMessage.RMXSTATUS_LOADED,
RmxAudioStatusMessage.RMXSTATUS_PAUSE,
RmxAudioStatusMessage.RMXSTATUS_COMPLETED,

@@ -54,3 +55,3 @@ RmxAudioStatusMessage.RMXSTATUS_ERROR,

private _initPromise: Promise<boolean>;
private _readyResolve: any;;
private _readyResolve: any;
private _readyReject: any;

@@ -256,4 +257,4 @@

*/
playTrackByIndex = (successCallback: SuccessCallback, errorCallback: ErrorCallback, index: number) => {
exec(successCallback, errorCallback, 'RmxAudioPlayer', 'playTrackByIndex', [index]);
playTrackByIndex = (successCallback: SuccessCallback, errorCallback: ErrorCallback, index: number, position?: number) => {
exec(successCallback, errorCallback, 'RmxAudioPlayer', 'playTrackByIndex', [index, position || 0]);
}

@@ -264,4 +265,4 @@

*/
playTrackById = (successCallback: SuccessCallback, errorCallback: ErrorCallback, trackId: string) => {
exec(successCallback, errorCallback, 'RmxAudioPlayer', 'playTrackById', [trackId]);
playTrackById = (successCallback: SuccessCallback, errorCallback: ErrorCallback, trackId: string, position?: number) => {
exec(successCallback, errorCallback, 'RmxAudioPlayer', 'playTrackById', [trackId, position || 0]);
}

@@ -476,3 +477,3 @@

*/
validateTracks(items: AudioTrack[]) {
validateTracks = (items: AudioTrack[]) => {
if (!items || !Array.isArray(items)) { return []; }

@@ -488,3 +489,3 @@ return items.map(this.validateTrack).filter(x => x); // may produce an empty array!

*/
validateTrack(track: AudioTrack) {
validateTrack = (track: AudioTrack) => {
if (!track) { return null; }

@@ -491,0 +492,0 @@ // For now we will rely on TS to do the heavy lifting, but we can add a validation here

{
"compilerOptions": {
/* Basic Options */
"target": "esnext", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */
"module": "es2015", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
// "lib": [], /* Specify library files to be included in the compilation, e.g. "dom", "es2015": */
"target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */
"module": "es2015", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
"lib": [
"es2015",
"dom"
], /* Specify library files to be included in the compilation, e.g. "dom", "es2015": */
// "allowJs": true, /* Allow javascript files to be compiled. */
// "checkJs": true, /* Report errors in .js files. */
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
"declaration": true, /* Generates corresponding '.d.ts' file. */
"declaration": true, /* Generates corresponding '.d.ts' file. */
// "sourceMap": true, /* Generates corresponding '.map' file. */
// "outFile": "./", /* Concatenate and emit output to single file. */
"outDir": "www", /* Redirect output structure to the directory. */
"outDir": "www", /* Redirect output structure to the directory. */
// "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */

@@ -20,5 +23,4 @@ // "removeComments": true, /* Do not emit comments to output. */

// "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
/* Strict Type-Checking Options */
"strict": true, /* Enable all strict type-checking options. */
"strict": true, /* Enable all strict type-checking options. */
// "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */

@@ -29,11 +31,9 @@ // "strictNullChecks": true, /* Enable strict null checks. */

// "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
/* Additional Checks */
"noUnusedLocals": true, /* Report errors on unused locals. */
"noUnusedParameters": true, /* Report errors on unused parameters. */
"noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
"noUnusedLocals": true, /* Report errors on unused locals. */
"noUnusedParameters": true, /* Report errors on unused parameters. */
"noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
/* Module Resolution Options */
"moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
"moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
// "baseUrl": "./", /* Base directory to resolve non-absolute module names. */

@@ -43,6 +43,7 @@ // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */

// "typeRoots": [], /* List of folders to include type definitions from. */
"types": ["semver"], /* Type declaration files to be included in compilation. */
"allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
"types": [
"semver"
], /* Type declaration files to be included in compilation. */
"allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
/* Source Map Options */

@@ -53,6 +54,5 @@ // "sourceRoot": "./", /* Specify the location where debugger should locate TypeScript files instead of source locations. */

// "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
/* Experimental Options */
"experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
"emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
"experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
"emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
},

@@ -59,0 +59,0 @@ "include": [

@@ -48,2 +48,7 @@ import { RmxAudioErrorType, RmxAudioStatusMessage } from './Constants';

/**
* If retainPosition is true, this value will tell the plugin the uid of the "current" item to start from,
* rather than letting the plugin decide based on current playback.
*/
playFromId?: number;
/**
* If playback should immediately begin when calling setPlaylistItems on the plugin.

@@ -50,0 +55,0 @@ * Default is false;

@@ -117,7 +117,7 @@ import { RmxAudioStatusMessage } from './Constants';

*/
playTrackByIndex: (successCallback: SuccessCallback, errorCallback: ErrorCallback, index: number) => void;
playTrackByIndex: (successCallback: SuccessCallback, errorCallback: ErrorCallback, index: number, position?: number | undefined) => void;
/**
* Play the track matching the given trackId. If the track does not exist, this has no effect.
*/
playTrackById: (successCallback: SuccessCallback, errorCallback: ErrorCallback, trackId: string) => void;
playTrackById: (successCallback: SuccessCallback, errorCallback: ErrorCallback, trackId: string, position?: number | undefined) => void;
/**

@@ -223,3 +223,3 @@ * Pause playback

*/
validateTracks(items: AudioTrack[]): (AudioTrack | null)[];
validateTracks: (items: AudioTrack[]) => (AudioTrack | null)[];
/**

@@ -231,3 +231,3 @@ * Validate a single track and ensure it is valid for playback.

*/
validateTrack(track: AudioTrack): AudioTrack | null;
validateTrack: (track: AudioTrack) => AudioTrack | null;
/**

@@ -234,0 +234,0 @@ * Generate a v4 UUID for use as a unique trackId. Used internally, but you can use this to generate track ID's if you want.

@@ -28,3 +28,3 @@ /**

var log = console;
var itemStatusChangeTypes = [_Constants.RmxAudioStatusMessage.RMXSTATUS_PLAYBACK_POSITION, _Constants.RmxAudioStatusMessage.RMXSTATUS_DURATION, _Constants.RmxAudioStatusMessage.RMXSTATUS_BUFFERING, _Constants.RmxAudioStatusMessage.RMXSTATUS_CANPLAY, _Constants.RmxAudioStatusMessage.RMXSTATUS_LOADING, _Constants.RmxAudioStatusMessage.RMXSTATUS_LOADED, _Constants.RmxAudioStatusMessage.RMXSTATUS_COMPLETED, _Constants.RmxAudioStatusMessage.RMXSTATUS_ERROR];
var itemStatusChangeTypes = [_Constants.RmxAudioStatusMessage.RMXSTATUS_PLAYBACK_POSITION, _Constants.RmxAudioStatusMessage.RMXSTATUS_DURATION, _Constants.RmxAudioStatusMessage.RMXSTATUS_BUFFERING, _Constants.RmxAudioStatusMessage.RMXSTATUS_CANPLAY, _Constants.RmxAudioStatusMessage.RMXSTATUS_LOADING, _Constants.RmxAudioStatusMessage.RMXSTATUS_LOADED, _Constants.RmxAudioStatusMessage.RMXSTATUS_PAUSE, _Constants.RmxAudioStatusMessage.RMXSTATUS_COMPLETED, _Constants.RmxAudioStatusMessage.RMXSTATUS_ERROR];
/**

@@ -237,8 +237,8 @@ * AudioPlayer class implementation. A singleton of this class is exported for use by Cordova,

_defineProperty(this, "playTrackByIndex", function (successCallback, errorCallback, index) {
exec(successCallback, errorCallback, 'RmxAudioPlayer', 'playTrackByIndex', [index]);
_defineProperty(this, "playTrackByIndex", function (successCallback, errorCallback, index, position) {
exec(successCallback, errorCallback, 'RmxAudioPlayer', 'playTrackByIndex', [index, position || 0]);
});
_defineProperty(this, "playTrackById", function (successCallback, errorCallback, trackId) {
exec(successCallback, errorCallback, 'RmxAudioPlayer', 'playTrackById', [trackId]);
_defineProperty(this, "playTrackById", function (successCallback, errorCallback, trackId, position) {
exec(successCallback, errorCallback, 'RmxAudioPlayer', 'playTrackById', [trackId, position || 0]);
});

@@ -298,2 +298,23 @@

_defineProperty(this, "validateTracks", function (items) {
if (!items || !Array.isArray(items)) {
return [];
}
return items.map(_this.validateTrack).filter(function (x) {
return x;
}); // may produce an empty array!
});
_defineProperty(this, "validateTrack", function (track) {
if (!track) {
return null;
} // For now we will rely on TS to do the heavy lifting, but we can add a validation here
// that all the required fields are valid. For now we just take care of the unique ID.
track.trackId = track.trackId || _this.generateUUID();
return track;
});
this.handlers = {};

@@ -334,3 +355,3 @@ this._initPromise = new Promise(function (resolve, reject) {

if (this.options.verbose) {
log.log(`RmxAudioPlayer.onStatus: ${_Constants.RmxAudioStatusMessageDescriptions[type]}(${type}) [${trackId}]: `, value);
log.log("RmxAudioPlayer.onStatus: " + _Constants.RmxAudioStatusMessageDescriptions[type] + "(" + type + ") [" + trackId + "]: ", value);
}

@@ -439,37 +460,7 @@

}, {
key: "validateTracks",
value: function validateTracks(items) {
if (!items || !Array.isArray(items)) {
return [];
}
key: "generateUUID",
return items.map(this.validateTrack).filter(function (x) {
return x;
}); // may produce an empty array!
}
/**
* Validate a single track and ensure it is valid for playback.
* Used internally but you can call this if you need to :)
*
* @param track The AudioTrack to validate
*/
}, {
key: "validateTrack",
value: function validateTrack(track) {
if (!track) {
return null;
} // For now we will rely on TS to do the heavy lifting, but we can add a validation here
// that all the required fields are valid. For now we just take care of the unique ID.
track.trackId = track.trackId || this.generateUUID();
return track;
}
/**
* Generate a v4 UUID for use as a unique trackId. Used internally, but you can use this to generate track ID's if you want.
*/
}, {
key: "generateUUID",
value: function generateUUID() {

@@ -476,0 +467,0 @@ // Doesn't need to be perfect or secure, just good enough to give each item an ID.

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 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