diff --git a/server/server.js b/server/server.js index 3d5c455..34474b8 100644 --- a/server/server.js +++ b/server/server.js @@ -20,18 +20,27 @@ server.get(/\/client\/?.*/, restify.serveStatic({ // Mockup Methods -server.get('/seek/:time', function (req, res, next) { - log.info("Seeking "+req.params['time']+" now."); - return FS.write( fifoPath, '{ "command": ["seek", "10"] }\n' ) - .then(function () { - log.info("wrote seek 10 to "+fifoPath); - res.send({'success':true}); - return next(false); - }, function(reason) { - log.info("failed because "+reason); - }); - log.info("after then"); -}); +// /seek/:time — seeks relative +// /seek/:time/:mode — seeks with mode, modes [relative|absolute|absolute-percent|relative-percent|exact|keyframes] +// /seek-chapter/:where — seeks to prev (where=-x) or next (where=+x) chapter +// /volume/:amount — increases (amount=+x) or decreases (amount=-x) volume +// /progress — show osd progress +// /playpause — toggles playing +// /muteunmute — toggles muting + +// server.get('/seek/:time', function (req, res, next) { +// log.info("Seeking "+req.params['time']+" now."); +// return FS.write( fifoPath, '{ "command": ["seek", "10"] }\n' ) +// .then(function () { +// log.info("wrote seek 10 to "+fifoPath); +// res.send({'success':true}); +// return next(false); +// }, function(reason) { +// log.info("failed because "+reason); +// }); +// log.info("after then"); +// }); + server.get('/seek/:time/:mode', function (req, res, next) { log.info("Seeking "+req.params['time']+" with mode "+req.params['mode']+" now."); res.send({'success':true});