made video source its own element
This commit is contained in:
parent
39530c4b28
commit
7eb9926c02
3 changed files with 6 additions and 6 deletions
|
@ -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) => {
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
|
@ -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>
|
Loading…
Reference in a new issue