diff --git a/apps/camera/js/filmstrip.js b/apps/camera/js/filmstrip.js index d4288010fd8e..86ec289a3de6 100644 --- a/apps/camera/js/filmstrip.js +++ b/apps/camera/js/filmstrip.js @@ -116,7 +116,9 @@ var Filmstrip = (function() { frame.displayImage(item.blob, item.width, item.height, item.preview); } else if (item.isVideo) { - frame.displayVideo(item.blob, item.width, item.height, item.rotation); + frame.displayVideo(item.blob, item.poster, + item.width, item.height, + item.rotation); } preview.classList.remove('offscreen'); @@ -328,18 +330,17 @@ var Filmstrip = (function() { offscreenImage.src = URL.createObjectURL(previewBlob); offscreenImage.onload = function() { - createThumbnailFromElement(offscreenImage, false, 0, - function(thumbnail) { - addItem({ - isImage: true, - filename: filename, - thumbnail: thumbnail, - blob: blob, - width: metadata.width, - height: metadata.height, - preview: metadata.preview - }); - }); + createThumbnailFromImage(offscreenImage, function(thumbnail) { + addItem({ + isImage: true, + filename: filename, + thumbnail: thumbnail, + blob: blob, + width: metadata.width, + height: metadata.height, + preview: metadata.preview + }); + }); URL.revokeObjectURL(offscreenImage.src); offscreenImage.onload = null; offscreenImage.src = null; @@ -378,18 +379,19 @@ var Filmstrip = (function() { } offscreenVideo.onloadedmetadata = function() { - createThumbnailFromElement(offscreenVideo, true, rotation, - function(thumbnail) { - addItem({ - isVideo: true, - filename: filename, - thumbnail: thumbnail, - blob: blob, - width: offscreenVideo.videoWidth, - height: offscreenVideo.videoHeight, - rotation: rotation - }); + createThumbnailFromVideo(offscreenVideo, rotation, filename, + function(thumbnail, poster) { + addItem({ + isVideo: true, + filename: filename, + thumbnail: thumbnail, + poster: poster, + blob: blob, + width: offscreenVideo.videoWidth, + height: offscreenVideo.videoHeight, + rotation: rotation }); + }); URL.revokeObjectURL(url); offscreenVideo.onerror = null; offscreenVideo.onloadedmetadata = null; @@ -444,16 +446,16 @@ var Filmstrip = (function() { // Create a thumbnail size canvas, copy the or