PlayerService.info(function (player) { if(player.status == 'play' || player.status == 'pause') ffplay.stop(); path = Path.normalize(path); sails.log.debug("play "+path); ffplay.start(path, {fs: '-autoexit'}); // TODO use event PlayerService.onStart(path); return res.ok(); });
, stop: function (req, res) { sails.log.debug("stop"); ffplay.stop(); return res.ok(); }