mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
commit
6ff5d6b822
11 changed files with 108 additions and 69 deletions
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "hls.js",
|
||||
"version": "0.5.29",
|
||||
"version": "0.5.30",
|
||||
"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.29",
|
||||
"_release": "0.5.30",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v0.5.29",
|
||||
"commit": "d787e32fed3a72930f4f94f08dce8692dcec0755"
|
||||
"tag": "v0.5.30",
|
||||
"commit": "c8eab206bbd77040cbe9f35f64303775c2065608"
|
||||
},
|
||||
"_source": "git://github.com/dailymotion/hls.js.git",
|
||||
"_target": "~0.5.7",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "hls.js",
|
||||
"version": "0.5.29",
|
||||
"version": "0.5.30",
|
||||
"license": "Apache-2.0",
|
||||
"description": "Media Source Extension - HLS library, by/for Dailymotion",
|
||||
"homepage": "https://github.com/dailymotion/hls.js",
|
||||
|
|
72
dashboard-ui/bower_components/hls.js/dist/hls.js
vendored
72
dashboard-ui/bower_components/hls.js/dist/hls.js
vendored
|
@ -693,9 +693,14 @@ var BufferController = function (_EventHandler) {
|
|||
ms.removeEventListener('sourceopen', this.onmso);
|
||||
ms.removeEventListener('sourceended', this.onmse);
|
||||
ms.removeEventListener('sourceclose', this.onmsc);
|
||||
// unlink MediaSource from video tag
|
||||
this.media.src = '';
|
||||
this.media.removeAttribute('src');
|
||||
|
||||
try {
|
||||
// unlink MediaSource from video tag
|
||||
this.media.src = '';
|
||||
this.media.removeAttribute('src');
|
||||
} catch (err) {
|
||||
_logger.logger.warn('onMediaDetaching:' + err.message + ' while unlinking video.src');
|
||||
}
|
||||
this.mediaSource = null;
|
||||
this.media = null;
|
||||
this.pendingTracks = null;
|
||||
|
@ -1191,7 +1196,7 @@ var LevelController = function (_EventHandler) {
|
|||
key: 'destroy',
|
||||
value: function destroy() {
|
||||
if (this.timer) {
|
||||
clearInterval(this.timer);
|
||||
clearTimeout(this.timer);
|
||||
this.timer = null;
|
||||
}
|
||||
this._manualLevel = -1;
|
||||
|
@ -1291,17 +1296,18 @@ var LevelController = function (_EventHandler) {
|
|||
}, {
|
||||
key: 'setLevelInternal',
|
||||
value: function setLevelInternal(newLevel) {
|
||||
var levels = this._levels;
|
||||
// check if level idx is valid
|
||||
if (newLevel >= 0 && newLevel < this._levels.length) {
|
||||
if (newLevel >= 0 && newLevel < levels.length) {
|
||||
// stopping live reloading timer if any
|
||||
if (this.timer) {
|
||||
clearInterval(this.timer);
|
||||
clearTimeout(this.timer);
|
||||
this.timer = null;
|
||||
}
|
||||
this._level = newLevel;
|
||||
_logger.logger.log('switching to level ' + newLevel);
|
||||
this.hls.trigger(_events2.default.LEVEL_SWITCH, { level: newLevel });
|
||||
var level = this._levels[newLevel];
|
||||
var level = levels[newLevel];
|
||||
// check if we need to load playlist for this level
|
||||
if (level.details === undefined || level.details.live === true) {
|
||||
// level not retrieved yet, or live playlist we need to (re)load it
|
||||
|
@ -1366,7 +1372,7 @@ var LevelController = function (_EventHandler) {
|
|||
this._level = undefined;
|
||||
// stopping live reloading timer if any
|
||||
if (this.timer) {
|
||||
clearInterval(this.timer);
|
||||
clearTimeout(this.timer);
|
||||
this.timer = null;
|
||||
}
|
||||
// redispatch same error but with fatal set to true
|
||||
|
@ -1379,16 +1385,30 @@ var LevelController = function (_EventHandler) {
|
|||
}, {
|
||||
key: 'onLevelLoaded',
|
||||
value: function onLevelLoaded(data) {
|
||||
// check if current playlist is a live playlist
|
||||
if (data.details.live && !this.timer) {
|
||||
// if live playlist we will have to reload it periodically
|
||||
// set reload period to playlist target duration
|
||||
this.timer = setInterval(this.ontick, 1000 * data.details.targetduration);
|
||||
}
|
||||
if (!data.details.live && this.timer) {
|
||||
// playlist is not live and timer is armed : stopping it
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
// only process level loaded events matching with expected level
|
||||
if (data.level === this._level) {
|
||||
var newDetails = data.details;
|
||||
// if current playlist is a live playlist, arm a timer to reload it
|
||||
if (newDetails.live) {
|
||||
var reloadInterval = 1000 * newDetails.targetduration,
|
||||
curLevel = this._levels[data.level],
|
||||
curDetails = curLevel.details;
|
||||
if (curDetails && newDetails.endSN === curDetails.endSN) {
|
||||
// follow HLS Spec, If the client reloads a Playlist file and finds that it has not
|
||||
// changed then it MUST wait for a period of one-half the target
|
||||
// duration before retrying.
|
||||
reloadInterval /= 2;
|
||||
_logger.logger.log('same live playlist, reload twice faster');
|
||||
}
|
||||
// decrement reloadInterval with level loading delay
|
||||
reloadInterval -= performance.now() - data.stats.trequest;
|
||||
// in any case, don't reload more than every second
|
||||
reloadInterval = Math.max(1000, Math.round(reloadInterval));
|
||||
_logger.logger.log('live playlist, reload in ' + reloadInterval + ' ms');
|
||||
this.timer = setTimeout(this.ontick, reloadInterval);
|
||||
} else {
|
||||
this.timer = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}, {
|
||||
|
@ -1412,8 +1432,11 @@ var LevelController = function (_EventHandler) {
|
|||
return this._level;
|
||||
},
|
||||
set: function set(newLevel) {
|
||||
if (this._levels && this._levels.length > newLevel && (this._level !== newLevel || this._levels[newLevel].details === undefined)) {
|
||||
this.setLevelInternal(newLevel);
|
||||
var levels = this._levels;
|
||||
if (levels && levels.length > newLevel) {
|
||||
if (this._level !== newLevel || levels[newLevel].details === undefined) {
|
||||
this.setLevelInternal(newLevel);
|
||||
}
|
||||
}
|
||||
}
|
||||
}, {
|
||||
|
@ -1423,6 +1446,9 @@ var LevelController = function (_EventHandler) {
|
|||
},
|
||||
set: function set(newLevel) {
|
||||
this._manualLevel = newLevel;
|
||||
if (this._startLevel === undefined) {
|
||||
this._startLevel = newLevel;
|
||||
}
|
||||
if (newLevel !== -1) {
|
||||
this.level = newLevel;
|
||||
}
|
||||
|
@ -5460,12 +5486,6 @@ var BufferHelper = function () {
|
|||
buffered2.push(buffered[i]);
|
||||
}
|
||||
}
|
||||
|
||||
// in case current position is located before buffered time ranges, report area as not buffered
|
||||
if (buffered2.length && pos < buffered2[0].start) {
|
||||
return { len: 0, start: pos, end: pos, nextStart: buffered2[0].start };
|
||||
}
|
||||
|
||||
for (i = 0, bufferLen = 0, bufferStart = bufferEnd = pos; i < buffered2.length; i++) {
|
||||
var start = buffered2[i].start,
|
||||
end = buffered2[i].end;
|
||||
|
|
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.29",
|
||||
"version": "0.5.30",
|
||||
"license": "Apache-2.0",
|
||||
"description": "Media Source Extension - HLS library, by/for Dailymotion",
|
||||
"homepage": "https://github.com/dailymotion/hls.js",
|
||||
|
|
|
@ -63,9 +63,14 @@ class BufferController extends EventHandler {
|
|||
ms.removeEventListener('sourceopen', this.onmso);
|
||||
ms.removeEventListener('sourceended', this.onmse);
|
||||
ms.removeEventListener('sourceclose', this.onmsc);
|
||||
// unlink MediaSource from video tag
|
||||
this.media.src = '';
|
||||
this.media.removeAttribute('src');
|
||||
|
||||
try {
|
||||
// unlink MediaSource from video tag
|
||||
this.media.src = '';
|
||||
this.media.removeAttribute('src');
|
||||
} catch(err) {
|
||||
logger.warn(`onMediaDetaching:${err.message} while unlinking video.src`);
|
||||
}
|
||||
this.mediaSource = null;
|
||||
this.media = null;
|
||||
this.pendingTracks = null;
|
||||
|
|
|
@ -20,7 +20,7 @@ class LevelController extends EventHandler {
|
|||
|
||||
destroy() {
|
||||
if (this.timer) {
|
||||
clearInterval(this.timer);
|
||||
clearTimeout(this.timer);
|
||||
this.timer = null;
|
||||
}
|
||||
this._manualLevel = -1;
|
||||
|
@ -113,24 +113,27 @@ class LevelController extends EventHandler {
|
|||
}
|
||||
|
||||
set level(newLevel) {
|
||||
if (this._levels && this._levels.length > newLevel &&
|
||||
(this._level !== newLevel || this._levels[newLevel].details === undefined)) {
|
||||
this.setLevelInternal(newLevel);
|
||||
let levels = this._levels;
|
||||
if (levels && levels.length > newLevel) {
|
||||
if (this._level !== newLevel || levels[newLevel].details === undefined) {
|
||||
this.setLevelInternal(newLevel);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
setLevelInternal(newLevel) {
|
||||
let levels = this._levels;
|
||||
// check if level idx is valid
|
||||
if (newLevel >= 0 && newLevel < this._levels.length) {
|
||||
if (newLevel >= 0 && newLevel < levels.length) {
|
||||
// stopping live reloading timer if any
|
||||
if (this.timer) {
|
||||
clearInterval(this.timer);
|
||||
clearTimeout(this.timer);
|
||||
this.timer = null;
|
||||
}
|
||||
this._level = newLevel;
|
||||
logger.log(`switching to level ${newLevel}`);
|
||||
this.hls.trigger(Event.LEVEL_SWITCH, {level: newLevel});
|
||||
var level = this._levels[newLevel];
|
||||
var level = levels[newLevel];
|
||||
// check if we need to load playlist for this level
|
||||
if (level.details === undefined || level.details.live === true) {
|
||||
// level not retrieved yet, or live playlist we need to (re)load it
|
||||
|
@ -150,6 +153,9 @@ class LevelController extends EventHandler {
|
|||
|
||||
set manualLevel(newLevel) {
|
||||
this._manualLevel = newLevel;
|
||||
if (this._startLevel === undefined) {
|
||||
this._startLevel = newLevel;
|
||||
}
|
||||
if (newLevel !== -1) {
|
||||
this.level = newLevel;
|
||||
}
|
||||
|
@ -222,7 +228,7 @@ class LevelController extends EventHandler {
|
|||
this._level = undefined;
|
||||
// stopping live reloading timer if any
|
||||
if (this.timer) {
|
||||
clearInterval(this.timer);
|
||||
clearTimeout(this.timer);
|
||||
this.timer = null;
|
||||
}
|
||||
// redispatch same error but with fatal set to true
|
||||
|
@ -234,16 +240,30 @@ class LevelController extends EventHandler {
|
|||
}
|
||||
|
||||
onLevelLoaded(data) {
|
||||
// check if current playlist is a live playlist
|
||||
if (data.details.live && !this.timer) {
|
||||
// if live playlist we will have to reload it periodically
|
||||
// set reload period to playlist target duration
|
||||
this.timer = setInterval(this.ontick, 1000 * data.details.targetduration);
|
||||
}
|
||||
if (!data.details.live && this.timer) {
|
||||
// playlist is not live and timer is armed : stopping it
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
// only process level loaded events matching with expected level
|
||||
if (data.level === this._level) {
|
||||
let newDetails = data.details;
|
||||
// if current playlist is a live playlist, arm a timer to reload it
|
||||
if (newDetails.live) {
|
||||
let reloadInterval = 1000*newDetails.targetduration,
|
||||
curLevel = this._levels[data.level],
|
||||
curDetails = curLevel.details;
|
||||
if (curDetails && newDetails.endSN === curDetails.endSN) {
|
||||
// follow HLS Spec, If the client reloads a Playlist file and finds that it has not
|
||||
// changed then it MUST wait for a period of one-half the target
|
||||
// duration before retrying.
|
||||
reloadInterval /=2;
|
||||
logger.log(`same live playlist, reload twice faster`);
|
||||
}
|
||||
// decrement reloadInterval with level loading delay
|
||||
reloadInterval -= performance.now() - data.stats.trequest;
|
||||
// in any case, don't reload more than every second
|
||||
reloadInterval = Math.max(1000,Math.round(reloadInterval));
|
||||
logger.log(`live playlist, reload in ${reloadInterval} ms`);
|
||||
this.timer = setTimeout(this.ontick,reloadInterval);
|
||||
} else {
|
||||
this.timer = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -55,12 +55,6 @@ class BufferHelper {
|
|||
buffered2.push(buffered[i]);
|
||||
}
|
||||
}
|
||||
|
||||
// in case current position is located before buffered time ranges, report area as not buffered
|
||||
if (buffered2.length && pos < buffered2[0].start) {
|
||||
return {len: 0, start: pos, end: pos, nextStart : buffered2[0].start};
|
||||
}
|
||||
|
||||
for (i = 0, bufferLen = 0, bufferStart = bufferEnd = pos; i < buffered2.length; i++) {
|
||||
var start = buffered2[i].start,
|
||||
end = buffered2[i].end;
|
||||
|
|
|
@ -193,7 +193,7 @@
|
|||
if (item.Status != 'Success') {
|
||||
|
||||
html += '<button type="button" is="paper-icon-button-light" data-resultid="' + item.Id + '" class="btnProcessResult organizerButton" title="' + Globalize.translate('ButtonOrganizeFile') + '"><iron-icon icon="folder"></iron-icon></button>';
|
||||
html += '<button type="button" is="paper-icon-button-light" data-resultid="' + item.Id + '" class="btnDeleteResult organizerButton" title="' + Globalize.translate('ButtonDeleteFile') + '"></iron-icon></button>';
|
||||
html += '<button type="button" is="paper-icon-button-light" data-resultid="' + item.Id + '" class="btnDeleteResult organizerButton" title="' + Globalize.translate('ButtonDeleteFile') + '"><iron-icon icon="delete"></iron-icon></button>';
|
||||
}
|
||||
|
||||
html += '</td>';
|
||||
|
|
|
@ -2920,7 +2920,7 @@ var AppInfo = {};
|
|||
|
||||
defineRoute({
|
||||
path: '/tv.html',
|
||||
dependencies: ['paper-checkbox', 'paper-button', 'paper-icon-button-light', 'material-design-lite'],
|
||||
dependencies: ['paper-checkbox', 'paper-button', 'paper-icon-button-light', 'paper-tabs'],
|
||||
autoFocus: false,
|
||||
controller: 'scripts/tvrecommended'
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue