mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update components
This commit is contained in:
parent
411b85f351
commit
709f0726da
8 changed files with 108 additions and 58 deletions
|
@ -16,12 +16,12 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {},
|
"devDependencies": {},
|
||||||
"ignore": [],
|
"ignore": [],
|
||||||
"version": "1.1.31",
|
"version": "1.1.32",
|
||||||
"_release": "1.1.31",
|
"_release": "1.1.32",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "1.1.31",
|
"tag": "1.1.32",
|
||||||
"commit": "23e283143ce4f084d28a5af10048d53caa23e9be"
|
"commit": "0aa9676c2790f9ac6cb32f259d750079cf89ae0c"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/MediaBrowser/emby-webcomponents.git",
|
"_source": "git://github.com/MediaBrowser/emby-webcomponents.git",
|
||||||
"_target": "~1.1.5",
|
"_target": "~1.1.5",
|
||||||
|
|
|
@ -95,6 +95,8 @@
|
||||||
|
|
||||||
browser.xboxOne = userAgent.toLowerCase().indexOf('xbox') != -1;
|
browser.xboxOne = userAgent.toLowerCase().indexOf('xbox') != -1;
|
||||||
browser.animate = document.documentElement.animate != null;
|
browser.animate = document.documentElement.animate != null;
|
||||||
|
browser.tizen = userAgent.toLowerCase().indexOf('tizen') != -1;
|
||||||
|
browser.webos = userAgent.toLowerCase().indexOf('webos') != -1;
|
||||||
|
|
||||||
browser.tv = isTv();
|
browser.tv = isTv();
|
||||||
|
|
||||||
|
|
|
@ -91,9 +91,7 @@ define(['browser'], function (browser) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
var userAgent = navigator.userAgent.toLowerCase();
|
if (browser.tizen) {
|
||||||
|
|
||||||
if (userAgent.indexOf('samsungbrowser') != -1) {
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -102,47 +100,66 @@ define(['browser'], function (browser) {
|
||||||
|
|
||||||
function testCanPlayTs() {
|
function testCanPlayTs() {
|
||||||
|
|
||||||
// Unfortunately there's no real way to detect mkv support
|
return browser.tizen || browser.webos;
|
||||||
var userAgent = navigator.userAgent.toLowerCase();
|
|
||||||
|
|
||||||
if (userAgent.indexOf('webos') != -1) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (userAgent.indexOf('samsungbrowser') != -1) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function testCanPlayWmv() {
|
function getDirectPlayProfileForVideoContainer(container) {
|
||||||
|
|
||||||
// Unfortunately there's no real way to detect mkv support
|
var supported = false;
|
||||||
var userAgent = navigator.userAgent.toLowerCase();
|
|
||||||
|
|
||||||
if (userAgent.indexOf('webos') != -1) {
|
switch (container) {
|
||||||
return true;
|
|
||||||
|
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();
|
var userAgent = navigator.userAgent.toLowerCase();
|
||||||
|
|
||||||
if (userAgent.indexOf('webos') != -1) {
|
if (browser.tizen) {
|
||||||
return true;
|
|
||||||
|
// 2015 models
|
||||||
|
if (userAgent.indexOf('tizen 2.3') != -1) {
|
||||||
|
return 20000000;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2016 models
|
||||||
|
return 40000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return 100000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
return function () {
|
return function () {
|
||||||
|
|
||||||
var bitrateSetting = 100000000;
|
var bitrateSetting = getMaxBitrate();
|
||||||
|
|
||||||
var videoTestElement = document.createElement('video');
|
var videoTestElement = document.createElement('video');
|
||||||
|
|
||||||
|
@ -223,22 +240,14 @@ define(['browser'], function (browser) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (testCanPlayWmv()) {
|
// These are formats we can't test for but some devices will support
|
||||||
profile.DirectPlayProfiles.push({
|
['m2ts', 'wmv'].map(getDirectPlayProfileForVideoContainer).filter(function (i) {
|
||||||
Container: 'wmv',
|
return i != null;
|
||||||
Type: 'Video',
|
|
||||||
VideoCodec: 'h264'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (testCanPlayM2ts()) {
|
}).forEach(function (i) {
|
||||||
profile.DirectPlayProfiles.push({
|
|
||||||
Container: 'm2ts',
|
profile.DirectPlayProfiles.push(i);
|
||||||
Type: 'Video',
|
});
|
||||||
VideoCodec: 'h264',
|
|
||||||
AudioCodec: videoAudioCodecs.join(',')
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
['opus', 'mp3', 'aac', 'flac', 'webma'].filter(canPlayAudioFormat).forEach(function (audioFormat) {
|
['opus', 'mp3', 'aac', 'flac', 'webma'].filter(canPlayAudioFormat).forEach(function (audioFormat) {
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "paper-input",
|
"name": "paper-input",
|
||||||
"version": "1.1.9",
|
"version": "1.1.10",
|
||||||
"description": "Material design text fields",
|
"description": "Material design text fields",
|
||||||
"authors": [
|
"authors": [
|
||||||
"The Polymer Authors"
|
"The Polymer Authors"
|
||||||
|
@ -39,6 +39,7 @@
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
|
"iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
|
||||||
"iron-demo-helpers": "PolymerElements/iron-demo-helpers#^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-icon": "PolymerElements/iron-icon#^1.0.0",
|
||||||
"iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0",
|
"iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0",
|
||||||
"iron-validator-behavior": "PolymerElements/iron-validator-behavior#^1.0.0",
|
"iron-validator-behavior": "PolymerElements/iron-validator-behavior#^1.0.0",
|
||||||
|
@ -47,11 +48,11 @@
|
||||||
"web-component-tester": "^4.0.0",
|
"web-component-tester": "^4.0.0",
|
||||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||||
},
|
},
|
||||||
"_release": "1.1.9",
|
"_release": "1.1.10",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "v1.1.9",
|
"tag": "v1.1.10",
|
||||||
"commit": "4cb91098977573135b74121d6f4a2a301f44ce93"
|
"commit": "d8e201099b4b2987bea1dbcf5804c0383544bbfd"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/polymerelements/paper-input.git",
|
"_source": "git://github.com/polymerelements/paper-input.git",
|
||||||
"_target": "^1.0.9",
|
"_target": "^1.0.9",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "paper-input",
|
"name": "paper-input",
|
||||||
"version": "1.1.9",
|
"version": "1.1.10",
|
||||||
"description": "Material design text fields",
|
"description": "Material design text fields",
|
||||||
"authors": [
|
"authors": [
|
||||||
"The Polymer Authors"
|
"The Polymer Authors"
|
||||||
|
@ -39,6 +39,7 @@
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
|
"iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
|
||||||
"iron-demo-helpers": "PolymerElements/iron-demo-helpers#^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-icon": "PolymerElements/iron-icon#^1.0.0",
|
||||||
"iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0",
|
"iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0",
|
||||||
"iron-validator-behavior": "PolymerElements/iron-validator-behavior#^1.0.0",
|
"iron-validator-behavior": "PolymerElements/iron-validator-behavior#^1.0.0",
|
||||||
|
|
|
@ -9,6 +9,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
-->
|
-->
|
||||||
<link rel="import" href="../../polymer/polymer.html">
|
<link rel="import" href="../../polymer/polymer.html">
|
||||||
<link rel="import" href="../../iron-input/iron-input.html">
|
<link rel="import" href="../../iron-input/iron-input.html">
|
||||||
|
<link rel="import" href="../../iron-flex-layout/iron-flex-layout.html">
|
||||||
<link rel="import" href="ssn-validator.html">
|
<link rel="import" href="ssn-validator.html">
|
||||||
|
|
||||||
<dom-module id="ssn-input">
|
<dom-module id="ssn-input">
|
||||||
|
@ -27,15 +28,23 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
width: auto;
|
width: auto;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.container {
|
||||||
|
@apply(--layout-horizontal);
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<ssn-validator></ssn-validator>
|
<ssn-validator></ssn-validator>
|
||||||
|
|
||||||
<input is="iron-input" maxlength="3" bind-value="{{_ssn1}}" size="3" aria-label="First 3 digits of social security number">
|
<div class="container">
|
||||||
-
|
|
||||||
<input is="iron-input" maxlength="2" bind-value="{{_ssn2}}" size="2" aria-label="Middle 2 digits of social security number">
|
<input is="iron-input" maxlength="3" bind-value="{{_ssn1}}" size="3" aria-label="First 3 digits of social security number">
|
||||||
-
|
-
|
||||||
<input is="iron-input" maxlength="4" bind-value="{{_ssn3}}" size="4" aria-label="Last 4 digits of social security number">
|
<input is="iron-input" maxlength="2" bind-value="{{_ssn2}}" size="2" aria-label="Middle 2 digits of social security number">
|
||||||
|
-
|
||||||
|
<input is="iron-input" maxlength="4" bind-value="{{_ssn3}}" size="4" aria-label="Last 4 digits of social security number">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
</dom-module>
|
</dom-module>
|
||||||
|
|
|
@ -25,6 +25,9 @@ For example:
|
||||||
<input is="iron-input">
|
<input is="iron-input">
|
||||||
</paper-input-container>
|
</paper-input-container>
|
||||||
|
|
||||||
|
Do not wrap <paper-input-contanter> around elements that already include it, such as <paper-input>.
|
||||||
|
Doing so may cause events to bounce infintely between the container and its contained element.
|
||||||
|
|
||||||
### Listening for input changes
|
### Listening for input changes
|
||||||
|
|
||||||
By default, it listens for changes on the `bind-value` attribute on its children nodes and perform
|
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
|
||||||
<ssn-input class="paper-input-input"></ssn-input>
|
<ssn-input class="paper-input-input"></ssn-input>
|
||||||
</paper-input-container>
|
</paper-input-container>
|
||||||
|
|
||||||
|
|
||||||
|
If you're using a `<paper-input-container>` imperatively, it's important to make sure
|
||||||
|
that you attach its children (the `iron-input` and the optional `label`) before you
|
||||||
|
attach the `<paper-input-container>` itself, so that it can be set up correctly.
|
||||||
|
|
||||||
### Validation
|
### Validation
|
||||||
|
|
||||||
If the `auto-validate` attribute is set, the input container will validate the input and update
|
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('focus', this._boundOnFocus, true);
|
||||||
this.addEventListener('blur', this._boundOnBlur, true);
|
this.addEventListener('blur', this._boundOnBlur, true);
|
||||||
|
},
|
||||||
|
|
||||||
|
attached: function() {
|
||||||
if (this.attrForValue) {
|
if (this.attrForValue) {
|
||||||
this._inputElement.addEventListener(this._valueChangedEvent, this._boundValueChanged);
|
this._inputElement.addEventListener(this._valueChangedEvent, this._boundValueChanged);
|
||||||
} else {
|
} else {
|
||||||
this.addEventListener('input', this._onInput);
|
this.addEventListener('input', this._onInput);
|
||||||
}
|
}
|
||||||
},
|
|
||||||
|
|
||||||
attached: function() {
|
|
||||||
// Only validate when attached if the input already has a value.
|
// Only validate when attached if the input already has a value.
|
||||||
if (this._inputElementValue != '') {
|
if (this._inputElementValue != '') {
|
||||||
this._handleValueAndAutoValidate(this._inputElement);
|
this._handleValueAndAutoValidate(this._inputElement);
|
||||||
|
|
|
@ -129,6 +129,25 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
return style.transform || style.webkitTransform;
|
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() {
|
suite('label position', function() {
|
||||||
|
|
||||||
test('label is visible by default', function() {
|
test('label is visible by default', function() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue