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
35f69d09ea
commit
51fcbbf744
15 changed files with 114 additions and 83 deletions
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "hls.js",
|
||||
"version": "0.5.14",
|
||||
"version": "0.5.15",
|
||||
"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.14",
|
||||
"_release": "0.5.15",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v0.5.14",
|
||||
"commit": "ce96495c701482308d2cb57d50259bcd8e2bc506"
|
||||
"tag": "v0.5.15",
|
||||
"commit": "59d52b9e7661e3d97f8ec580de923d406e5a641f"
|
||||
},
|
||||
"_source": "git://github.com/dailymotion/hls.js.git",
|
||||
"_target": "~0.5.7",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "hls.js",
|
||||
"version": "0.5.14",
|
||||
"version": "0.5.15",
|
||||
"license": "Apache-2.0",
|
||||
"description": "Media Source Extension - HLS library, by/for Dailymotion",
|
||||
"homepage": "https://github.com/dailymotion/hls.js",
|
||||
|
|
78
dashboard-ui/bower_components/hls.js/dist/hls.js
vendored
78
dashboard-ui/bower_components/hls.js/dist/hls.js
vendored
|
@ -1920,7 +1920,7 @@ var StreamController = function (_EventHandler) {
|
|||
media.addEventListener('seeked', this.onvseeked);
|
||||
media.addEventListener('ended', this.onvended);
|
||||
if (this.levels && this.config.autoStartLoad) {
|
||||
this.startLoad();
|
||||
this.hls.startLoad();
|
||||
}
|
||||
}
|
||||
}, {
|
||||
|
@ -2036,7 +2036,7 @@ var StreamController = function (_EventHandler) {
|
|||
this.startLevelLoaded = false;
|
||||
this.startFragRequested = false;
|
||||
if (this.config.autoStartLoad) {
|
||||
this.startLoad();
|
||||
this.hls.startLoad();
|
||||
}
|
||||
}
|
||||
}, {
|
||||
|
@ -3191,8 +3191,7 @@ var AACDemuxer = function () {
|
|||
track.audiosamplerate = config.samplerate;
|
||||
track.channelCount = config.channelCount;
|
||||
track.codec = config.codec;
|
||||
track.timescale = config.samplerate;
|
||||
track.duration = config.samplerate * duration;
|
||||
track.duration = duration;
|
||||
_logger.logger.log('parsed codec:' + track.codec + ',rate:' + config.samplerate + ',nb channel:' + config.channelCount);
|
||||
}
|
||||
frameIndex = 0;
|
||||
|
@ -4699,8 +4698,7 @@ var TSDemuxer = function () {
|
|||
track.width = config.width;
|
||||
track.height = config.height;
|
||||
track.sps = [unit.data];
|
||||
track.timescale = _this.remuxer.timescale;
|
||||
track.duration = _this.remuxer.timescale * _this._duration;
|
||||
track.duration = _this._duration;
|
||||
var codecarray = unit.data.subarray(1, 4);
|
||||
var codecstring = 'avc1.';
|
||||
for (i = 0; i < 3; i++) {
|
||||
|
@ -4887,8 +4885,7 @@ var TSDemuxer = function () {
|
|||
track.audiosamplerate = config.samplerate;
|
||||
track.channelCount = config.channelCount;
|
||||
track.codec = config.codec;
|
||||
track.timescale = config.samplerate;
|
||||
track.duration = config.samplerate * duration;
|
||||
track.duration = duration;
|
||||
_logger.logger.log('parsed codec:' + track.codec + ',rate:' + config.samplerate + ',nb channel:' + config.channelCount);
|
||||
}
|
||||
frameIndex = 0;
|
||||
|
@ -6468,6 +6465,7 @@ var MP4 = function () {
|
|||
}, {
|
||||
key: 'mdhd',
|
||||
value: function mdhd(timescale, duration) {
|
||||
duration *= timescale;
|
||||
return MP4.box(MP4.types.mdhd, new Uint8Array([0x00, // version 0
|
||||
0x00, 0x00, 0x00, // flags
|
||||
0x00, 0x00, 0x00, 0x02, // creation_time
|
||||
|
@ -6533,6 +6531,7 @@ var MP4 = function () {
|
|||
}, {
|
||||
key: 'mvhd',
|
||||
value: function mvhd(timescale, duration) {
|
||||
duration *= timescale;
|
||||
var bytes = new Uint8Array([0x00, // version 0
|
||||
0x00, 0x00, 0x00, // flags
|
||||
0x00, 0x00, 0x00, 0x01, // creation_time
|
||||
|
@ -6681,7 +6680,7 @@ var MP4 = function () {
|
|||
key: 'tkhd',
|
||||
value: function tkhd(track) {
|
||||
var id = track.id,
|
||||
duration = track.duration,
|
||||
duration = track.duration * track.timescale,
|
||||
width = track.width,
|
||||
height = track.height;
|
||||
return MP4.box(MP4.types.tkhd, new Uint8Array([0x00, // version 0
|
||||
|
@ -6892,8 +6891,24 @@ var MP4Remuxer = function () {
|
|||
if (computePTSDTS) {
|
||||
initPTS = initDTS = Infinity;
|
||||
}
|
||||
|
||||
if (audioTrack.config && audioSamples.length) {
|
||||
audioTrack.timescale = audioTrack.audiosamplerate;
|
||||
// MP4 duration (track duration in seconds multiplied by timescale) is coded on 32 bits
|
||||
// we know that each AAC sample contains 1024 frames....
|
||||
// in order to avoid overflowing the 32 bit counter for large duration, we use smaller timescale (timescale/gcd)
|
||||
// we just need to ensure that AAC sample duration will still be an integer (will be 1024/gcd)
|
||||
if (audioTrack.timescale * audioTrack.duration > Math.pow(2, 32)) {
|
||||
(function () {
|
||||
var greatestCommonDivisor = function greatestCommonDivisor(a, b) {
|
||||
if (!b) {
|
||||
return a;
|
||||
}
|
||||
return greatestCommonDivisor(b, a % b);
|
||||
};
|
||||
audioTrack.timescale = audioTrack.audiosamplerate / greatestCommonDivisor(audioTrack.audiosamplerate, 1024);
|
||||
})();
|
||||
}
|
||||
_logger.logger.log('audio mp4 timescale :' + audioTrack.timescale);
|
||||
tracks.audio = {
|
||||
container: 'audio/mp4',
|
||||
codec: audioTrack.codec,
|
||||
|
@ -6909,6 +6924,7 @@ var MP4Remuxer = function () {
|
|||
}
|
||||
|
||||
if (videoTrack.sps && videoTrack.pps && videoSamples.length) {
|
||||
videoTrack.timescale = this.MP4_TIMESCALE;
|
||||
tracks.video = {
|
||||
container: 'video/mp4',
|
||||
codec: videoTrack.codec,
|
||||
|
@ -6992,8 +7008,13 @@ var MP4Remuxer = function () {
|
|||
}
|
||||
mp4Sample.duration = sampleDuration;
|
||||
} else {
|
||||
var nextAvcDts = this.nextAvcDts,
|
||||
delta;
|
||||
var nextAvcDts = undefined,
|
||||
delta = undefined;
|
||||
if (contiguous) {
|
||||
nextAvcDts = this.nextAvcDts;
|
||||
} else {
|
||||
nextAvcDts = timeOffset * pesTimeScale;
|
||||
}
|
||||
// first AVC sample of video track, normalize PTS/DTS
|
||||
ptsnorm = this._PTSNormalize(pts, nextAvcDts);
|
||||
dtsnorm = this._PTSNormalize(dts, nextAvcDts);
|
||||
|
@ -7079,6 +7100,7 @@ var MP4Remuxer = function () {
|
|||
pesTimeScale = this.PES_TIMESCALE,
|
||||
mp4timeScale = track.timescale,
|
||||
pes2mp4ScaleFactor = pesTimeScale / mp4timeScale,
|
||||
expectedSampleDuration = track.timescale * 1024 / track.audiosamplerate,
|
||||
aacSample,
|
||||
mp4Sample,
|
||||
unit,
|
||||
|
@ -7110,17 +7132,23 @@ var MP4Remuxer = function () {
|
|||
ptsnorm = this._PTSNormalize(pts, lastDTS);
|
||||
dtsnorm = this._PTSNormalize(dts, lastDTS);
|
||||
// let's compute sample duration.
|
||||
// there should be 1024 audio samples in one AAC frame
|
||||
// sample Duration should be close to expectedSampleDuration
|
||||
mp4Sample.duration = (dtsnorm - lastDTS) / pes2mp4ScaleFactor;
|
||||
if (Math.abs(mp4Sample.duration - 1024) > 10) {
|
||||
// not expected to happen ...
|
||||
_logger.logger.log('invalid AAC sample duration at PTS ' + Math.round(pts / 90) + ',should be 1024,found :' + Math.round(mp4Sample.duration));
|
||||
if (Math.abs(mp4Sample.duration - expectedSampleDuration) > expectedSampleDuration / 10) {
|
||||
// more than 10% diff between sample duration and expectedSampleDuration .... lets log that
|
||||
_logger.logger.log('invalid AAC sample duration at PTS ' + Math.round(pts / 90) + ',should be 1024,found :' + Math.round(mp4Sample.duration * track.audiosamplerate / track.timescale));
|
||||
}
|
||||
mp4Sample.duration = 1024;
|
||||
dtsnorm = 1024 * pes2mp4ScaleFactor + lastDTS;
|
||||
// always adjust sample duration to avoid av sync issue
|
||||
mp4Sample.duration = expectedSampleDuration;
|
||||
dtsnorm = expectedSampleDuration * pes2mp4ScaleFactor + lastDTS;
|
||||
} else {
|
||||
var nextAacPts = this.nextAacPts,
|
||||
delta;
|
||||
var nextAacPts = undefined,
|
||||
delta = undefined;
|
||||
if (contiguous) {
|
||||
nextAacPts = this.nextAacPts;
|
||||
} else {
|
||||
nextAacPts = timeOffset * pesTimeScale;
|
||||
}
|
||||
ptsnorm = this._PTSNormalize(pts, nextAacPts);
|
||||
dtsnorm = this._PTSNormalize(dts, nextAacPts);
|
||||
delta = Math.round(1000 * (ptsnorm - nextAacPts) / pesTimeScale);
|
||||
|
@ -7275,11 +7303,6 @@ var MP4Remuxer = function () {
|
|||
get: function get() {
|
||||
return false;
|
||||
}
|
||||
}, {
|
||||
key: 'timescale',
|
||||
get: function get() {
|
||||
return this.MP4_TIMESCALE;
|
||||
}
|
||||
}]);
|
||||
|
||||
return MP4Remuxer;
|
||||
|
@ -7374,11 +7397,6 @@ var PassThroughRemuxer = function () {
|
|||
get: function get() {
|
||||
return true;
|
||||
}
|
||||
}, {
|
||||
key: 'timescale',
|
||||
get: function get() {
|
||||
return 0;
|
||||
}
|
||||
}]);
|
||||
|
||||
return PassThroughRemuxer;
|
||||
|
|
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.14",
|
||||
"version": "0.5.15",
|
||||
"license": "Apache-2.0",
|
||||
"description": "Media Source Extension - HLS library, by/for Dailymotion",
|
||||
"homepage": "https://github.com/dailymotion/hls.js",
|
||||
|
|
|
@ -673,7 +673,7 @@ class StreamController extends EventHandler {
|
|||
media.addEventListener('seeked', this.onvseeked);
|
||||
media.addEventListener('ended', this.onvended);
|
||||
if(this.levels && this.config.autoStartLoad) {
|
||||
this.startLoad();
|
||||
this.hls.startLoad();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -782,7 +782,7 @@ class StreamController extends EventHandler {
|
|||
this.startLevelLoaded = false;
|
||||
this.startFragRequested = false;
|
||||
if (this.config.autoStartLoad) {
|
||||
this.startLoad();
|
||||
this.hls.startLoad();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -49,8 +49,7 @@ import ID3 from '../demux/id3';
|
|||
track.audiosamplerate = config.samplerate;
|
||||
track.channelCount = config.channelCount;
|
||||
track.codec = config.codec;
|
||||
track.timescale = config.samplerate;
|
||||
track.duration = config.samplerate * duration;
|
||||
track.duration = duration;
|
||||
logger.log(`parsed codec:${track.codec},rate:${config.samplerate},nb channel:${config.channelCount}`);
|
||||
}
|
||||
frameIndex = 0;
|
||||
|
|
|
@ -427,8 +427,7 @@
|
|||
track.width = config.width;
|
||||
track.height = config.height;
|
||||
track.sps = [unit.data];
|
||||
track.timescale = this.remuxer.timescale;
|
||||
track.duration = this.remuxer.timescale * this._duration;
|
||||
track.duration = this._duration;
|
||||
var codecarray = unit.data.subarray(1, 4);
|
||||
var codecstring = 'avc1.';
|
||||
for (i = 0; i < 3; i++) {
|
||||
|
@ -598,8 +597,7 @@
|
|||
track.audiosamplerate = config.samplerate;
|
||||
track.channelCount = config.channelCount;
|
||||
track.codec = config.codec;
|
||||
track.timescale = config.samplerate;
|
||||
track.duration = config.samplerate * duration;
|
||||
track.duration = duration;
|
||||
logger.log(`parsed codec:${track.codec},rate:${config.samplerate},nb channel:${config.channelCount}`);
|
||||
}
|
||||
frameIndex = 0;
|
||||
|
|
|
@ -12,10 +12,6 @@ class DummyRemuxer {
|
|||
return false;
|
||||
}
|
||||
|
||||
get timescale() {
|
||||
return this.PES_TIMESCALE;
|
||||
}
|
||||
|
||||
destroy() {
|
||||
}
|
||||
|
||||
|
|
|
@ -172,6 +172,7 @@ class MP4 {
|
|||
}
|
||||
|
||||
static mdhd(timescale, duration) {
|
||||
duration *= timescale;
|
||||
return MP4.box(MP4.types.mdhd, new Uint8Array([
|
||||
0x00, // version 0
|
||||
0x00, 0x00, 0x00, // flags
|
||||
|
@ -243,6 +244,7 @@ class MP4 {
|
|||
}
|
||||
|
||||
static mvhd(timescale,duration) {
|
||||
duration*=timescale;
|
||||
var
|
||||
bytes = new Uint8Array([
|
||||
0x00, // version 0
|
||||
|
@ -424,7 +426,7 @@ class MP4 {
|
|||
|
||||
static tkhd(track) {
|
||||
var id = track.id,
|
||||
duration = track.duration,
|
||||
duration = track.duration*track.timescale,
|
||||
width = track.width,
|
||||
height = track.height;
|
||||
return MP4.box(MP4.types.tkhd, new Uint8Array([
|
||||
|
|
|
@ -21,10 +21,6 @@ class MP4Remuxer {
|
|||
return false;
|
||||
}
|
||||
|
||||
get timescale() {
|
||||
return this.MP4_TIMESCALE;
|
||||
}
|
||||
|
||||
destroy() {
|
||||
}
|
||||
|
||||
|
@ -74,8 +70,22 @@ class MP4Remuxer {
|
|||
if (computePTSDTS) {
|
||||
initPTS = initDTS = Infinity;
|
||||
}
|
||||
|
||||
if (audioTrack.config && audioSamples.length) {
|
||||
audioTrack.timescale = audioTrack.audiosamplerate;
|
||||
// MP4 duration (track duration in seconds multiplied by timescale) is coded on 32 bits
|
||||
// we know that each AAC sample contains 1024 frames....
|
||||
// in order to avoid overflowing the 32 bit counter for large duration, we use smaller timescale (timescale/gcd)
|
||||
// we just need to ensure that AAC sample duration will still be an integer (will be 1024/gcd)
|
||||
if (audioTrack.timescale * audioTrack.duration > Math.pow(2, 32)) {
|
||||
let greatestCommonDivisor = function(a, b) {
|
||||
if ( ! b) {
|
||||
return a;
|
||||
}
|
||||
return greatestCommonDivisor(b, a % b);
|
||||
};
|
||||
audioTrack.timescale = audioTrack.audiosamplerate / greatestCommonDivisor(audioTrack.audiosamplerate,1024);
|
||||
}
|
||||
logger.log ('audio mp4 timescale :'+ audioTrack.timescale);
|
||||
tracks.audio = {
|
||||
container : 'audio/mp4',
|
||||
codec : audioTrack.codec,
|
||||
|
@ -91,6 +101,7 @@ class MP4Remuxer {
|
|||
}
|
||||
|
||||
if (videoTrack.sps && videoTrack.pps && videoSamples.length) {
|
||||
videoTrack.timescale = this.MP4_TIMESCALE;
|
||||
tracks.video = {
|
||||
container : 'video/mp4',
|
||||
codec : videoTrack.codec,
|
||||
|
@ -167,7 +178,12 @@ class MP4Remuxer {
|
|||
}
|
||||
mp4Sample.duration = sampleDuration;
|
||||
} else {
|
||||
var nextAvcDts = this.nextAvcDts,delta;
|
||||
let nextAvcDts, delta;
|
||||
if (contiguous) {
|
||||
nextAvcDts = this.nextAvcDts;
|
||||
} else {
|
||||
nextAvcDts = timeOffset*pesTimeScale;
|
||||
}
|
||||
// first AVC sample of video track, normalize PTS/DTS
|
||||
ptsnorm = this._PTSNormalize(pts, nextAvcDts);
|
||||
dtsnorm = this._PTSNormalize(dts, nextAvcDts);
|
||||
|
@ -252,6 +268,7 @@ class MP4Remuxer {
|
|||
pesTimeScale = this.PES_TIMESCALE,
|
||||
mp4timeScale = track.timescale,
|
||||
pes2mp4ScaleFactor = pesTimeScale/mp4timeScale,
|
||||
expectedSampleDuration = track.timescale * 1024 / track.audiosamplerate,
|
||||
aacSample, mp4Sample,
|
||||
unit,
|
||||
mdat, moof,
|
||||
|
@ -276,16 +293,22 @@ class MP4Remuxer {
|
|||
ptsnorm = this._PTSNormalize(pts, lastDTS);
|
||||
dtsnorm = this._PTSNormalize(dts, lastDTS);
|
||||
// let's compute sample duration.
|
||||
// there should be 1024 audio samples in one AAC frame
|
||||
// sample Duration should be close to expectedSampleDuration
|
||||
mp4Sample.duration = (dtsnorm - lastDTS) / pes2mp4ScaleFactor;
|
||||
if(Math.abs(mp4Sample.duration - 1024) > 10) {
|
||||
// not expected to happen ...
|
||||
logger.log(`invalid AAC sample duration at PTS ${Math.round(pts/90)},should be 1024,found :${Math.round(mp4Sample.duration)}`);
|
||||
if(Math.abs(mp4Sample.duration - expectedSampleDuration) > expectedSampleDuration/10) {
|
||||
// more than 10% diff between sample duration and expectedSampleDuration .... lets log that
|
||||
logger.log(`invalid AAC sample duration at PTS ${Math.round(pts/90)},should be 1024,found :${Math.round(mp4Sample.duration*track.audiosamplerate/track.timescale)}`);
|
||||
}
|
||||
mp4Sample.duration = 1024;
|
||||
dtsnorm = 1024 * pes2mp4ScaleFactor + lastDTS;
|
||||
// always adjust sample duration to avoid av sync issue
|
||||
mp4Sample.duration = expectedSampleDuration;
|
||||
dtsnorm = expectedSampleDuration * pes2mp4ScaleFactor + lastDTS;
|
||||
} else {
|
||||
var nextAacPts = this.nextAacPts,delta;
|
||||
let nextAacPts, delta;
|
||||
if (contiguous) {
|
||||
nextAacPts = this.nextAacPts;
|
||||
} else {
|
||||
nextAacPts = timeOffset*pesTimeScale;
|
||||
}
|
||||
ptsnorm = this._PTSNormalize(pts, nextAacPts);
|
||||
dtsnorm = this._PTSNormalize(dts, nextAacPts);
|
||||
delta = Math.round(1000 * (ptsnorm - nextAacPts) / pesTimeScale);
|
||||
|
|
|
@ -9,15 +9,10 @@ class PassThroughRemuxer {
|
|||
this.ISGenerated = false;
|
||||
}
|
||||
|
||||
|
||||
get passthrough() {
|
||||
return true;
|
||||
}
|
||||
|
||||
get timescale() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
destroy() {
|
||||
}
|
||||
|
||||
|
|
|
@ -32,14 +32,14 @@
|
|||
"web-component-tester": "^4.0.0",
|
||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||
},
|
||||
"homepage": "https://github.com/PolymerElements/iron-icon",
|
||||
"homepage": "https://github.com/polymerelements/iron-icon",
|
||||
"_release": "1.0.8",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.0.8",
|
||||
"commit": "f36b38928849ef3853db727faa8c9ef104d611eb"
|
||||
},
|
||||
"_source": "git://github.com/PolymerElements/iron-icon.git",
|
||||
"_source": "git://github.com/polymerelements/iron-icon.git",
|
||||
"_target": "^1.0.0",
|
||||
"_originalSource": "PolymerElements/iron-icon"
|
||||
"_originalSource": "polymerelements/iron-icon"
|
||||
}
|
|
@ -36,7 +36,7 @@
|
|||
"tag": "v1.3.0",
|
||||
"commit": "1662093611cda3fd29125cdab94a61d3d88093da"
|
||||
},
|
||||
"_source": "git://github.com/PolymerElements/iron-selector.git",
|
||||
"_source": "git://github.com/polymerelements/iron-selector.git",
|
||||
"_target": "^1.0.0",
|
||||
"_originalSource": "PolymerElements/iron-selector"
|
||||
"_originalSource": "polymerelements/iron-selector"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue