2019-11-07 20:39:22 +01:00
|
|
|
const { getHtml } = require('./html');
|
|
|
|
const { generateStreamUrl } = require('../../ui/util/lbrytv');
|
2019-11-11 19:19:31 +01:00
|
|
|
const { LBRY_TV_API } = require('../../config');
|
2019-11-07 20:39:22 +01:00
|
|
|
const Router = require('@koa/router');
|
|
|
|
const send = require('koa-send');
|
2019-11-11 19:19:31 +01:00
|
|
|
|
2019-11-07 20:39:22 +01:00
|
|
|
const router = new Router();
|
|
|
|
|
2019-11-11 19:19:31 +01:00
|
|
|
// TODO
|
|
|
|
// router.get(`/embed/:claimName/:claimId`, async ctx => {
|
|
|
|
// Proxy request through lbrytv
|
|
|
|
// });
|
2019-11-07 20:39:22 +01:00
|
|
|
|
|
|
|
router.get('*', async ctx => {
|
|
|
|
const html = await getHtml(ctx);
|
|
|
|
ctx.body = html;
|
|
|
|
});
|
|
|
|
|
|
|
|
module.exports = router;
|