testing iframe page

This commit is contained in:
bill bittner 2018-07-02 22:47:18 -07:00
parent 67b5887ba5
commit af0595641a
6 changed files with 31 additions and 8 deletions

View file

@ -82,6 +82,8 @@ function Server () {
// configure handlebars & register it with express app
const viewsPath = Path.resolve(process.cwd(), 'node_modules/spee.ch/server/views');
app.engine('handlebars', expressHandlebars({
async: false,
dataType: 'text',
defaultLayout: 'embed',
partialsDir: Path.join(viewsPath, '/partials'),
layoutsDir: Path.join(viewsPath, '/layouts')

View file

@ -3,6 +3,9 @@ const { details: { host } } = require('@config/siteConfig');
const sendVideoEmbedPage = ({ params }, res) => {
const claimId = params.claimId;
const name = params.name;
console.log('HOST:', host);
console.log('CLAIM ID:', claimId);
console.log('NAME:', name);
// get and render the content
res.status(200).render('embed', { host, claimId, name });
};

View file

@ -1 +1,4 @@
<video width="100%" controls src="{{host}}/asset/{{name}}/{{claimId}}" type="video/mp4"></video>
<video controls>
<source src="{{host}}/asset/{{name}}/{{claimId}}" type="video/mp4">
Your browser does not support video
</video>

View file

@ -1,16 +1,16 @@
<!DOCTYPE html>
<html>
<body id="embed-video-player">
<body>
<style type="text/css">
video {
width:100%;
max-width:600px;
height:auto;
}
video {
width:100%;
max-width:600px;
height:auto;
}
</style>
{{{body}}}
{{{ body }}}
</body>
</html>

9
test/iframeTest.htm Normal file
View file

@ -0,0 +1,9 @@
<!doctype html>
<html lang="en">
<body>
<p>i frame:</p>
<p>yes identifier, yes ending</p>
<img src="https://dev1.spee.ch/8/typingcat.gif" alt="yes identifier, yes ending"/>
</body>
</html>

View file

@ -17,5 +17,11 @@
<img src="https://dev1.spee.ch/8/typingcat" alt="yes identifier, no ending"/>
<p>yes identifier, yes ending</p>
<img src="https://dev1.spee.ch/8/typingcat.gif" alt="yes identifier, yes ending"/>
<p>i frame:</p>
<iframe src="/iframeTest.htm"></iframe>
<p>i frame:</p>
<iframe src="https://dev1.spee.ch/video-embed/sn123ow-1/c3cadc36688ca37c7526536cfed4448e31bacf56">
iframe not supported
</iframe>
</body>
</html>