UNPKG

pooliot-client

Version:
44 lines (29 loc) 1.12 kB
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.update = undefined; var _nightingale = require('nightingale'); var _nightingale2 = _interopRequireDefault(_nightingale); var _exec = require('./exec'); var _flowRuntime = require('flow-runtime'); var _flowRuntime2 = _interopRequireDefault(_flowRuntime); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } const logger = new _nightingale2.default('app:commands:sound'); const hdmi = () => { _flowRuntime2.default.return(_flowRuntime2.default.void()); logger.info('sound to hdmi'); (0, _exec.runSync)('./sound.sh', ['hdmi']); }; const jack = () => { _flowRuntime2.default.return(_flowRuntime2.default.void()); logger.info('sound to jack'); (0, _exec.runSync)('./sound.sh', ['jack']); }; const update = exports.update = config => { let _configType = _flowRuntime2.default.object(); _flowRuntime2.default.param('config', _configType).assert(config); if (config.sound === 'hdmi') hdmi(); if (config.sound === 'jack') jack(); }; //# sourceMappingURL=sound.js.map