lbry-desktop/lbrytv/src/routes.js
jessop 33672a789b app plays embed in iframe
make player full screen and prepared for overlay actions

small changes

cleanup
2020-01-28 10:20:54 -05:00

19 lines
541 B
JavaScript

const { getHtml } = require('./html');
const { generateDownloadUrl } = require('../../ui/util/lbrytv');
const { LBRY_TV_API } = require('../../config');
const Router = require('@koa/router');
const router = new Router();
router.get(`/$/download/:claimName/:claimId`, async ctx => {
const { claimName, claimId } = ctx.params;
const downloadUrl = generateDownloadUrl(claimName, claimId);
ctx.redirect(downloadUrl);
});
router.get('*', async ctx => {
const html = await getHtml(ctx);
ctx.body = html;
});
module.exports = router;