Skip to content

Commit

Permalink
Merge pull request #33 from GiritInteractive/CLOUDINARY-43
Browse files Browse the repository at this point in the history
CLOUDINARY-43,CLOUDINARY-44: Fixed Product Video Thumbnail
  • Loading branch information
Pini authored Dec 19, 2018
2 parents 1976a3a + 5bac960 commit 0f6c0a5
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 0f6c0a5

Please sign in to comment.