made video source its own element

This commit is contained in:
bill bittner 2017-08-08 12:39:22 -07:00
parent 39530c4b28
commit 7eb9926c02
3 changed files with 6 additions and 6 deletions

View file

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

View file

@ -91,7 +91,8 @@ const hbs = expressHandlebars.create({
<meta name="twitter:player:width" content="600" > <meta name="twitter:player:width" content="600" >
<meta name="twitter:text:player_width" content="600" > <meta name="twitter:text:player_width" content="600" >
<meta name="twitter:player:height" content="315" > <meta name="twitter:player:height" content="315" >
<meta name="twitter:player:stream" content="${directFileUrl}" >
<meta name="twitter:player:stream:content_type" content="video/mp4" >
` `
); );
} else { } else {

View file

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