client/posts: use flash thumbnail as a preroll
This commit is contained in:
parent
3079b86b80
commit
9c70202322
3 changed files with 4 additions and 5 deletions
|
@ -44,6 +44,8 @@
|
|||
|
||||
.post-content
|
||||
margin: 0
|
||||
background-size: cover
|
||||
background-repeat: no-repeat
|
||||
|
||||
.darktheme .post-view
|
||||
>.sidebar
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<div class='post-content post-type-<%- ctx.post.type %>'>
|
||||
<div class='post-content post-type-<%- ctx.post.type %>'<% if (ctx.post.type === 'flash') { %> style='background-image: url(<%- ctx.post.thumbnailUrl %>)'<% } %>>
|
||||
<% if (['image', 'animation'].includes(ctx.post.type)) { %>
|
||||
|
||||
<img class='resize-listener' alt='' src='<%- ctx.post.contentUrl %>'/>
|
||||
|
@ -6,7 +6,7 @@
|
|||
<% } else if (ctx.post.type === 'flash') { %>
|
||||
|
||||
<object class='resize-listener' width='<%- ctx.post.canvasWidth %>' height='<%- ctx.post.canvasHeight %>' data='<%- ctx.post.contentUrl %>'>
|
||||
<param name='wmode' value='opaque'/>
|
||||
<param name='wmode' value='transparent'/>
|
||||
<param name='movie' value='<%- ctx.post.contentUrl %>'/>
|
||||
</object>
|
||||
|
||||
|
|
|
@ -48,7 +48,6 @@ window.RufflePlayer = window.RufflePlayer || {};
|
|||
window.RufflePlayer.config = {
|
||||
"polyfills": true,
|
||||
"autoplay": "off",
|
||||
"backgroundColor": rgb2hex(window.getComputedStyle(document.body).backgroundColor),
|
||||
"warnOnUnsupportedContent": false,
|
||||
"splashScreen": false,
|
||||
};
|
||||
|
@ -112,8 +111,6 @@ Promise.resolve()
|
|||
}
|
||||
|
||||
window.RufflePlayer.config.autoplay = settings.get().autoplayVideos ? "auto" : "off"
|
||||
const topNav = document.getElementById("top-navigation")
|
||||
if (topNav) window.RufflePlayer.config.backgroundColor = rgb2hex(window.getComputedStyle(topNav).backgroundColor)
|
||||
})
|
||||
.then(() => api.loginFromCookies())
|
||||
.then(
|
||||
|
|
Loading…
Reference in a new issue