mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update form
This commit is contained in:
parent
077f440dcc
commit
14519607f4
29 changed files with 306 additions and 188 deletions
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "hls.js",
|
||||
"version": "0.5.20",
|
||||
"version": "0.5.21",
|
||||
"license": "Apache-2.0",
|
||||
"description": "Media Source Extension - HLS library, by/for Dailymotion",
|
||||
"homepage": "https://github.com/dailymotion/hls.js",
|
||||
|
@ -16,11 +16,11 @@
|
|||
"test",
|
||||
"tests"
|
||||
],
|
||||
"_release": "0.5.20",
|
||||
"_release": "0.5.21",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v0.5.20",
|
||||
"commit": "3fb06c59d0df49961c057b522dc08eba4b8b0f08"
|
||||
"tag": "v0.5.21",
|
||||
"commit": "25b13e24bbd97785da7e255db117902e692c09dd"
|
||||
},
|
||||
"_source": "git://github.com/dailymotion/hls.js.git",
|
||||
"_target": "~0.5.7",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "hls.js",
|
||||
"version": "0.5.20",
|
||||
"version": "0.5.21",
|
||||
"license": "Apache-2.0",
|
||||
"description": "Media Source Extension - HLS library, by/for Dailymotion",
|
||||
"homepage": "https://github.com/dailymotion/hls.js",
|
||||
|
|
69
dashboard-ui/bower_components/hls.js/dist/hls.js
vendored
69
dashboard-ui/bower_components/hls.js/dist/hls.js
vendored
|
@ -427,7 +427,9 @@ var AbrController = function (_EventHandler) {
|
|||
}, {
|
||||
key: 'onFragLoading',
|
||||
value: function onFragLoading(data) {
|
||||
if (!this.timer) {
|
||||
this.timer = setInterval(this.onCheck, 100);
|
||||
}
|
||||
this.fragCurrent = data.frag;
|
||||
}
|
||||
}, {
|
||||
|
@ -1188,6 +1190,7 @@ var LevelController = function (_EventHandler) {
|
|||
value: function destroy() {
|
||||
if (this.timer) {
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
}
|
||||
this._manualLevel = -1;
|
||||
}
|
||||
|
@ -1712,6 +1715,20 @@ var StreamController = function (_EventHandler) {
|
|||
_logger.logger.log('buffer end: ' + bufferEnd + ' is located too far from the end of live sliding playlist, media position will be reseted to: ' + this.seekAfterBuffered.toFixed(3));
|
||||
bufferEnd = this.seekAfterBuffered;
|
||||
}
|
||||
|
||||
// if end of buffer greater than live edge, don't load any fragment
|
||||
// this could happen if live playlist intermittently slides in the past.
|
||||
// level 1 loaded [182580161,182580167]
|
||||
// level 1 loaded [182580162,182580169]
|
||||
// Loading 182580168 of [182580162 ,182580169],level 1 ..
|
||||
// Loading 182580169 of [182580162 ,182580169],level 1 ..
|
||||
// level 1 loaded [182580162,182580168] <============= here we should have bufferEnd > end. in that case break to avoid reloading 182580168
|
||||
// level 1 loaded [182580164,182580171]
|
||||
//
|
||||
if (bufferEnd > end) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (this.startFragRequested && !levelDetails.PTSKnown) {
|
||||
/* we are switching level on live playlist, but we don't have any PTS info for that quality level ...
|
||||
try to load frag matching with next SN.
|
||||
|
@ -2516,11 +2533,11 @@ var StreamController = function (_EventHandler) {
|
|||
_logger.logger.log('playback not stuck anymore @' + currentTime);
|
||||
}
|
||||
// check buffer upfront
|
||||
// if less than 200ms is buffered, and media is expected to play but playhead is not moving,
|
||||
// if less than jumpThreshold second is buffered, and media is expected to play but playhead is not moving,
|
||||
// and we have a new buffer range available upfront, let's seek to that one
|
||||
if (bufferInfo.len <= jumpThreshold) {
|
||||
if (playheadMoving || !expectedPlaying) {
|
||||
// playhead moving or media not playing
|
||||
if (expectedPlaying && bufferInfo.len <= jumpThreshold) {
|
||||
if (playheadMoving) {
|
||||
// playhead moving
|
||||
jumpThreshold = 0;
|
||||
this.seekHoleNudgeDuration = 0;
|
||||
} else {
|
||||
|
@ -5158,7 +5175,9 @@ var ErrorDetails = exports.ErrorDetails = {
|
|||
// Identifier for a buffer full event
|
||||
BUFFER_FULL_ERROR: 'bufferFullError',
|
||||
// Identifier for a buffer seek over hole event
|
||||
BUFFER_SEEK_OVER_HOLE: 'bufferSeekOverHole'
|
||||
BUFFER_SEEK_OVER_HOLE: 'bufferSeekOverHole',
|
||||
// Identifier for an internal exception happening inside hls.js while handling an event
|
||||
INTERNAL_EXCEPTION: 'internalException'
|
||||
};
|
||||
|
||||
},{}],21:[function(require,module,exports){
|
||||
|
@ -5170,18 +5189,18 @@ Object.defineProperty(exports, "__esModule", {
|
|||
|
||||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
|
||||
|
||||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
||||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /*
|
||||
*
|
||||
* All objects in the event handling chain should inherit from this class
|
||||
*
|
||||
*/
|
||||
|
||||
var _logger = require('./utils/logger');
|
||||
|
||||
var _errors = require('./errors');
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
/*
|
||||
*
|
||||
* All objects in the event handling chain should inherit from this class
|
||||
*
|
||||
*/
|
||||
|
||||
//import {logger} from './utils/logger';
|
||||
|
||||
var EventHandler = function () {
|
||||
function EventHandler(hls) {
|
||||
_classCallCheck(this, EventHandler);
|
||||
|
@ -5250,7 +5269,12 @@ var EventHandler = function () {
|
|||
}
|
||||
return this[funcName].bind(this, data);
|
||||
};
|
||||
try {
|
||||
eventToFunction.call(this, event, data).call();
|
||||
} catch (err) {
|
||||
_logger.logger.error('internal error happened while processing ' + event + ':' + err.message);
|
||||
this.hls.trigger(Event.ERROR, { type: _errors.ErrorTypes.OTHER_ERROR, details: _errors.ErrorDetails.INTERNAL_EXCEPTION, fatal: false, event: event, err: err });
|
||||
}
|
||||
}
|
||||
}]);
|
||||
|
||||
|
@ -5259,7 +5283,7 @@ var EventHandler = function () {
|
|||
|
||||
exports.default = EventHandler;
|
||||
|
||||
},{}],22:[function(require,module,exports){
|
||||
},{"./errors":20,"./utils/logger":36}],22:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
module.exports = {
|
||||
|
@ -5498,12 +5522,16 @@ var LevelHelper = function () {
|
|||
if (PTSFrag) {
|
||||
LevelHelper.updateFragPTS(newDetails, PTSFrag.sn, PTSFrag.startPTS, PTSFrag.endPTS);
|
||||
} else {
|
||||
// ensure that delta is within oldfragments range
|
||||
// no need to offset start if delta === 0
|
||||
if (delta > 0 && delta < oldfragments.length) {
|
||||
// adjust start by sliding offset
|
||||
var sliding = oldfragments[delta].start;
|
||||
for (i = 0; i < newfragments.length; i++) {
|
||||
newfragments[i].start += sliding;
|
||||
}
|
||||
}
|
||||
}
|
||||
// if we are here, it means we have fragments overlapping between
|
||||
// old and new level. reliable PTS info is thus relying on old level
|
||||
newDetails.PTSKnown = oldDetails.PTSKnown;
|
||||
|
@ -5795,6 +5823,7 @@ var Hls = function () {
|
|||
this.playlistLoader.destroy();
|
||||
this.fragmentLoader.destroy();
|
||||
this.levelController.destroy();
|
||||
this.abrController.destroy();
|
||||
this.bufferController.destroy();
|
||||
this.capLevelController.destroy();
|
||||
this.streamController.destroy();
|
||||
|
@ -7281,8 +7310,8 @@ var MP4Remuxer = function () {
|
|||
ptsnorm = this._PTSNormalize(pts, nextAvcDts);
|
||||
dtsnorm = this._PTSNormalize(dts, nextAvcDts);
|
||||
delta = Math.round((dtsnorm - nextAvcDts) / 90);
|
||||
// if fragment are contiguous, or delta less than 600ms, ensure there is no overlap/hole between fragments
|
||||
if (contiguous || Math.abs(delta) < 600) {
|
||||
// if fragment are contiguous, or if there is a huge delta (more than 10s) between expected PTS and sample PTS
|
||||
if (contiguous || Math.abs(delta) > 10000) {
|
||||
if (delta) {
|
||||
if (delta > 1) {
|
||||
_logger.logger.log('AVC:' + delta + ' ms hole between fragments detected,filling it');
|
||||
|
@ -7414,8 +7443,8 @@ var MP4Remuxer = function () {
|
|||
ptsnorm = this._PTSNormalize(pts, nextAacPts);
|
||||
dtsnorm = this._PTSNormalize(dts, nextAacPts);
|
||||
delta = Math.round(1000 * (ptsnorm - nextAacPts) / pesTimeScale);
|
||||
// if fragment are contiguous, or delta less than 600ms, ensure there is no overlap/hole between fragments
|
||||
if (contiguous || Math.abs(delta) < 600) {
|
||||
// if fragment are contiguous, or if there is a huge delta (more than 10s) between expected PTS and sample PTS
|
||||
if (contiguous || Math.abs(delta) > 10000) {
|
||||
// log delta
|
||||
if (delta) {
|
||||
if (delta > 0) {
|
||||
|
@ -7427,7 +7456,7 @@ var MP4Remuxer = function () {
|
|||
track.len -= unit.byteLength;
|
||||
continue;
|
||||
}
|
||||
// set DTS to next DTS
|
||||
// set PTS/DTS to next PTS/DTS
|
||||
ptsnorm = dtsnorm = nextAacPts;
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "hls.js",
|
||||
"version": "0.5.20",
|
||||
"version": "0.5.21",
|
||||
"license": "Apache-2.0",
|
||||
"description": "Media Source Extension - HLS library, by/for Dailymotion",
|
||||
"homepage": "https://github.com/dailymotion/hls.js",
|
||||
|
|
|
@ -30,7 +30,9 @@ class AbrController extends EventHandler {
|
|||
}
|
||||
|
||||
onFragLoading(data) {
|
||||
if (!this.timer) {
|
||||
this.timer = setInterval(this.onCheck, 100);
|
||||
}
|
||||
this.fragCurrent = data.frag;
|
||||
}
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@ class LevelController extends EventHandler {
|
|||
destroy() {
|
||||
if (this.timer) {
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
}
|
||||
this._manualLevel = -1;
|
||||
}
|
||||
|
|
|
@ -208,6 +208,20 @@ class StreamController extends EventHandler {
|
|||
logger.log(`buffer end: ${bufferEnd} is located too far from the end of live sliding playlist, media position will be reseted to: ${this.seekAfterBuffered.toFixed(3)}`);
|
||||
bufferEnd = this.seekAfterBuffered;
|
||||
}
|
||||
|
||||
// if end of buffer greater than live edge, don't load any fragment
|
||||
// this could happen if live playlist intermittently slides in the past.
|
||||
// level 1 loaded [182580161,182580167]
|
||||
// level 1 loaded [182580162,182580169]
|
||||
// Loading 182580168 of [182580162 ,182580169],level 1 ..
|
||||
// Loading 182580169 of [182580162 ,182580169],level 1 ..
|
||||
// level 1 loaded [182580162,182580168] <============= here we should have bufferEnd > end. in that case break to avoid reloading 182580168
|
||||
// level 1 loaded [182580164,182580171]
|
||||
//
|
||||
if (bufferEnd > end) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (this.startFragRequested && !levelDetails.PTSKnown) {
|
||||
/* we are switching level on live playlist, but we don't have any PTS info for that quality level ...
|
||||
try to load frag matching with next SN.
|
||||
|
@ -1004,11 +1018,11 @@ _checkBuffer() {
|
|||
logger.log(`playback not stuck anymore @${currentTime}`);
|
||||
}
|
||||
// check buffer upfront
|
||||
// if less than 200ms is buffered, and media is expected to play but playhead is not moving,
|
||||
// if less than jumpThreshold second is buffered, and media is expected to play but playhead is not moving,
|
||||
// and we have a new buffer range available upfront, let's seek to that one
|
||||
if(bufferInfo.len <= jumpThreshold) {
|
||||
if(playheadMoving || !expectedPlaying) {
|
||||
// playhead moving or media not playing
|
||||
if(expectedPlaying && bufferInfo.len <= jumpThreshold) {
|
||||
if(playheadMoving) {
|
||||
// playhead moving
|
||||
jumpThreshold = 0;
|
||||
this.seekHoleNudgeDuration = 0;
|
||||
} else {
|
||||
|
|
|
@ -45,5 +45,7 @@ export const ErrorDetails = {
|
|||
// Identifier for a buffer full event
|
||||
BUFFER_FULL_ERROR: 'bufferFullError',
|
||||
// Identifier for a buffer seek over hole event
|
||||
BUFFER_SEEK_OVER_HOLE: 'bufferSeekOverHole'
|
||||
BUFFER_SEEK_OVER_HOLE: 'bufferSeekOverHole',
|
||||
// Identifier for an internal exception happening inside hls.js while handling an event
|
||||
INTERNAL_EXCEPTION: 'internalException'
|
||||
};
|
||||
|
|
|
@ -4,7 +4,8 @@
|
|||
*
|
||||
*/
|
||||
|
||||
//import {logger} from './utils/logger';
|
||||
import {logger} from './utils/logger';
|
||||
import {ErrorTypes, ErrorDetails} from './errors';
|
||||
|
||||
class EventHandler {
|
||||
|
||||
|
@ -59,7 +60,12 @@ class EventHandler {
|
|||
}
|
||||
return this[funcName].bind(this, data);
|
||||
};
|
||||
try {
|
||||
eventToFunction.call(this, event, data).call();
|
||||
} catch (err) {
|
||||
logger.error(`internal error happened while processing ${event}:${err.message}`);
|
||||
this.hls.trigger(Event.ERROR, {type: ErrorTypes.OTHER_ERROR, details: ErrorDetails.INTERNAL_EXCEPTION, fatal: false, event : event, err : err});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -44,12 +44,16 @@ class LevelHelper {
|
|||
if(PTSFrag) {
|
||||
LevelHelper.updateFragPTS(newDetails,PTSFrag.sn,PTSFrag.startPTS,PTSFrag.endPTS);
|
||||
} else {
|
||||
// ensure that delta is within oldfragments range
|
||||
// no need to offset start if delta === 0
|
||||
if (delta > 0 && delta < oldfragments.length) {
|
||||
// adjust start by sliding offset
|
||||
var sliding = oldfragments[delta].start;
|
||||
for(i = 0 ; i < newfragments.length ; i++) {
|
||||
newfragments[i].start += sliding;
|
||||
}
|
||||
}
|
||||
}
|
||||
// if we are here, it means we have fragments overlapping between
|
||||
// old and new level. reliable PTS info is thus relying on old level
|
||||
newDetails.PTSKnown = oldDetails.PTSKnown;
|
||||
|
|
|
@ -142,6 +142,7 @@ class Hls {
|
|||
this.playlistLoader.destroy();
|
||||
this.fragmentLoader.destroy();
|
||||
this.levelController.destroy();
|
||||
this.abrController.destroy();
|
||||
this.bufferController.destroy();
|
||||
this.capLevelController.destroy();
|
||||
this.streamController.destroy();
|
||||
|
|
|
@ -190,8 +190,8 @@ class MP4Remuxer {
|
|||
ptsnorm = this._PTSNormalize(pts, nextAvcDts);
|
||||
dtsnorm = this._PTSNormalize(dts, nextAvcDts);
|
||||
delta = Math.round((dtsnorm - nextAvcDts) / 90);
|
||||
// if fragment are contiguous, or delta less than 600ms, ensure there is no overlap/hole between fragments
|
||||
if (contiguous || Math.abs(delta) < 600) {
|
||||
// if fragment are contiguous, or if there is a huge delta (more than 10s) between expected PTS and sample PTS
|
||||
if (contiguous || Math.abs(delta) > 10000) {
|
||||
if (delta) {
|
||||
if (delta > 1) {
|
||||
logger.log(`AVC:${delta} ms hole between fragments detected,filling it`);
|
||||
|
@ -314,8 +314,8 @@ class MP4Remuxer {
|
|||
ptsnorm = this._PTSNormalize(pts, nextAacPts);
|
||||
dtsnorm = this._PTSNormalize(dts, nextAacPts);
|
||||
delta = Math.round(1000 * (ptsnorm - nextAacPts) / pesTimeScale);
|
||||
// if fragment are contiguous, or delta less than 600ms, ensure there is no overlap/hole between fragments
|
||||
if (contiguous || Math.abs(delta) < 600) {
|
||||
// if fragment are contiguous, or if there is a huge delta (more than 10s) between expected PTS and sample PTS
|
||||
if (contiguous || Math.abs(delta) > 10000) {
|
||||
// log delta
|
||||
if (delta) {
|
||||
if (delta > 0) {
|
||||
|
@ -327,7 +327,7 @@ class MP4Remuxer {
|
|||
track.len -= unit.byteLength;
|
||||
continue;
|
||||
}
|
||||
// set DTS to next DTS
|
||||
// set PTS/DTS to next PTS/DTS
|
||||
ptsnorm = dtsnorm = nextAacPts;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,14 +29,14 @@
|
|||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||
},
|
||||
"ignore": [],
|
||||
"homepage": "https://github.com/PolymerElements/iron-behaviors",
|
||||
"homepage": "https://github.com/polymerelements/iron-behaviors",
|
||||
"_release": "1.0.13",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.0.13",
|
||||
"commit": "a7bc3428a6da2beed21987b3a8028206826a12bc"
|
||||
},
|
||||
"_source": "git://github.com/PolymerElements/iron-behaviors.git",
|
||||
"_source": "git://github.com/polymerelements/iron-behaviors.git",
|
||||
"_target": "^1.0.0",
|
||||
"_originalSource": "PolymerElements/iron-behaviors"
|
||||
"_originalSource": "polymerelements/iron-behaviors"
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "iron-overlay-behavior",
|
||||
"version": "1.6.2",
|
||||
"version": "1.6.3",
|
||||
"license": "http://polymer.github.io/LICENSE.txt",
|
||||
"description": "Provides a behavior for making an element an overlay",
|
||||
"private": true,
|
||||
|
@ -35,11 +35,11 @@
|
|||
},
|
||||
"ignore": [],
|
||||
"homepage": "https://github.com/polymerelements/iron-overlay-behavior",
|
||||
"_release": "1.6.2",
|
||||
"_release": "1.6.3",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.6.2",
|
||||
"commit": "be4e703b6894af6d4013a8a9f514a384ee91e2db"
|
||||
"tag": "v1.6.3",
|
||||
"commit": "5b331ebaefe3214937b94ba19769154efee46244"
|
||||
},
|
||||
"_source": "git://github.com/polymerelements/iron-overlay-behavior.git",
|
||||
"_target": "^1.0.0",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
language: node_js
|
||||
sudo: false
|
||||
sudo: required
|
||||
before_script:
|
||||
- npm install -g bower polylint web-component-tester
|
||||
- bower install
|
||||
|
@ -8,18 +8,16 @@ env:
|
|||
global:
|
||||
- secure: H8AA9JkWfG/vc3MiimoIoYi45KD10hKzitLJnExkomgzFI/f5o9SGtwjCii5P8Kvf4xndftDjYwRgbYyJpSg0IJeq8rm1WS89cY8O6/1dlI/tK1j5xbVRrhqmRQncxUb3K4MAT6Z9br1jwEeamRa+NKmq+v+VEpQY5vwuQ/BHJw=
|
||||
- secure: EaE1AUVgWyn0Y6kqkb54z5r39RvTJzAOmeM0lRl7wXzr5k0mq3VGlxTksJqCVd1PdJESXEhy8eldBnlkwZir/imDTNQxKm13k7ZiFC0000XAzpLZElkH2cLlYCRWcuM+vS7dA9hytV0UcGK2VGqbxfpcesB20dPSneDEUuc5X64=
|
||||
- CXX=g++-4.8
|
||||
node_js: stable
|
||||
addons:
|
||||
firefox: latest
|
||||
apt:
|
||||
sources:
|
||||
- google-chrome
|
||||
- ubuntu-toolchain-r-test
|
||||
packages:
|
||||
- google-chrome-stable
|
||||
- g++-4.8
|
||||
sauce_connect: true
|
||||
script:
|
||||
- xvfb-run wct
|
||||
- "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi"
|
||||
dist: trusty
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "iron-overlay-behavior",
|
||||
"version": "1.6.2",
|
||||
"version": "1.6.3",
|
||||
"license": "http://polymer.github.io/LICENSE.txt",
|
||||
"description": "Provides a behavior for making an element an overlay",
|
||||
"private": true,
|
||||
|
|
|
@ -35,8 +35,8 @@ Custom property | Description | Default
|
|||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: var(--iron-overlay-backdrop-background-color, #000);
|
||||
opacity: 0;
|
||||
transition: opacity 0.2s;
|
||||
|
|
|
@ -326,13 +326,13 @@ context. You should place this element as a child of `<body>` whenever possible.
|
|||
|
||||
// requestAnimationFrame for non-blocking rendering
|
||||
if (this.__openChangedAsync) {
|
||||
cancelAnimationFrame(this.__openChangedAsync);
|
||||
window.cancelAnimationFrame(this.__openChangedAsync);
|
||||
}
|
||||
if (this.opened) {
|
||||
if (this.withBackdrop) {
|
||||
this.backdropElement.prepare();
|
||||
}
|
||||
this.__openChangedAsync = requestAnimationFrame(function() {
|
||||
this.__openChangedAsync = window.requestAnimationFrame(function() {
|
||||
this.__openChangedAsync = null;
|
||||
this._prepareRenderOpened();
|
||||
this._renderOpened();
|
||||
|
@ -543,11 +543,11 @@ context. You should place this element as a child of `<body>` whenever possible.
|
|||
*/
|
||||
_onIronResize: function() {
|
||||
if (this.__onIronResizeAsync) {
|
||||
cancelAnimationFrame(this.__onIronResizeAsync);
|
||||
window.cancelAnimationFrame(this.__onIronResizeAsync);
|
||||
this.__onIronResizeAsync = null;
|
||||
}
|
||||
if (this.opened && !this.__isAnimating) {
|
||||
this.__onIronResizeAsync = requestAnimationFrame(function() {
|
||||
this.__onIronResizeAsync = window.requestAnimationFrame(function() {
|
||||
this.__onIronResizeAsync = null;
|
||||
this.refit();
|
||||
}.bind(this));
|
||||
|
|
|
@ -52,7 +52,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
|
||||
/**
|
||||
* The shared backdrop element.
|
||||
* @type {Element} backdropElement
|
||||
* @type {!Element} backdropElement
|
||||
*/
|
||||
get backdropElement() {
|
||||
if (!this._backdropElement) {
|
||||
|
@ -63,7 +63,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
|
||||
/**
|
||||
* The deepest active element.
|
||||
* @type {Element} activeElement the active element
|
||||
* @type {!Element} activeElement the active element
|
||||
*/
|
||||
get deepActiveElement() {
|
||||
// document.activeElement can be null
|
||||
|
@ -83,13 +83,17 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
*/
|
||||
_bringOverlayAtIndexToFront: function(i) {
|
||||
var overlay = this._overlays[i];
|
||||
if (!overlay) {
|
||||
return;
|
||||
}
|
||||
var lastI = this._overlays.length - 1;
|
||||
var currentOverlay = this._overlays[lastI];
|
||||
// Ensure always-on-top overlay stays on top.
|
||||
if (!overlay.alwaysOnTop && this._overlays[lastI].alwaysOnTop) {
|
||||
if (currentOverlay && this._shouldBeBehindOverlay(overlay, currentOverlay)) {
|
||||
lastI--;
|
||||
}
|
||||
// If already the top element, return.
|
||||
if (!overlay || i >= lastI) {
|
||||
if (i >= lastI) {
|
||||
return;
|
||||
}
|
||||
// Update z-index to be on top.
|
||||
|
@ -109,7 +113,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
/**
|
||||
* Adds the overlay and updates its z-index if it's opened, or removes it if it's closed.
|
||||
* Also updates the backdrop z-index.
|
||||
* @param {Element} overlay
|
||||
* @param {!Element} overlay
|
||||
*/
|
||||
addOrRemoveOverlay: function(overlay) {
|
||||
if (overlay.opened) {
|
||||
|
@ -123,7 +127,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
/**
|
||||
* Tracks overlays for z-index and focus management.
|
||||
* Ensures the last added overlay with always-on-top remains on top.
|
||||
* @param {Element} overlay
|
||||
* @param {!Element} overlay
|
||||
*/
|
||||
addOverlay: function(overlay) {
|
||||
var i = this._overlays.indexOf(overlay);
|
||||
|
@ -137,7 +141,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
var newZ = this._getZ(overlay);
|
||||
|
||||
// Ensure always-on-top overlay stays on top.
|
||||
if (currentOverlay && currentOverlay.alwaysOnTop && !overlay.alwaysOnTop) {
|
||||
if (currentOverlay && this._shouldBeBehindOverlay(overlay, currentOverlay)) {
|
||||
// This bumps the z-index of +2.
|
||||
this._applyOverlayZ(currentOverlay, minimumZ);
|
||||
insertionIndex--;
|
||||
|
@ -158,7 +162,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
},
|
||||
|
||||
/**
|
||||
* @param {Element} overlay
|
||||
* @param {!Element} overlay
|
||||
*/
|
||||
removeOverlay: function(overlay) {
|
||||
var i = this._overlays.indexOf(overlay);
|
||||
|
@ -276,7 +280,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
},
|
||||
|
||||
/**
|
||||
* @param {Element} element
|
||||
* @param {!Element} element
|
||||
* @param {number|string} z
|
||||
* @private
|
||||
*/
|
||||
|
@ -285,7 +289,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
},
|
||||
|
||||
/**
|
||||
* @param {Element} overlay
|
||||
* @param {!Element} overlay
|
||||
* @param {number} aboveZ
|
||||
* @private
|
||||
*/
|
||||
|
@ -365,6 +369,19 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
overlay._onCaptureTab(event);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns if the overlay1 should be behind overlay2.
|
||||
* @param {!Element} overlay1
|
||||
* @param {!Element} overlay2
|
||||
* @return {boolean}
|
||||
* @private
|
||||
*/
|
||||
_shouldBeBehindOverlay: function(overlay1, overlay2) {
|
||||
var o1 = /** @type {?} */ (overlay1);
|
||||
var o2 = /** @type {?} */ (overlay2);
|
||||
return !o1.alwaysOnTop && o2.alwaysOnTop;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -22,10 +22,10 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
<script>
|
||||
WCT.loadSuites([
|
||||
'iron-overlay-behavior.html',
|
||||
'iron-overlay-behavior.html?dom=shadow'
|
||||
'iron-overlay-behavior.html?dom=shadow',
|
||||
'iron-overlay-backdrop.html',
|
||||
'iron-overlay-backdrop.html?dom=shadow',
|
||||
]);
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
</body></html>
|
||||
|
|
94
dashboard-ui/bower_components/iron-overlay-behavior/test/iron-overlay-backdrop.html
vendored
Normal file
94
dashboard-ui/bower_components/iron-overlay-behavior/test/iron-overlay-backdrop.html
vendored
Normal file
|
@ -0,0 +1,94 @@
|
|||
<!doctype html>
|
||||
<!--
|
||||
@license
|
||||
Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
-->
|
||||
<html>
|
||||
|
||||
<head>
|
||||
|
||||
<title>iron-overlay-backdrop tests</title>
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
|
||||
|
||||
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
|
||||
|
||||
<script src="../../web-component-tester/browser.js"></script>
|
||||
<link rel="import" href="../../iron-test-helpers/iron-test-helpers.html">
|
||||
<link rel="import" href="test-overlay.html">
|
||||
|
||||
<style>
|
||||
html,
|
||||
body {
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
min-width: 0;
|
||||
}
|
||||
.sizer {
|
||||
width: 4000px;
|
||||
height: 5000px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style is="custom-style">
|
||||
iron-overlay-backdrop {
|
||||
/* For quicker tests */
|
||||
--iron-overlay-backdrop: {
|
||||
transition: none;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="sizer"></div>
|
||||
|
||||
<test-fixture id="backdrop">
|
||||
<template>
|
||||
<test-overlay with-backdrop>
|
||||
Overlay with backdrop
|
||||
</test-overlay>
|
||||
</template>
|
||||
</test-fixture>
|
||||
|
||||
<script>
|
||||
function runAfterOpen(overlay, callback) {
|
||||
overlay.addEventListener('iron-overlay-opened', callback);
|
||||
overlay.open();
|
||||
}
|
||||
|
||||
suite('overlay with backdrop', function() {
|
||||
var overlay;
|
||||
|
||||
setup(function() {
|
||||
overlay = fixture('backdrop');
|
||||
});
|
||||
|
||||
test('backdrop size matches parent size', function(done) {
|
||||
runAfterOpen(overlay, function() {
|
||||
Polymer.Base.async(function() {
|
||||
var backdrop = overlay.backdropElement;
|
||||
var parent = backdrop.parentElement;
|
||||
assert.strictEqual(backdrop.offsetWidth, parent.clientWidth, 'backdrop width matches parent width');
|
||||
assert.strictEqual(backdrop.offsetHeight, parent.clientHeight, 'backdrop height matches parent height');
|
||||
done();
|
||||
}, 1);
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
|
@ -26,14 +26,14 @@
|
|||
"web-component-tester": "*"
|
||||
},
|
||||
"private": true,
|
||||
"homepage": "https://github.com/Polymer/polymer",
|
||||
"homepage": "https://github.com/polymer/polymer",
|
||||
"_release": "1.4.0",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.4.0",
|
||||
"commit": "11c987b2eb3c73b388a79fc8aaea8ca01624f514"
|
||||
},
|
||||
"_source": "git://github.com/Polymer/polymer.git",
|
||||
"_source": "git://github.com/polymer/polymer.git",
|
||||
"_target": "^1.0.0",
|
||||
"_originalSource": "Polymer/polymer"
|
||||
"_originalSource": "polymer/polymer"
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
<div id="devicesUploadPage" data-role="page" class="page type-interior devicesPage withTabs" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Camera%20upload" data-require="scripts/devicesupload,paper-input,jqmcheckbox">
|
||||
<div id="devicesUploadPage" data-role="page" class="page type-interior devicesPage withTabs" data-helpurl="https://github.com/MediaBrowser/Wiki/wiki/Camera%20upload" data-require="scripts/devicesupload,paper-input,paper-checkbox">
|
||||
|
||||
<div data-role="content">
|
||||
<div class="content-primary">
|
||||
|
@ -24,9 +24,9 @@
|
|||
<div class="fieldDescription">${LabelCameraUploadPathHelp}</div>
|
||||
</li>
|
||||
<li>
|
||||
<label for="chkSubfolder">${LabelCreateCameraUploadSubfolder}</label>
|
||||
<input type="checkbox" id="chkSubfolder" data-mini="true" />
|
||||
<div class="fieldDescription">${LabelCreateCameraUploadSubfolderHelp}</div>
|
||||
<br />
|
||||
<paper-checkbox id="chkSubfolder">${LabelCreateCameraUploadSubfolder}</paper-checkbox>
|
||||
<div class="fieldDescription paperCheckboxFieldDescription">${LabelCreateCameraUploadSubfolderHelp}</div>
|
||||
</li>
|
||||
|
||||
</ul><br />
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
$('#txtUploadPath', page).val(config.CameraUploadPath || '');
|
||||
|
||||
$('#chkSubfolder', page).checked(config.EnableCameraUploadSubfolders).checkboxradio('refresh');
|
||||
$('#chkSubfolder', page).checked(config.EnableCameraUploadSubfolders);
|
||||
|
||||
loadDeviceList(page, devices, config);
|
||||
}
|
||||
|
@ -21,32 +21,27 @@
|
|||
|
||||
var html = '';
|
||||
|
||||
html += '<fieldset data-role="controlgroup">';
|
||||
|
||||
html += '<legend>';
|
||||
html += '<div class="paperCheckboxListLabel">';
|
||||
html += Globalize.translate('LabelEnableCameraUploadFor');
|
||||
html += '</legend>';
|
||||
html += '</div>';
|
||||
|
||||
html += '<div class="paperCheckboxList paperList">';
|
||||
|
||||
var index = 0;
|
||||
html += devices.map(function (d) {
|
||||
|
||||
var deviceHtml = '';
|
||||
|
||||
var id = "chk" + index;
|
||||
|
||||
deviceHtml += '<label for="' + id + '">';
|
||||
deviceHtml += d.Name;
|
||||
|
||||
if (d.AppName) {
|
||||
deviceHtml += '<br/><span>' + d.AppName + '</span>';
|
||||
}
|
||||
|
||||
deviceHtml += '</label>';
|
||||
|
||||
var isChecked = config.EnabledCameraUploadDevices.indexOf(d.Id) != -1;
|
||||
var checkedHtml = isChecked ? ' checked="checked"' : '';
|
||||
|
||||
deviceHtml += '<input type="checkbox" id="' + id + '" class="chkDevice" data-id="' + d.Id + '"' + checkedHtml + ' />';
|
||||
var label = d.Name;
|
||||
|
||||
if (d.AppName) {
|
||||
label += ' - ' + d.AppName;
|
||||
}
|
||||
|
||||
deviceHtml += '<paper-checkbox class="chkDevice" data-id="' + d.Id + '"' + checkedHtml + '>' + label + '</paper-checkbox>';
|
||||
|
||||
index++;
|
||||
|
||||
|
@ -54,7 +49,7 @@
|
|||
|
||||
}).join('');
|
||||
|
||||
html += '</fieldset>';
|
||||
html += '</div>';
|
||||
|
||||
html += '<div class="fieldDescription">';
|
||||
html += Globalize.translate('LabelEnableCameraUploadForHelp');
|
||||
|
@ -89,7 +84,11 @@
|
|||
|
||||
config.CameraUploadPath = $('#txtUploadPath', page).val();
|
||||
|
||||
config.EnabledCameraUploadDevices = $('.chkDevice:checked', page).get().map(function (c) {
|
||||
config.EnabledCameraUploadDevices = $('.chkDevice', page).get().filter(function (c) {
|
||||
|
||||
return c.checked;
|
||||
|
||||
}).map(function (c) {
|
||||
|
||||
return c.getAttribute('data-id');
|
||||
|
||||
|
|
|
@ -1101,6 +1101,10 @@
|
|||
return 'photos.html?topParentId=' + item.Id;
|
||||
}
|
||||
}
|
||||
else if (item.IsFolder) {
|
||||
return id ? "itemlist.html?parentId=" + id : "#";
|
||||
}
|
||||
|
||||
if (item.Type == 'CollectionFolder') {
|
||||
return 'itemlist.html?topParentId=' + item.Id + '&parentId=' + item.Id;
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
html += '</div>';
|
||||
html += '</div>';
|
||||
|
||||
html += '<div class="viewMenuBarTabs hiddenScrollX hide">';
|
||||
html += '<div class="viewMenuBarTabs hiddenScrollX">';
|
||||
html += '</div>';
|
||||
|
||||
var viewMenuBar = document.createElement('div');
|
||||
|
@ -652,45 +652,6 @@
|
|||
return getParameterByName('topParentId') || null;
|
||||
}
|
||||
|
||||
function slideDownToShow(elem) {
|
||||
|
||||
if (!elem.classList.contains('hide')) {
|
||||
return;
|
||||
}
|
||||
|
||||
elem.classList.remove('hide');
|
||||
requestAnimationFrame(function () {
|
||||
|
||||
var keyframes = [
|
||||
{ height: '0', offset: 0 },
|
||||
{ height: elem.clientHeight + 'px', offset: 1 }];
|
||||
var timing = { duration: 200, iterations: 1, easing: 'ease-out' };
|
||||
elem.animate(keyframes, timing);
|
||||
});
|
||||
}
|
||||
|
||||
function slideUpToHide(elem) {
|
||||
|
||||
if (elem.classList.contains('hide')) {
|
||||
return;
|
||||
}
|
||||
|
||||
var height = elem.clientHeight;
|
||||
|
||||
requestAnimationFrame(function () {
|
||||
|
||||
elem.innerHTML = '';
|
||||
|
||||
var keyframes = [
|
||||
{ height: height + 'px', offset: 0 },
|
||||
{ height: '0', offset: 1 }];
|
||||
var timing = { duration: 200, iterations: 1, easing: 'ease-out' };
|
||||
elem.animate(keyframes, timing).onfinish = function () {
|
||||
elem.classList.add('hide');
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
window.LibraryMenu = {
|
||||
getTopParentId: getTopParentId,
|
||||
|
||||
|
@ -766,8 +727,8 @@
|
|||
|
||||
mainDrawerPanel.classList.remove('withTallToolbar');
|
||||
viewMenuBarTabs = document.querySelector('.viewMenuBarTabs');
|
||||
slideUpToHide(viewMenuBarTabs);
|
||||
//viewMenuBarTabs.innerHTML = '';
|
||||
viewMenuBarTabs.innerHTML = '';
|
||||
viewMenuBarTabs.classList.add('hide');
|
||||
LibraryMenu.tabType = null;
|
||||
}
|
||||
return;
|
||||
|
@ -775,35 +736,28 @@
|
|||
|
||||
viewMenuBarTabs = document.querySelector('.viewMenuBarTabs');
|
||||
|
||||
if (!LibraryMenu.tabType) {
|
||||
viewMenuBarTabs.classList.remove('hide');
|
||||
}
|
||||
|
||||
if (LibraryMenu.tabType != type) {
|
||||
|
||||
require(['paper-tabs'], function() {
|
||||
require(['paper-tabs'], function () {
|
||||
|
||||
var noInk = browserInfo.animate ? '' : ' noink';
|
||||
|
||||
viewMenuBarTabs.innerHTML = '<paper-tabs selected="' + selectedIndex + '" hidescrollbuttons ' + noInk + '>' + builder().map(function(t) {
|
||||
viewMenuBarTabs.innerHTML = '<paper-tabs selected="' + selectedIndex + '" hidescrollbuttons ' + noInk + '>' + builder().map(function (t) {
|
||||
|
||||
return '<paper-tab link><a class="clearLink paperTabLink" href="' + t.href + '"><div>' + t.name + '</div></a></paper-tab>';
|
||||
|
||||
}).join('') + '</paper-tabs>';
|
||||
mainDrawerPanel.classList.add('withTallToolbar');
|
||||
|
||||
if (!LibraryMenu.tabType) {
|
||||
//viewMenuBarTabs.classList.remove('hide');
|
||||
slideDownToShow(viewMenuBarTabs);
|
||||
}
|
||||
|
||||
LibraryMenu.tabType = type;
|
||||
});
|
||||
return;
|
||||
} else {
|
||||
viewMenuBarTabs.querySelector('paper-tabs').selected = selectedIndex;
|
||||
}
|
||||
|
||||
if (!LibraryMenu.tabType) {
|
||||
//viewMenuBarTabs.classList.remove('hide');
|
||||
slideDownToShow(viewMenuBarTabs);
|
||||
}
|
||||
}
|
||||
viewMenuBarTabs.querySelector('paper-tabs').selected = selectedIndex;
|
||||
LibraryMenu.tabType = type;
|
||||
},
|
||||
|
||||
|
@ -1180,7 +1134,6 @@
|
|||
});
|
||||
|
||||
Events.on(ConnectionManager, 'localusersignedin', function (e, user) {
|
||||
requiresDrawerRefresh = true;
|
||||
setDrawerClass();
|
||||
var apiClient = ConnectionManager.getApiClient(user.ServerId);
|
||||
ConnectionManager.user(ConnectionManager.getApiClient(user.ServerId)).then(function (user) {
|
||||
|
@ -1195,14 +1148,8 @@
|
|||
}
|
||||
});
|
||||
|
||||
Events.on(ConnectionManager, 'localusersignedout', function () {
|
||||
requiresDrawerRefresh = true;
|
||||
updateUserInHeader();
|
||||
});
|
||||
|
||||
Events.on(MediaController, 'playerchange', function () {
|
||||
updateCastIcon();
|
||||
});
|
||||
Events.on(ConnectionManager, 'localusersignedout', updateUserInHeader);
|
||||
Events.on(MediaController, 'playerchange', updateCastIcon);
|
||||
|
||||
setDrawerClass();
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@
|
|||
html = LibraryBrowser.getPosterViewHtml({
|
||||
items: result.Items,
|
||||
shape: "square",
|
||||
context: 'music',
|
||||
context: 'folders',
|
||||
showTitle: true,
|
||||
showParentTitle: true,
|
||||
lazy: true,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue