From 53959d761fd89be3de3f41ba0b2ead15bba07cc8 Mon Sep 17 00:00:00 2001 From: David Flanagan Date: Wed, 13 Feb 2013 16:43:24 -0800 Subject: [PATCH] resolve merge conflict --- apps/camera/js/filmstrip.js | 193 +++++++++++++++++----------- apps/camera/style/VideoPlayer.css | 2 +- apps/gallery/js/MetadataParser.js | 129 ++++++++----------- apps/gallery/js/frames.js | 43 ++++--- apps/gallery/js/gallery.js | 199 ++++++++++------------------- apps/gallery/manifest.webapp | 1 + apps/gallery/style/VideoPlayer.css | 4 +- apps/video/js/video.js | 89 +++++++++++-- apps/video/manifest.webapp | 1 + shared/js/media/media_frame.js | 53 ++++---- shared/js/media/video_player.js | 170 ++++++++++++++++++++---- 11 files changed, 527 insertions(+), 357 deletions(-) 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