changed embed link

This commit is contained in:
bill bittner 2017-08-08 13:00:47 -07:00
parent b03884902d
commit 2a5582e231
3 changed files with 5 additions and 6 deletions

View file

@ -62,7 +62,7 @@ function checkLocalDbForClaims (name, shortUrl) {
function createOpenGraphInfo ({ fileType, claimId, name, fileName, fileExt }) {
return {
embedUrl : `https://spee.ch/embed/${claimId}/${name}`,
embedUrl : `https://spee.ch/embed/${fileName}`,
showUrl : `https://spee.ch/${claimId}/${name}`,
source : `https://spee.ch/${claimId}/${name}${fileExt}`,
directFileUrl: `https://spee.ch/media/${fileName}`,

View file

@ -36,11 +36,10 @@ module.exports = (app) => {
});
});
// route to display all free public claims at a given name
app.get('/embed/:claimId/:name', ({ params }, res) => {
const claimId = params.claimId;
const name = params.name;
app.get('/embed/:fileName', ({ params }, res) => {
const fileName = params.fileName;
// get and render the content
res.status(200).render('embed', { layout: 'embed', claimId, name });
res.status(200).render('embed', { layout: 'embed', fileName });
});
// route to display all free public claims at a given name
app.get('/:name/all', ({ ip, originalUrl, params }, res) => {

View file

@ -1 +1 @@
<video id="video" width="100%" controls><source src="https://spee.ch/{{claimId}}/{{name}}.mp4" type="video/mp4"></video>
<video id="video" width="100%" controls><source src="https://spee.ch/media/{{fileName}}" type="video/mp4"></video>