diff --git a/dashboard-ui/scripts/Extensions.js b/dashboard-ui/scripts/Extensions.js index aa5904e085..b49564f5ee 100644 --- a/dashboard-ui/scripts/Extensions.js +++ b/dashboard-ui/scripts/Extensions.js @@ -473,9 +473,9 @@ _V_.ResolutionMenuItem = _V_.MenuItem.extend({ return; var resolutions = new Array(); - resolutions['high'] = 500000; - resolutions['medium'] = 250000; - resolutions['low'] = 50000; + resolutions['high'] = 1800000; + resolutions['medium'] = 500000; + resolutions['low'] = 150000; var current_time = this.player.currentTime(); @@ -491,9 +491,9 @@ _V_.ResolutionMenuItem = _V_.MenuItem.extend({ var startTimeTicks = newSrc.match(new RegExp("StartTimeTicks=[0-9]+","g")); var start_time = startTimeTicks[0].replace("StartTimeTicks=",""); - newSrc = newSrc.replace(new RegExp("StartTimeTicks=[0-9]+","g"),"StartTimeTicks="+(parseInt(start_time)+(10000000*current_time))); + newSrc = newSrc.replace(new RegExp("StartTimeTicks=[0-9]+","g"),"StartTimeTicks="+Math.floor((start_time)+(10000000*current_time))); }else { - newSrc += "&StartTimeTicks="+10000000*current_time; + newSrc += "&StartTimeTicks="+Math.floor(10000000*current_time); } this.player.src( newSrc ).one( 'loadedmetadata', function() { diff --git a/dashboard-ui/scripts/ItemDetailPage.js b/dashboard-ui/scripts/ItemDetailPage.js index f3ae5b01f4..03ad3182c5 100644 --- a/dashboard-ui/scripts/ItemDetailPage.js +++ b/dashboard-ui/scripts/ItemDetailPage.js @@ -42,11 +42,7 @@ ItemDetailPage.renderOverviewBlock(item); ItemDetailPage.renderMediaInfo(item); - if (item.BackdropImageTags || item.ImageTags.Logo || item.ImageTags.Thumb || item.ImageTags.Menu || item.ImageTags.Disc || item.ImageTags.Art || item.ImageTags.Box) { - ItemDetailPage.renderGallery(item); - }else { - $('#galleryCollapsible', page).remove(); - } + ItemDetailPage.renderGallery(item); if (!item.Chapters || !item.Chapters.length) { $('#scenesCollapsible', page).remove(); @@ -336,141 +332,71 @@ var page = $.mobile.activePage; var imageTags = item.ImageTags || {}; var html = ''; - var downloadWidth = 400; - var lightboxWidth = 800; if (imageTags.Logo) { - html += ''; - html += ''; - html += '
'; - html += 'Close'; - html += ''; - html += '
'; + html += ItemDetailPage.createGalleryImage(item, "Logo", item.ImageTags.Logo); } if (imageTags.Thumb) { - html += ''; - html += ''; - html += '
'; - html += 'Close'; - html += ''; - html += '
'; + html += ItemDetailPage.createGalleryImage(item, "Thumb", item.ImageTags.Thumb); } if (imageTags.Art) { - html += ''; - html += ''; - html += '
'; - html += 'Close'; - html += ''; - html += '
'; + html += ItemDetailPage.createGalleryImage(item, "Art", item.ImageTags.Art); } if (imageTags.Menu) { - html += ''; - html += ''; - html += '
'; - html += 'Close'; - html += ''; - html += '
'; + html += ItemDetailPage.createGalleryImage(item, "Menu", item.ImageTags.Menu); } if (imageTags.Disc) { - html += ''; - html += ''; - html += '
'; - html += 'Close'; - html += ''; - html += '
'; + html += ItemDetailPage.createGalleryImage(item, "Disc", item.ImageTags.Disc); } if (imageTags.Box) { - html += ''; - html += ''; - html += '
'; - html += 'Close'; - html += ''; - html += '
'; + html += ItemDetailPage.createGalleryImage(item, "Box", item.ImageTags.Box); } if (item.BackdropImageTags) { for (var i = 0, length = item.BackdropImageTags.length; i < length; i++) { - html += ''; - html += ''; - html += '
'; - html += 'Close'; - html += ''; - html += '
'; - + html += ItemDetailPage.createGalleryImage(item.Id, "Backdrop", item.BackdropImageTags[0], i); } } - $('#galleryContent', page).html(html); + $('#galleryContent', page).html(html).trigger('create'); + }, - $(".galleryPopup").popup(); + createGalleryImage: function(item_id, type, tag, index) { + + var downloadWidth = 400; + var lightboxWidth = 800; + var html = ''; + + if (typeof(index)=="undefined") index = 0; + + html += ''; + html += ''; + html += '
'; + html += 'Close'; + html += ''; + html += '
'; + + return html; }, renderMediaInfo: function(item) { diff --git a/dashboard-ui/scripts/MediaPlayer.js b/dashboard-ui/scripts/MediaPlayer.js index 136d6204c1..46ae97f4f0 100644 --- a/dashboard-ui/scripts/MediaPlayer.js +++ b/dashboard-ui/scripts/MediaPlayer.js @@ -120,7 +120,7 @@ var baseParams = { audioChannels: 2, audioBitrate: 128000, - videoBitrate: 500000, + videoBitrate: 1800000, maxWidth: screenWidth, maxHeight: screenHeight, StartTimeTicks: 0