Skip to content

Commit

Permalink
CLOUDINARY-43,CLOUDINARY-44: Fixed Product Video Thumbnail
Browse files Browse the repository at this point in the history
  • Loading branch information
pini-girit committed Dec 19, 2018
1 parent 1976a3a commit 5bac960
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions view/adminhtml/web/js/get-video-information.js
Original file line number Diff line number Diff line change
Expand Up @@ -594,14 +594,7 @@ define([
context = (tmp.context && tmp.context.custom) ? tmp.context.custom : {};

tmp.derived = tmp.derived || [];
thumbnail = this.options.cloudinaryPlaceholder;
thumbnail_bytes = 0;
tmp.derived.forEach(function(derivedItem) {
if (derivedItem.bytes && derivedItem.bytes > thumbnail_bytes) {
thumbnail_bytes = derivedItem.bytes;
thumbnail = (videoInfo.videoSrc.indexOf('https') === 0) ? derivedItem.secure_url : derivedItem.url;
}
});
thumbnail = videoInfo.videoSrc.replace(/\.[^/.]+$/, "").replace(/\/([^\/]+)$/, '/so_auto/$1.jpg') || this.options.cloudinaryPlaceholder;

respData = {
duration: 'unknown',
Expand Down

0 comments on commit 5bac960

Please sign in to comment.