From c886b12570a0f3163e88cadd92cc227c4fc3e481 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Thu, 16 Jul 2015 08:56:38 -0400 Subject: [PATCH] 3.0.5675.1 --- .../iron-form-element-behavior/.bower.json | 10 +++--- .../iron-form-element-behavior/bower.json | 4 +-- .../demo/simple-form.html | 1 + .../iron-form-element-behavior.html | 6 ++-- dashboard-ui/scripts/htmlmediarenderer.js | 6 ++++ dashboard-ui/scripts/mediaplayer.js | 36 +++++++------------ dashboard-ui/scripts/site.js | 7 +++- 7 files changed, 36 insertions(+), 34 deletions(-) diff --git a/dashboard-ui/bower_components/iron-form-element-behavior/.bower.json b/dashboard-ui/bower_components/iron-form-element-behavior/.bower.json index 1e354dbde9..3f9b472528 100644 --- a/dashboard-ui/bower_components/iron-form-element-behavior/.bower.json +++ b/dashboard-ui/bower_components/iron-form-element-behavior/.bower.json @@ -1,9 +1,9 @@ { "name": "iron-form-element-behavior", - "version": "1.0.2", + "version": "1.0.3", "license": "http://polymer.github.io/LICENSE.txt", "private": true, - "main": "iron-form-element-behavior", + "main": "iron-form-element-behavior.html", "authors": "The Polymer Authors", "description": "Enables a custom element to be included in an iron-form", "keywords": [ @@ -26,11 +26,11 @@ "paper-styles": "PolymerElements/paper-styles#^1.0.0" }, "homepage": "https://github.com/PolymerElements/iron-form-element-behavior", - "_release": "1.0.2", + "_release": "1.0.3", "_resolution": { "type": "version", - "tag": "v1.0.2", - "commit": "3d46178a7cd9e4025004476a8fd0eef7a5416cd3" + "tag": "v1.0.3", + "commit": "a55bc86f6f4fcba1d1c08d6bfaa26ba145ce3112" }, "_source": "git://github.com/PolymerElements/iron-form-element-behavior.git", "_target": "^1.0.0", diff --git a/dashboard-ui/bower_components/iron-form-element-behavior/bower.json b/dashboard-ui/bower_components/iron-form-element-behavior/bower.json index 359b3c0d64..357b57f5bc 100644 --- a/dashboard-ui/bower_components/iron-form-element-behavior/bower.json +++ b/dashboard-ui/bower_components/iron-form-element-behavior/bower.json @@ -1,9 +1,9 @@ { "name": "iron-form-element-behavior", - "version": "1.0.2", + "version": "1.0.3", "license": "http://polymer.github.io/LICENSE.txt", "private": true, - "main": "iron-form-element-behavior", + "main": "iron-form-element-behavior.html", "authors": "The Polymer Authors", "description": "Enables a custom element to be included in an iron-form", "keywords": [ diff --git a/dashboard-ui/bower_components/iron-form-element-behavior/demo/simple-form.html b/dashboard-ui/bower_components/iron-form-element-behavior/demo/simple-form.html index a475972b59..4dc5dc6bb8 100644 --- a/dashboard-ui/bower_components/iron-form-element-behavior/demo/simple-form.html +++ b/dashboard-ui/bower_components/iron-form-element-behavior/demo/simple-form.html @@ -35,6 +35,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN _elementRegistered: function(e) { this.formElements.push(e.target); + e.target._parentForm = this; }, _elementUnregistered: function(e) { diff --git a/dashboard-ui/bower_components/iron-form-element-behavior/iron-form-element-behavior.html b/dashboard-ui/bower_components/iron-form-element-behavior/iron-form-element-behavior.html index 281ce91d93..6948273b24 100644 --- a/dashboard-ui/bower_components/iron-form-element-behavior/iron-form-element-behavior.html +++ b/dashboard-ui/bower_components/iron-form-element-behavior/iron-form-element-behavior.html @@ -52,8 +52,7 @@ Enables a custom element to be included in an `iron-form`. }, /** - * Need to keep a reference to the form this element is registered - * to, so that it can unregister if detached. + * The form that the element is registered to. */ _parentForm: { type: Object @@ -61,7 +60,8 @@ Enables a custom element to be included in an `iron-form`. }, attached: function() { - this._parentForm = Polymer.dom(this).parentNode; + // Note: the iron-form that this element belongs to will set this + // element's _parentForm property when handling this event. this.fire('iron-form-element-register'); }, diff --git a/dashboard-ui/scripts/htmlmediarenderer.js b/dashboard-ui/scripts/htmlmediarenderer.js index 42149a0bf0..6734be0d11 100644 --- a/dashboard-ui/scripts/htmlmediarenderer.js +++ b/dashboard-ui/scripts/htmlmediarenderer.js @@ -336,7 +336,13 @@ } else { + if (isViblastStarted) { + viblast(elem).stop(); + isViblastStarted = false; + } + if (startTime) { + try { elem.currentTime = startTime; } catch (err) { diff --git a/dashboard-ui/scripts/mediaplayer.js b/dashboard-ui/scripts/mediaplayer.js index b0c74c6494..12059dcae4 100644 --- a/dashboard-ui/scripts/mediaplayer.js +++ b/dashboard-ui/scripts/mediaplayer.js @@ -281,22 +281,16 @@ profile.ContainerProfiles = []; - var audioConditions = []; - - var maxAudioChannels = $.browser.msie || $.browser.safari ? - '2' : - '6'; - - audioConditions.push({ - Condition: 'LessThanEqual', - Property: 'AudioChannels', - Value: maxAudioChannels - }); + var maxAudioChannels = isVlc ? '6' : '2'; profile.CodecProfiles = []; profile.CodecProfiles.push({ Type: 'Audio', - Conditions: audioConditions + Conditions: [{ + Condition: 'LessThanEqual', + Property: 'AudioChannels', + Value: '2' + }] }); profile.CodecProfiles.push({ @@ -576,13 +570,6 @@ var playSessionId = getParameterByName('PlaySessionId', currentSrc); var liveStreamId = getParameterByName('LiveStreamId', currentSrc); - if (params.AudioStreamIndex == null && params.SubtitleStreamIndex == null && params.Bitrate == null) { - - currentSrc = replaceQueryString(currentSrc, 'starttimeticks', ticks || 0); - changeStreamToUrl(mediaRenderer, playSessionId, currentSrc, ticks); - return; - } - var deviceProfile = self.getDeviceProfile(); var audioStreamIndex = params.AudioStreamIndex == null ? (getParameterByName('AudioStreamIndex', currentSrc) || null) : params.AudioStreamIndex; @@ -600,10 +587,12 @@ if (validatePlaybackInfoResult(result)) { self.currentMediaSource = result.MediaSources[0]; + var streamInfo = self.createStreamInfo(self.currentItem.MediaType, self.currentItem, self.currentMediaSource, ticks); + self.currentSubtitleStreamIndex = subtitleStreamIndex; - currentSrc = ApiClient.getUrl(self.currentMediaSource.TranscodingUrl); - changeStreamToUrl(mediaRenderer, playSessionId, currentSrc, ticks); + currentSrc = streamInfo.url; + changeStreamToUrl(mediaRenderer, playSessionId, currentSrc, streamInfo.startTimeTicksOffset || 0); } }); }; @@ -631,14 +620,15 @@ if (self.currentItem.MediaType == "Video") { ApiClient.stopActiveEncodings(playSessionId).done(function () { - self.startTimeTicksOffset = newPositionTicks; + //self.startTimeTicksOffset = newPositionTicks; mediaRenderer.setCurrentSrc(url, self.currentItem, self.currentMediaSource); }); + self.startTimeTicksOffset = newPositionTicks || 0; self.updateTextStreamUrls(newPositionTicks || 0); } else { - self.startTimeTicksOffset = newPositionTicks; + self.startTimeTicksOffset = newPositionTicks || 0; mediaRenderer.setCurrentSrc(url, self.currentItem, self.currentMediaSource); } } diff --git a/dashboard-ui/scripts/site.js b/dashboard-ui/scripts/site.js index 72f1156961..3c9bf58be9 100644 --- a/dashboard-ui/scripts/site.js +++ b/dashboard-ui/scripts/site.js @@ -2030,7 +2030,12 @@ var AppInfo = {}; var drawer = document.querySelector('.mainDrawerPanel'); drawer.classList.remove('mainDrawerPanelPreInit'); drawer.forceNarrow = true; - drawer.drawerWidth = screen.availWidth >= 350 ? "310px" : screen.availWidth >= 310 ? "290px" : "270px"; + var drawerWidth = screen.availWidth - 50; + // At least 240 + drawerWidth = Math.max(drawerWidth, 240); + // But not exceeding 310 + drawerWidth = Math.min(drawerWidth, 310); + drawer.drawerWidth = drawerWidth + "px"; if ($.browser.safari && !AppInfo.isNativeApp) { drawer.disableEdgeSwipe = true;