Skip to content

Commit

Permalink
Make display poster using video element
Browse files Browse the repository at this point in the history
  • Loading branch information
SangwonOh committed May 2, 2022
1 parent b9ebccb commit 60dba7c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
13 changes: 13 additions & 0 deletions src/js/view/components/helpers/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,22 @@ const Helpers = function($container, api){
messageBox = MessageBox($current, api, message, description, withTimer, iconClass, clickCallback, dontClose);
}
function createThumbnail(){

const mediaElement = api.getMediaElement();

if (mediaElement) {
mediaElement.poster = ''
}

if (api.getConfig().image) {
mediaElement.poster = api.getConfig().image;
}


if(thumbnail){
thumbnail.destroy();
}

thumbnail = Thumbnail($current, api, api.getConfig());
}
function createWaterMark() {
Expand Down
1 change: 0 additions & 1 deletion src/js/view/components/helpers/thumbnailTemplate.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
export default (uiText, data) => {
return (`<div class="op-thumbnail-container"><div class="op-thumbnail-wrapper">`+
`${data.image ? `<img src="${data.image}">`:``}` +
`${data.title ? `<div class="op-thumbnail-header">${data.title}</div>`:``}` +
`</div></div>`);
};

0 comments on commit 60dba7c

Please sign in to comment.