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

ocast-sdk

Package Overview
Dependencies
Maintainers
2
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ocast-sdk - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

dist/ocast.d.ts

4

dist/src/channel/media.channel.d.ts

@@ -11,3 +11,3 @@ import { Metadata } from "../protocol/metadata";

/**
* MediaChannel Class dedicated to OrangeCast Protocol
* MediaChannel Class dedicated to OCast Protocol
*/

@@ -92,3 +92,3 @@ export declare class MediaChannel extends Channel {

*/
doVolume(level: number, options: any): EnumError;
doVolume(volume: number, options: any): EnumError;
/**

@@ -95,0 +95,0 @@ * Send a mute command

export { EnumError } from "./type/enum.error";
export { EnumMediaStatus } from "./type/enum.media.status";
export { EnumMedia } from "./type/enum.media";
export { EnumTransferMode } from "./type/enum.transfermode";
export { Channel } from "./channel/channel";

@@ -8,2 +9,3 @@ export { MediaChannel } from "./channel/media.channel";

export { Media } from "./media/media";
export { IMediaNotifier } from "./channel/media.notifier";
export { VideoMedia } from "./media/video.media";

@@ -14,2 +16,2 @@ export { ImageMedia } from "./media/image.media";

export { Logger } from "./util/logger";
export { OrangeCast } from "./orangecast";
export { OCast } from "./ocast";

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

/** In the namespace org.ocast.media, the command is not implemented by the application */
IMPLEMENTATION_ERROR = 2501,
IMPLEMENTATION_ERROR = 2400,
}

@@ -9,3 +9,2 @@ export declare class Logger {

private static instance;
private static debugLevel;
debug: any;

@@ -12,0 +11,0 @@ info: any;

{
"name": "ocast-sdk",
"version": "1.0.1",
"main": "dist/orangecast.js",
"module": "dist/orangecast.mjs",
"jsnext:main": "dist/orangecast.mjs",
"scripts": {
"dev": "rollup -c -w",
"prepublish": "tslint 'src/**/*.ts'",
"prepare": "rollup -c rollup.config.js --environment BUILD:production && rollup -c rollup.config.es5.js --environment BUILD:production",
"build": "rollup -c rollup.config.js --environment BUILD:production && rollup -c rollup.config.es5.js --environment BUILD:production",
"test": "nyc mocha --require ts-node/register",
"doc": "typedoc --out public --exclude ./test --exclude ./node_modules ./src"
},
"repository": "ocast-sdk",
"reporters": [
{
"name": "jasmine-spec-reporter#SpecReporter",
"options": {
"displayStacktrace": "all"
}
}
],
"files": [
"examples",
"src",
"dist"
],
"dependencies": {
"rxjs": "^5.4.2"
},
"devDependencies": {
"@types/chai": "^4.0.2",
"@types/mocha": "^2.2.41",
"@types/node": "^8.0.17",
"@types/websocket": "0.0.34",
"@types/ws": "^3.0.2",
"babel-plugin-external-helpers": "^6.22.0",
"babel-preset-es2015": "^6.24.1",
"ocast-dongletv": "latest",
"istanbul": "^0.4.5",
"jsdoc": "^3.5.3",
"mocha": "~3.4.2",
"nyc": "~11.0.3",
"rollup": "^0.45.1",
"rollup-plugin-babel": "^2.7.1",
"rollup-plugin-commonjs": "^8.0.2",
"rollup-plugin-istanbul": "^1.1.0",
"rollup-plugin-node-resolve": "^3.0.0",
"rollup-plugin-typescript2": "^0.4.6",
"rollup-plugin-uglify": "^2.0.1",
"rollup-watch": "^4.0.0",
"source-map-support": "^0.4.15",
"ts-node": "^3.3.0",
"tslint": "^4.5.1",
"typedoc": "^0.8.0",
"typescript": "^2.4.2"
},
"nyc": {
"include": [
"src/**/*.ts",
"src/**/*.tsx"
"name": "ocast-sdk",
"version": "1.0.2",
"engines": {
"node": ">=8.6.0"
},
"main": "dist/ocast.js",
"module": "dist/ocast.mjs",
"jsnext:main": "dist/ocast.mjs",
"scripts": {
"dev": "rollup -c -w",
"prepare": "tslint 'src/**/*.ts' && rollup -c rollup.config.js --environment BUILD:production && rollup -c rollup.config.es5.js --environment BUILD:production",
"build": "rollup -c rollup.config.js --environment BUILD:production && rollup -c rollup.config.es5.js --environment BUILD:production",
"test": "nyc mocha --require ts-node/register",
"doc": "typedoc --out public --exclude ./test --exclude ./node_modules ./src"
},
"repository": "ocast-sdk",
"reporters": [
{
"name": "jasmine-spec-reporter#SpecReporter",
"options": {
"displayStacktrace": "all"
}
}
],
"extension": [
".ts",
".tsx"
"files": [
"src",
"dist"
],
"reporter": [
"text-summary",
"html"
],
"sourceMap": true,
"instrument": true
}
"devDependencies": {
"@types/chai": "^4.0.2",
"@types/mocha": "^2.2.41",
"@types/node": "^8.0.17",
"@types/websocket": "0.0.34",
"@types/ws": "^3.0.2",
"babel-plugin-external-helpers": "^6.22.0",
"babel-preset-es2015": "^6.24.1",
"commitizen": "^2.9.6",
"cz-conventional-changelog": "^2.1.0",
"istanbul": "^0.4.5",
"jsdoc": "^3.5.3",
"mocha": "~3.4.2",
"nyc": "~11.0.3",
"ocast-dongletv": "latest",
"resolve": "^1.5.0",
"rollup": "^0.45.1",
"rollup-plugin-babel": "^2.7.1",
"rollup-plugin-commonjs": "^8.0.2",
"rollup-plugin-istanbul": "^1.1.0",
"rollup-plugin-node-resolve": "^3.0.0",
"rollup-plugin-typescript2": "^0.4.6",
"rollup-plugin-uglify": "^2.0.1",
"rollup-watch": "^4.0.0",
"semantic-release": "^15.0.3",
"source-map-support": "^0.4.15",
"ts-node": "^3.3.0",
"tslint": "^4.5.1",
"typedoc": "^0.8.0",
"typescript": "^2.4.2"
},
"nyc": {
"include": [
"src/**/*.ts",
"src/**/*.tsx"
],
"extension": [
".ts",
".tsx"
],
"reporter": [
"text-summary",
"html"
],
"sourceMap": true,
"instrument": true
}
}
# OCast
[![npm version](https://badge.fury.io/js/ocast-sdk.svg)](http://badge.fury.io/js/ocast-sdk)
[![node](https://img.shields.io/node/v/ocast-sdk-iconify.svg)](https://www.npmjs.com/package/ocast-sdk-iconify)
[![Build Status](https://travis-ci.org/Orange-OpenSource/OCast-JS.svg?branch=master)](https://travis-ci.org/Orange-OpenSource/OCast-JS)

@@ -4,0 +5,0 @@ [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)

@@ -17,3 +17,3 @@ /*

import {OrangeCast} from "../orangecast";
import {OCast} from "../ocast";
import {Transport} from "../protocol/transport";

@@ -20,0 +20,0 @@ import {TransportMessage} from "../protocol/transport.message";

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

import {VideoMedia} from "../media/video.media";
import {OrangeCast} from "../orangecast";
import {Metadata} from "../protocol/metadata";
import {PlaybackStatus} from "../protocol/playback.status";
import {Track} from "../protocol/track";
import {Transport} from "../protocol/transport";

@@ -31,2 +29,3 @@ import {EnumError} from "../type/enum.error";

import {EnumTransferMode} from "../type/enum.transfermode";
import {EnumTransport} from "../type/enum.transport";
import {FunctionHelper} from "../util/function.helper";

@@ -41,3 +40,3 @@ import {Logger} from "../util/logger";

/**
* MediaChannel Class dedicated to OrangeCast Protocol
* MediaChannel Class dedicated to OCast Protocol
*/

@@ -76,2 +75,3 @@ export class MediaChannel extends Channel {

}
public addImageMediaManager(types: EnumMedia[], mediaElement: any) {

@@ -115,3 +115,3 @@ let media = new ImageMedia(mediaElement, this);

try {
Log.debug(TAG + "call " + method + "(" + JSON.stringify(methodParams) + ")");
Log.debug(TAG + "call " + method + "(" + JSON.stringify(methodParams) + ")");
const returnCode = this[method].apply(this, methodParams);

@@ -121,24 +121,31 @@ if (typeof(returnCode) !== "undefined") {

name: transport.message.data.name,
params: { code: returnCode},
params: {code: returnCode},
});
}
} catch (e) {
Log.error(TAG + "Error while executing " + method + " with error " , e);
Log.error(TAG + "Error while executing " + method + " with error ", e);
if (transport.type === EnumTransport.COMMAND) {
this.sendReply(transport.id, transport.src, {
name: transport.message.data.name,
params: {code: EnumError.UNKNOWN_ERROR},
});
}
}
} else {
Log.error(TAG + "Error while executing " + method + " paramters missing)");
if (transport.type === EnumTransport.COMMAND) {
this.sendReply(transport.id, transport.src, {
name: transport.message.data.name,
params: { code: EnumError.UNKNOWN_ERROR},
params: {code: EnumError.PARAMS_MISSING},
});
}
} else {
}
} else {
Log.error(TAG + "Function '" + method + "' not found");
if (transport.type === EnumTransport.COMMAND) {
this.sendReply(transport.id, transport.src, {
name: transport.message.data.name,
params: { code: EnumError.PARAMS_MISSING},
params: {code: EnumError.NO_IMPLEMENTATION},
});
}
} else {
Log.error("Function \"" + method + "\" not found");
this.sendReply(transport.id, transport.src, {
name: transport.message.data.name,
params: {code: EnumError.NO_IMPLEMENTATION},
});
}

@@ -164,3 +171,3 @@ }

"," + transferMode + "," + autoplay + "," + frequency + "," + options);
if (! this.medias.hasOwnProperty(mediaType)) {
if (!this.medias.hasOwnProperty(mediaType)) {
return EnumError.NO_IMPLEMENTATION;

@@ -202,3 +209,3 @@ }

let status = (this.media != null) ? this.media.getStatus() : null;
if ( (status !== EnumMediaStatus.PAUSED)) {
if ((status !== EnumMediaStatus.PAUSED)) {
return EnumError.PLAYER_INVALID_STATE;

@@ -220,3 +227,2 @@ }

}
let returnCode: EnumError = this.media.pause();

@@ -262,3 +268,5 @@ return (returnCode !== EnumError.OK) ? returnCode : this.callNotifier("onPause", arguments);

*/
public doSeek(position: number, options: any ): EnumError {
public doSeek(position: number, options: any): EnumError {
Log.debug(TAG + "onSeek");

@@ -279,3 +287,3 @@ if (!this.media) {

*/
public doVolume(level: number, options: any): EnumError {
public doVolume(volume: number, options: any): EnumError {
Log.debug(TAG + "onVolume");

@@ -286,3 +294,3 @@ if (!this.media) {

let returnCode: EnumError = this.media.setVolume(level);
let returnCode: EnumError = this.media.setVolume(volume);
return (returnCode !== EnumError.OK) ? returnCode : this.callNotifier("onVolume", arguments);

@@ -304,3 +312,3 @@ }

return (returnCode !== EnumError.OK) ? returnCode : this.callNotifier("onMute", arguments);
}
}

@@ -357,5 +365,7 @@ /**

// To be called ....
this.sendEvent({name: MediaChannel.EVENTS.METADATA_CHANGED,
options: null,
params: this.media.getMedatadata()});
this.sendEvent({
name: MediaChannel.EVENTS.METADATA_CHANGED,
options: null,
params: this.media.getMedatadata(),
});
}

@@ -378,3 +388,4 @@

} catch (e) {
Log.error(TAG + "Implementation error on Notifier Method " + method + " : " , e);
Log.error(TAG + "Implementation error on Notifier Method " + method + " : ", e);
Log.error(TAG + "Implementation error on Notifier Method " + method + " : ", e);
return EnumError.IMPLEMENTATION_ERROR;

@@ -381,0 +392,0 @@ }

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

import {PlaybackStatus} from "../protocol/playback.status";
import {Track} from "../protocol/track";
import {EnumError} from "../type/enum.error";

@@ -22,0 +21,0 @@ import {EnumMedia} from "../type/enum.media";

@@ -17,3 +17,3 @@ /*

import {OrangeCast} from "../orangecast";
import {OCast} from "../ocast";
import {EnumProtocol} from "../type/enum.protocol";

@@ -20,0 +20,0 @@ import {Logger} from "../util/logger";

@@ -5,4 +5,4 @@ /* tslint:disable */

debug: any,
WebSocket: any
WebSocket: any
}
}

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

export {EnumMedia} from "./type/enum.media";
export {EnumTransferMode} from "./type/enum.transfermode";
export {Channel} from "./channel/channel";

@@ -25,2 +26,3 @@ export {MediaChannel} from "./channel/media.channel";

export {Media} from "./media/media";
export {IMediaNotifier} from "./channel/media.notifier";
export {VideoMedia} from "./media/video.media";

@@ -31,2 +33,2 @@ export {ImageMedia} from "./media/image.media";

export {Logger} from "./util/logger";
export {OrangeCast} from "./orangecast";
export {OCast} from "./ocast";

@@ -44,3 +44,3 @@ /*

/** In the namespace org.ocast.media, the command is not implemented by the application */
IMPLEMENTATION_ERROR = 2501,
IMPLEMENTATION_ERROR = 2400,
}

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

private static instance: Logger;
private static debugLevel: number = Logger.INFO;

@@ -37,0 +36,0 @@ public debug = null;

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