From 709f0726da86d511f0facc872305f90384de87e3 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Thu, 10 Mar 2016 15:07:23 -0500 Subject: [PATCH] update components --- .../emby-webcomponents/.bower.json | 8 +- .../emby-webcomponents/browser.js | 2 + .../browserdeviceprofile.js | 93 ++++++++++--------- .../bower_components/paper-input/.bower.json | 9 +- .../bower_components/paper-input/bower.json | 3 +- .../paper-input/demo/ssn-input.html | 19 +++- .../paper-input/paper-input-container.html | 13 ++- .../test/paper-input-container.html | 19 ++++ 8 files changed, 108 insertions(+), 58 deletions(-) diff --git a/dashboard-ui/bower_components/emby-webcomponents/.bower.json b/dashboard-ui/bower_components/emby-webcomponents/.bower.json index 25101839d2..3e3c5a7398 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/.bower.json +++ b/dashboard-ui/bower_components/emby-webcomponents/.bower.json @@ -16,12 +16,12 @@ }, "devDependencies": {}, "ignore": [], - "version": "1.1.31", - "_release": "1.1.31", + "version": "1.1.32", + "_release": "1.1.32", "_resolution": { "type": "version", - "tag": "1.1.31", - "commit": "23e283143ce4f084d28a5af10048d53caa23e9be" + "tag": "1.1.32", + "commit": "0aa9676c2790f9ac6cb32f259d750079cf89ae0c" }, "_source": "git://github.com/MediaBrowser/emby-webcomponents.git", "_target": "~1.1.5", diff --git a/dashboard-ui/bower_components/emby-webcomponents/browser.js b/dashboard-ui/bower_components/emby-webcomponents/browser.js index 3ecce61759..30b90cc975 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/browser.js +++ b/dashboard-ui/bower_components/emby-webcomponents/browser.js @@ -95,6 +95,8 @@ browser.xboxOne = userAgent.toLowerCase().indexOf('xbox') != -1; browser.animate = document.documentElement.animate != null; + browser.tizen = userAgent.toLowerCase().indexOf('tizen') != -1; + browser.webos = userAgent.toLowerCase().indexOf('webos') != -1; browser.tv = isTv(); diff --git a/dashboard-ui/bower_components/emby-webcomponents/browserdeviceprofile.js b/dashboard-ui/bower_components/emby-webcomponents/browserdeviceprofile.js index 3e623211a8..4d4f0e094e 100644 --- a/dashboard-ui/bower_components/emby-webcomponents/browserdeviceprofile.js +++ b/dashboard-ui/bower_components/emby-webcomponents/browserdeviceprofile.js @@ -91,9 +91,7 @@ define(['browser'], function (browser) { return true; } - var userAgent = navigator.userAgent.toLowerCase(); - - if (userAgent.indexOf('samsungbrowser') != -1) { + if (browser.tizen) { return true; } @@ -102,47 +100,66 @@ define(['browser'], function (browser) { function testCanPlayTs() { - // Unfortunately there's no real way to detect mkv support - var userAgent = navigator.userAgent.toLowerCase(); - - if (userAgent.indexOf('webos') != -1) { - return true; - } - - if (userAgent.indexOf('samsungbrowser') != -1) { - return true; - } - - return false; + return browser.tizen || browser.webos; } - function testCanPlayWmv() { + function getDirectPlayProfileForVideoContainer(container) { - // Unfortunately there's no real way to detect mkv support - var userAgent = navigator.userAgent.toLowerCase(); + var supported = false; - if (userAgent.indexOf('webos') != -1) { - return true; + switch (container) { + + case '3gp': + case 'avi': + case 'asf': + case 'flv': + case 'mpg': + case 'mpeg': + case 'mts': + case 'trp': + case 'vob': + case 'vro': + supported = browser.tizen; + break; + case 'm2ts': + case 'wmv': + supported = browser.tizen || browser.webos; + break; + default: + break; } - return false; + if (!supported) { + return null; + } + + return { + Container: container, + Type: 'Video' + }; } - function testCanPlayM2ts() { + function getMaxBitrate() { - // Unfortunately there's no real way to detect mkv support var userAgent = navigator.userAgent.toLowerCase(); - if (userAgent.indexOf('webos') != -1) { - return true; + if (browser.tizen) { + + // 2015 models + if (userAgent.indexOf('tizen 2.3') != -1) { + return 20000000; + } + + // 2016 models + return 40000000; } - return false; + return 100000000; } return function () { - var bitrateSetting = 100000000; + var bitrateSetting = getMaxBitrate(); var videoTestElement = document.createElement('video'); @@ -223,22 +240,14 @@ define(['browser'], function (browser) { }); } - if (testCanPlayWmv()) { - profile.DirectPlayProfiles.push({ - Container: 'wmv', - Type: 'Video', - VideoCodec: 'h264' - }); - } + // These are formats we can't test for but some devices will support + ['m2ts', 'wmv'].map(getDirectPlayProfileForVideoContainer).filter(function (i) { + return i != null; - if (testCanPlayM2ts()) { - profile.DirectPlayProfiles.push({ - Container: 'm2ts', - Type: 'Video', - VideoCodec: 'h264', - AudioCodec: videoAudioCodecs.join(',') - }); - } + }).forEach(function (i) { + + profile.DirectPlayProfiles.push(i); + }); ['opus', 'mp3', 'aac', 'flac', 'webma'].filter(canPlayAudioFormat).forEach(function (audioFormat) { diff --git a/dashboard-ui/bower_components/paper-input/.bower.json b/dashboard-ui/bower_components/paper-input/.bower.json index b58ab585d9..536b8d1c24 100644 --- a/dashboard-ui/bower_components/paper-input/.bower.json +++ b/dashboard-ui/bower_components/paper-input/.bower.json @@ -1,6 +1,6 @@ { "name": "paper-input", - "version": "1.1.9", + "version": "1.1.10", "description": "Material design text fields", "authors": [ "The Polymer Authors" @@ -39,6 +39,7 @@ "devDependencies": { "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", "iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0", + "iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0", "iron-icon": "PolymerElements/iron-icon#^1.0.0", "iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0", "iron-validator-behavior": "PolymerElements/iron-validator-behavior#^1.0.0", @@ -47,11 +48,11 @@ "web-component-tester": "^4.0.0", "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" }, - "_release": "1.1.9", + "_release": "1.1.10", "_resolution": { "type": "version", - "tag": "v1.1.9", - "commit": "4cb91098977573135b74121d6f4a2a301f44ce93" + "tag": "v1.1.10", + "commit": "d8e201099b4b2987bea1dbcf5804c0383544bbfd" }, "_source": "git://github.com/polymerelements/paper-input.git", "_target": "^1.0.9", diff --git a/dashboard-ui/bower_components/paper-input/bower.json b/dashboard-ui/bower_components/paper-input/bower.json index a82eb70701..e9d73a022c 100644 --- a/dashboard-ui/bower_components/paper-input/bower.json +++ b/dashboard-ui/bower_components/paper-input/bower.json @@ -1,6 +1,6 @@ { "name": "paper-input", - "version": "1.1.9", + "version": "1.1.10", "description": "Material design text fields", "authors": [ "The Polymer Authors" @@ -39,6 +39,7 @@ "devDependencies": { "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", "iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0", + "iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0", "iron-icon": "PolymerElements/iron-icon#^1.0.0", "iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0", "iron-validator-behavior": "PolymerElements/iron-validator-behavior#^1.0.0", diff --git a/dashboard-ui/bower_components/paper-input/demo/ssn-input.html b/dashboard-ui/bower_components/paper-input/demo/ssn-input.html index e4ae824288..d5cb3ae207 100644 --- a/dashboard-ui/bower_components/paper-input/demo/ssn-input.html +++ b/dashboard-ui/bower_components/paper-input/demo/ssn-input.html @@ -9,6 +9,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN --> + @@ -27,15 +28,23 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN width: auto; text-align: center; } + + .container { + @apply(--layout-horizontal); + } - - - - - - - +
+ + + - + + - + + +
diff --git a/dashboard-ui/bower_components/paper-input/paper-input-container.html b/dashboard-ui/bower_components/paper-input/paper-input-container.html index c1b9f66b9c..3f5a6ba495 100644 --- a/dashboard-ui/bower_components/paper-input/paper-input-container.html +++ b/dashboard-ui/bower_components/paper-input/paper-input-container.html @@ -25,6 +25,9 @@ For example: +Do not wrap around elements that already include it, such as . +Doing so may cause events to bounce infintely between the container and its contained element. + ### Listening for input changes By default, it listens for changes on the `bind-value` attribute on its children nodes and perform @@ -43,6 +46,11 @@ compound input field like a social security number input. The custom input eleme + +If you're using a `` imperatively, it's important to make sure +that you attach its children (the `iron-input` and the optional `label`) before you +attach the `` itself, so that it can be set up correctly. + ### Validation If the `auto-validate` attribute is set, the input container will validate the input and update @@ -457,14 +465,15 @@ This element is `display:block` by default, but you can set the `inline` attribu } this.addEventListener('focus', this._boundOnFocus, true); this.addEventListener('blur', this._boundOnBlur, true); + }, + + attached: function() { if (this.attrForValue) { this._inputElement.addEventListener(this._valueChangedEvent, this._boundValueChanged); } else { this.addEventListener('input', this._onInput); } - }, - attached: function() { // Only validate when attached if the input already has a value. if (this._inputElementValue != '') { this._handleValueAndAutoValidate(this._inputElement); diff --git a/dashboard-ui/bower_components/paper-input/test/paper-input-container.html b/dashboard-ui/bower_components/paper-input/test/paper-input-container.html index a24549e2d8..9863440f63 100644 --- a/dashboard-ui/bower_components/paper-input/test/paper-input-container.html +++ b/dashboard-ui/bower_components/paper-input/test/paper-input-container.html @@ -129,6 +129,25 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN return style.transform || style.webkitTransform; } + suite('basic', function() { + test('can be created imperatively', function() { + var container = document.createElement('paper-input-container'); + var input = document.createElement('input', 'iron-input'); + input.className = 'paper-input-input'; + input.id = 'input'; + + var label = document.createElement('label'); + label.innerHTML = 'label'; + + Polymer.dom(container).appendChild(label); + Polymer.dom(container).appendChild(input); + + document.body.appendChild(container); + assert.isOk(container); + document.body.removeChild(container); + }); + }); + suite('label position', function() { test('label is visible by default', function() {