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

the-universal-common

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

the-universal-common - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

playback/PlaybackStatus.js

22

mock/MockPlayerModule.js
'use strict';
var commands = require('../command/Commands');
var Commands = require('../command/Commands');
var PlaybackStatus = require('../playback/PlaybackStatus');
function statusForCommand(command) {
switch (command) {
case Commands.PLAYBACK.PAUSE:
return PlaybackStatus.PAUSED;
case Commands.PLAYBACK.STOP:
return PlaybackStatus.STOPPED;
default:
return PlaybackStatus.PLAYING;
}
}
module.exports = function MockPlayerModule(playerEventDispatcher) {

@@ -10,8 +22,8 @@

supportedCommands: [
commands.PLAYBACK.PLAY,
commands.PLAYBACK.PAUSE,
commands.PLAYBACK.STOP
Commands.PLAYBACK.PLAY,
Commands.PLAYBACK.PAUSE,
Commands.PLAYBACK.STOP
],
onPlaybackCommand: function (command) {
playerEventDispatcher.onPlaybackEvent(command);
playerEventDispatcher.onPlaybackEvent(statusForCommand(command));
},

@@ -18,0 +30,0 @@ onVolumeChange: function (command) {

{
"name": "the-universal-common",
"version": "0.1.2",
"version": "0.1.3",
"description": "Static code and utilities for The Universal modules",

@@ -5,0 +5,0 @@ "repository": {

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