testing iframe page
This commit is contained in:
parent
67b5887ba5
commit
af0595641a
6 changed files with 31 additions and 8 deletions
2
index.js
2
index.js
|
@ -82,6 +82,8 @@ function Server () {
|
||||||
// configure handlebars & register it with express app
|
// configure handlebars & register it with express app
|
||||||
const viewsPath = Path.resolve(process.cwd(), 'node_modules/spee.ch/server/views');
|
const viewsPath = Path.resolve(process.cwd(), 'node_modules/spee.ch/server/views');
|
||||||
app.engine('handlebars', expressHandlebars({
|
app.engine('handlebars', expressHandlebars({
|
||||||
|
async: false,
|
||||||
|
dataType: 'text',
|
||||||
defaultLayout: 'embed',
|
defaultLayout: 'embed',
|
||||||
partialsDir: Path.join(viewsPath, '/partials'),
|
partialsDir: Path.join(viewsPath, '/partials'),
|
||||||
layoutsDir: Path.join(viewsPath, '/layouts')
|
layoutsDir: Path.join(viewsPath, '/layouts')
|
||||||
|
|
|
@ -3,6 +3,9 @@ const { details: { host } } = require('@config/siteConfig');
|
||||||
const sendVideoEmbedPage = ({ params }, res) => {
|
const sendVideoEmbedPage = ({ params }, res) => {
|
||||||
const claimId = params.claimId;
|
const claimId = params.claimId;
|
||||||
const name = params.name;
|
const name = params.name;
|
||||||
|
console.log('HOST:', host);
|
||||||
|
console.log('CLAIM ID:', claimId);
|
||||||
|
console.log('NAME:', name);
|
||||||
// get and render the content
|
// get and render the content
|
||||||
res.status(200).render('embed', { host, claimId, name });
|
res.status(200).render('embed', { host, claimId, name });
|
||||||
};
|
};
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<body id="embed-video-player">
|
<body>
|
||||||
|
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
video {
|
video {
|
||||||
width:100%;
|
width:100%;
|
||||||
max-width:600px;
|
max-width:600px;
|
||||||
height:auto;
|
height:auto;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
{{{body}}}
|
{{{ body }}}
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
9
test/iframeTest.htm
Normal file
9
test/iframeTest.htm
Normal 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>
|
|
@ -17,5 +17,11 @@
|
||||||
<img src="https://dev1.spee.ch/8/typingcat" alt="yes identifier, no ending"/>
|
<img src="https://dev1.spee.ch/8/typingcat" alt="yes identifier, no ending"/>
|
||||||
<p>yes identifier, yes ending</p>
|
<p>yes identifier, yes ending</p>
|
||||||
<img src="https://dev1.spee.ch/8/typingcat.gif" alt="yes identifier, yes ending"/>
|
<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>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Add table
Reference in a new issue