Skip to content

Commit

Permalink
[domains] envrmnt.com: create template for plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
nleush committed Jul 8, 2016
1 parent 4490fdf commit 4a71baa
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
14 changes: 14 additions & 0 deletions plugins/domains/envrmnt.com/envrmnt.com.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<script async src="http://www.envrmnt.com/shared/ext-embed-v1.js"></script>
<div style="width: 100%; height: 0px; position: relative; padding-bottom: 56.2493%;">
<div>
<iframe
id="envrmnt_<%= id %>"
data-envrmnt-id="<%= id %>"
data-vrplayer
src="http://www.envrmnt.com/embed/v1/#/video/<%= id %>"
frameborder="0"
allowfullscreen
style="width: 100%; height: 100%; position: absolute;">
</iframe>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,6 @@ module.exports = {
},

getLinks: function(urlMatch, envrmnt) {
var scriptURL = "http://www.envrmnt.com/shared/ext-embed-v1.js";
var wrapperCSS = "width: 100%; height: 0px; position: relative; padding-bottom: 56.2493%;";
var iframeSrc = "http://www.envrmnt.com/embed/v1/#/video/"+envrmnt.videoId;
var iframeCss = "width: 100%; height: 100%; position: absolute;";

var html = '<script async src="'+scriptURL+'"></script>'+
'<div style="'+wrapperCSS+'">'+
'<div><iframe id="envrmnt_'+envrmnt.videoId+'" data-envrmnt-id="'+envrmnt.videoId+'" data-vrplayer '+
'src="'+iframeSrc+'" frameborder="0" allowfullscreen '+
'style="'+iframeCss+'"></iframe></div>'+
'</div>';

return [{
type: CONFIG.T.text_html,
Expand All @@ -61,7 +50,9 @@ module.exports = {
CONFIG.R.inline,
CONFIG.R.html5
],
html: html
template_context: {
id: envrmnt.videoId
}
}, {
href: envrmnt.thumbnail.href,
type: CONFIG.T.image_jpeg,
Expand Down

0 comments on commit 4a71baa

Please sign in to comment.