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
e0322a7fe8
commit
f7a0bd8486
39 changed files with 290 additions and 262 deletions
240
dashboard-ui/bower_components/hls.js/dist/hls.js
vendored
240
dashboard-ui/bower_components/hls.js/dist/hls.js
vendored
|
@ -565,14 +565,14 @@ var LevelController = (function () {
|
|||
}
|
||||
|
||||
// only keep level with supported audio/video codecs
|
||||
levels0 = levels0.filter(function (level) {
|
||||
levels = levels.filter(function (level) {
|
||||
var checkSupported = function checkSupported(codec) {
|
||||
return MediaSource.isTypeSupported('video/mp4;codecs=' + codec);
|
||||
};
|
||||
var audioCodec = level.audioCodec,
|
||||
videoCodec = level.videoCodec;
|
||||
|
||||
return (audioCodec && checkSupported(audioCodec) || !audioCodec) && (videoCodec && checkSupported(videoCodec) || !videoCodec);
|
||||
return (!audioCodec || checkSupported(audioCodec)) && (!videoCodec || checkSupported(videoCodec));
|
||||
});
|
||||
|
||||
// start bitrate is the first bitrate of the manifest
|
||||
|
@ -2691,7 +2691,7 @@ var AACDemuxer = (function () {
|
|||
break;
|
||||
}
|
||||
}
|
||||
this.remuxer.remux(this._aacTrack, { samples: [] }, { samples: [] }, timeOffset);
|
||||
this.remuxer.remux(this._aacTrack, { samples: [] }, { samples: [{ pts: pts, dts: pts, unit: id3.payload }] }, timeOffset);
|
||||
}
|
||||
}, {
|
||||
key: '_ADTStoAudioConfig',
|
||||
|
@ -3513,7 +3513,7 @@ module.exports = exports['default'];
|
|||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', {
|
||||
value: true
|
||||
value: true
|
||||
});
|
||||
|
||||
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; }; })();
|
||||
|
@ -3525,130 +3525,136 @@ var _utilsLogger = require('../utils/logger');
|
|||
//import Hex from '../utils/hex';
|
||||
|
||||
var ID3 = (function () {
|
||||
function ID3(data) {
|
||||
_classCallCheck(this, ID3);
|
||||
function ID3(data) {
|
||||
_classCallCheck(this, ID3);
|
||||
|
||||
this._hasTimeStamp = false;
|
||||
var offset = 0,
|
||||
byte1,
|
||||
byte2,
|
||||
byte3,
|
||||
byte4,
|
||||
tagSize,
|
||||
endPos,
|
||||
header,
|
||||
len;
|
||||
do {
|
||||
header = this.readUTF(data, offset, 3);
|
||||
offset += 3;
|
||||
// first check for ID3 header
|
||||
if (header === 'ID3') {
|
||||
// skip 24 bits
|
||||
offset += 3;
|
||||
// retrieve tag(s) length
|
||||
byte1 = data[offset++] & 0x7f;
|
||||
byte2 = data[offset++] & 0x7f;
|
||||
byte3 = data[offset++] & 0x7f;
|
||||
byte4 = data[offset++] & 0x7f;
|
||||
tagSize = (byte1 << 21) + (byte2 << 14) + (byte3 << 7) + byte4;
|
||||
endPos = offset + tagSize;
|
||||
//logger.log(`ID3 tag found, size/end: ${tagSize}/${endPos}`);
|
||||
this._hasTimeStamp = false;
|
||||
var offset = 0,
|
||||
byte1,
|
||||
byte2,
|
||||
byte3,
|
||||
byte4,
|
||||
tagSize,
|
||||
endPos,
|
||||
header,
|
||||
len;
|
||||
do {
|
||||
header = this.readUTF(data, offset, 3);
|
||||
offset += 3;
|
||||
// first check for ID3 header
|
||||
if (header === 'ID3') {
|
||||
// skip 24 bits
|
||||
offset += 3;
|
||||
// retrieve tag(s) length
|
||||
byte1 = data[offset++] & 0x7f;
|
||||
byte2 = data[offset++] & 0x7f;
|
||||
byte3 = data[offset++] & 0x7f;
|
||||
byte4 = data[offset++] & 0x7f;
|
||||
tagSize = (byte1 << 21) + (byte2 << 14) + (byte3 << 7) + byte4;
|
||||
endPos = offset + tagSize;
|
||||
//logger.log(`ID3 tag found, size/end: ${tagSize}/${endPos}`);
|
||||
|
||||
// read ID3 tags
|
||||
this._parseID3Frames(data, offset, endPos);
|
||||
offset = endPos;
|
||||
} else if (header === '3DI') {
|
||||
// http://id3.org/id3v2.4.0-structure chapter 3.4. ID3v2 footer
|
||||
offset += 7;
|
||||
_utilsLogger.logger.log('3DI footer found, end: ' + offset);
|
||||
} else {
|
||||
offset -= 3;
|
||||
len = offset;
|
||||
if (len) {
|
||||
//logger.log(`ID3 len: ${len}`);
|
||||
if (!this.hasTimeStamp) {
|
||||
_utilsLogger.logger.warn('ID3 tag found, but no timestamp');
|
||||
}
|
||||
this._length = len;
|
||||
}
|
||||
return;
|
||||
}
|
||||
} while (true);
|
||||
// read ID3 tags
|
||||
this._parseID3Frames(data, offset, endPos);
|
||||
offset = endPos;
|
||||
} else if (header === '3DI') {
|
||||
// http://id3.org/id3v2.4.0-structure chapter 3.4. ID3v2 footer
|
||||
offset += 7;
|
||||
_utilsLogger.logger.log('3DI footer found, end: ' + offset);
|
||||
} else {
|
||||
offset -= 3;
|
||||
len = offset;
|
||||
if (len) {
|
||||
//logger.log(`ID3 len: ${len}`);
|
||||
if (!this.hasTimeStamp) {
|
||||
_utilsLogger.logger.warn('ID3 tag found, but no timestamp');
|
||||
}
|
||||
this._length = len;
|
||||
this._payload = data.subarray(0, len);
|
||||
}
|
||||
return;
|
||||
}
|
||||
} while (true);
|
||||
}
|
||||
|
||||
_createClass(ID3, [{
|
||||
key: 'readUTF',
|
||||
value: function readUTF(data, start, len) {
|
||||
|
||||
var result = '',
|
||||
offset = start,
|
||||
end = start + len;
|
||||
do {
|
||||
result += String.fromCharCode(data[offset++]);
|
||||
} while (offset < end);
|
||||
return result;
|
||||
}
|
||||
}, {
|
||||
key: '_parseID3Frames',
|
||||
value: function _parseID3Frames(data, offset, endPos) {
|
||||
var tagId, tagLen, tagStart, tagFlags, timestamp;
|
||||
while (offset + 8 <= endPos) {
|
||||
tagId = this.readUTF(data, offset, 4);
|
||||
offset += 4;
|
||||
|
||||
_createClass(ID3, [{
|
||||
key: 'readUTF',
|
||||
value: function readUTF(data, start, len) {
|
||||
tagLen = data[offset++] << 24 + data[offset++] << 16 + data[offset++] << 8 + data[offset++];
|
||||
|
||||
var result = '',
|
||||
offset = start,
|
||||
end = start + len;
|
||||
do {
|
||||
result += String.fromCharCode(data[offset++]);
|
||||
} while (offset < end);
|
||||
return result;
|
||||
}
|
||||
}, {
|
||||
key: '_parseID3Frames',
|
||||
value: function _parseID3Frames(data, offset, endPos) {
|
||||
var tagId, tagLen, tagStart, tagFlags, timestamp;
|
||||
while (offset + 8 <= endPos) {
|
||||
tagId = this.readUTF(data, offset, 4);
|
||||
offset += 4;
|
||||
tagFlags = data[offset++] << 8 + data[offset++];
|
||||
|
||||
tagLen = data[offset++] << 24 + data[offset++] << 16 + data[offset++] << 8 + data[offset++];
|
||||
tagStart = offset;
|
||||
//logger.log("ID3 tag id:" + tagId);
|
||||
switch (tagId) {
|
||||
case 'PRIV':
|
||||
//logger.log('parse frame:' + Hex.hexDump(data.subarray(offset,endPos)));
|
||||
// owner should be "com.apple.streaming.transportStreamTimestamp"
|
||||
if (this.readUTF(data, offset, 44) === 'com.apple.streaming.transportStreamTimestamp') {
|
||||
offset += 44;
|
||||
// smelling even better ! we found the right descriptor
|
||||
// skip null character (string end) + 3 first bytes
|
||||
offset += 4;
|
||||
|
||||
tagFlags = data[offset++] << 8 + data[offset++];
|
||||
// timestamp is 33 bit expressed as a big-endian eight-octet number, with the upper 31 bits set to zero.
|
||||
var pts33Bit = data[offset++] & 0x1;
|
||||
this._hasTimeStamp = true;
|
||||
|
||||
tagStart = offset;
|
||||
//logger.log("ID3 tag id:" + tagId);
|
||||
switch (tagId) {
|
||||
case 'PRIV':
|
||||
//logger.log('parse frame:' + Hex.hexDump(data.subarray(offset,endPos)));
|
||||
// owner should be "com.apple.streaming.transportStreamTimestamp"
|
||||
if (this.readUTF(data, offset, 44) === 'com.apple.streaming.transportStreamTimestamp') {
|
||||
offset += 44;
|
||||
// smelling even better ! we found the right descriptor
|
||||
// skip null character (string end) + 3 first bytes
|
||||
offset += 4;
|
||||
timestamp = ((data[offset++] << 23) + (data[offset++] << 15) + (data[offset++] << 7) + data[offset++]) / 45;
|
||||
|
||||
// timestamp is 33 bit expressed as a big-endian eight-octet number, with the upper 31 bits set to zero.
|
||||
var pts33Bit = data[offset++] & 0x1;
|
||||
this._hasTimeStamp = true;
|
||||
|
||||
timestamp = ((data[offset++] << 23) + (data[offset++] << 15) + (data[offset++] << 7) + data[offset++]) / 45;
|
||||
|
||||
if (pts33Bit) {
|
||||
timestamp += 47721858.84; // 2^32 / 90
|
||||
}
|
||||
timestamp = Math.round(timestamp);
|
||||
_utilsLogger.logger.trace('ID3 timestamp found: ' + timestamp);
|
||||
this._timeStamp = timestamp;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (pts33Bit) {
|
||||
timestamp += 47721858.84; // 2^32 / 90
|
||||
}
|
||||
timestamp = Math.round(timestamp);
|
||||
_utilsLogger.logger.trace('ID3 timestamp found: ' + timestamp);
|
||||
this._timeStamp = timestamp;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}, {
|
||||
key: 'hasTimeStamp',
|
||||
get: function get() {
|
||||
return this._hasTimeStamp;
|
||||
}
|
||||
}, {
|
||||
key: 'timeStamp',
|
||||
get: function get() {
|
||||
return this._timeStamp;
|
||||
}
|
||||
}, {
|
||||
key: 'length',
|
||||
get: function get() {
|
||||
return this._length;
|
||||
}
|
||||
}]);
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: 'hasTimeStamp',
|
||||
get: function get() {
|
||||
return this._hasTimeStamp;
|
||||
}
|
||||
}, {
|
||||
key: 'timeStamp',
|
||||
get: function get() {
|
||||
return this._timeStamp;
|
||||
}
|
||||
}, {
|
||||
key: 'length',
|
||||
get: function get() {
|
||||
return this._length;
|
||||
}
|
||||
}, {
|
||||
key: 'payload',
|
||||
get: function get() {
|
||||
return this._payload;
|
||||
}
|
||||
}]);
|
||||
|
||||
return ID3;
|
||||
return ID3;
|
||||
})();
|
||||
|
||||
exports['default'] = ID3;
|
||||
|
@ -5301,7 +5307,7 @@ var PlaylistLoader = (function () {
|
|||
if (avcdata.length > 2) {
|
||||
result = avcdata.shift() + '.';
|
||||
result += parseInt(avcdata.shift()).toString(16);
|
||||
result += ('00' + parseInt(avcdata.shift()).toString(16)).substr(-4);
|
||||
result += ('000' + parseInt(avcdata.shift()).toString(16)).substr(-4);
|
||||
} else {
|
||||
result = codec;
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue