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
11
dashboard-ui/bower_components/hls.js/.bower.json
vendored
11
dashboard-ui/bower_components/hls.js/.bower.json
vendored
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "hls.js",
|
||||
"version": "0.3.11",
|
||||
"version": "0.3.13",
|
||||
"description": "Media Source Extension - HLS library, by/for Dailymotion",
|
||||
"homepage": "https://github.com/dailymotion/hls.js",
|
||||
"authors": [
|
||||
|
@ -15,14 +15,13 @@
|
|||
"test",
|
||||
"tests"
|
||||
],
|
||||
"_release": "0.3.11",
|
||||
"_release": "0.3.13",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v0.3.11",
|
||||
"commit": "4e698e4adc4e1e0fa80ef9c8334a5ef382bbe347"
|
||||
"tag": "v0.3.13",
|
||||
"commit": "a7aa29605b6814b2f99c1e07db0fcb5bf9cd890a"
|
||||
},
|
||||
"_source": "git://github.com/dailymotion/hls.js.git",
|
||||
"_target": "~0.3.11",
|
||||
"_originalSource": "dailymotion/hls.js",
|
||||
"_direct": true
|
||||
"_originalSource": "dailymotion/hls.js"
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "hls.js",
|
||||
"version": "0.3.11",
|
||||
"version": "0.3.13",
|
||||
"description": "Media Source Extension - HLS library, by/for Dailymotion",
|
||||
"homepage": "https://github.com/dailymotion/hls.js",
|
||||
"authors": [
|
||||
|
|
|
@ -72,8 +72,9 @@ header {
|
|||
<div id="customButtons"></div>
|
||||
<select id="streamSelect" class="innerControls"><option value="" selected>(Enter custom URL below)</option></select>
|
||||
<input id="streamURL" class="innerControls" type=text value=""/>
|
||||
<label class="innerControls"><input id="enableStream" type=checkbox checked/> Enable Streaming</label>
|
||||
<label class="innerControls"><input id="enableStreaming" type=checkbox checked/> Enable Streaming</label>
|
||||
<label class="innerControls"><input id="autoRecoverError" type=checkbox checked/> Auto-Recover Media Error</label>
|
||||
<label class="innerControls"><input id="enableWorker" type=checkbox checked/> Enable Worker</label>
|
||||
<div id="StreamPermalink" class="innerControls"></div>
|
||||
<div>
|
||||
<select id="videoSize" style="float:left">
|
||||
|
@ -201,21 +202,25 @@ $(document).ready(function() {
|
|||
$("#StatsDisplay").hide();
|
||||
$('#metricsButtonWindow').toggle(windowSliding);
|
||||
$('#metricsButtonFixed').toggle(!windowSliding);
|
||||
$('#enableStream').click(function() { enableStreaming = this.checked; loadStream($('#streamURL').val());});
|
||||
$('#autoRecoverError').prop( "checked", true );
|
||||
$('#autoRecoverError').click(function() { autoRecoverError = this.checked; });
|
||||
$('#enableStreaming').click(function() { enableStreaming = this.checked; loadStream($('#streamURL').val()); });
|
||||
$('#autoRecoverError').click(function() { autoRecoverError = this.checked; updatePermalink();});
|
||||
$('#enableWorker').click(function() { enableWorker = this.checked; updatePermalink();});
|
||||
$('#enableStreaming').prop( "checked", enableStreaming );
|
||||
$('#autoRecoverError').prop( "checked", autoRecoverError );
|
||||
$('#enableWorker').prop( "checked", enableWorker );
|
||||
});
|
||||
|
||||
|
||||
'use strict';
|
||||
var hls,events, stats, enableStreaming = true, autoRecoverError = true;
|
||||
var hls,events, stats,
|
||||
enableStreaming = JSON.parse(getURLParam('enableStreaming',true))
|
||||
autoRecoverError = JSON.parse(getURLParam('autoRecoverError',true)),
|
||||
enableWorker = JSON.parse(getURLParam('enableWorker',true));
|
||||
var video = $('#video')[0];
|
||||
video.volume = 0.05;
|
||||
|
||||
var manifest = decodeURIComponent(location.search.split('src=')[1]);
|
||||
if(manifest === 'undefined') {
|
||||
manifest = 'http://www.streambox.fr/playlists/x36xhzz/x36xhzz.m3u8';
|
||||
}
|
||||
loadStream(manifest);
|
||||
loadStream(decodeURIComponent(getURLParam('src','http://www.streambox.fr/playlists/x36xhzz/x36xhzz.m3u8')));
|
||||
|
||||
|
||||
function loadStream(url) {
|
||||
hideCanvas();
|
||||
|
@ -230,10 +235,7 @@ $(document).ready(function() {
|
|||
}
|
||||
|
||||
$('#streamURL').val(url);
|
||||
var hlsLink = document.URL.split('?')[0] + '?src=' + encodeURIComponent(url);
|
||||
var description = 'permalink: ' + "<a href=\"" + hlsLink + "\">" + hlsLink + "</a>";
|
||||
$("#StreamPermalink").html(description);
|
||||
|
||||
updatePermalink();
|
||||
if(!enableStreaming) {
|
||||
$("#HlsStatus").text("Streaming disabled");
|
||||
return;
|
||||
|
@ -242,7 +244,7 @@ $(document).ready(function() {
|
|||
$("#HlsStatus").text('loading ' + url);
|
||||
events = { url : url, t0 : performance.now(), load : [], buffer : [], video : [], level : [], bitrate : []};
|
||||
recoverDecodingErrorDate = recoverSwapAudioCodecDate = null;
|
||||
hls = new Hls({debug:true});
|
||||
hls = new Hls({debug:true, enableWorker : enableWorker});
|
||||
$("#HlsStatus").text('loading manifest and attaching video element...');
|
||||
hls.loadSource(url);
|
||||
hls.attachMedia(video);
|
||||
|
@ -908,6 +910,25 @@ function timeRangesToString(r) {
|
|||
}
|
||||
}
|
||||
|
||||
function getURLParam(sParam, defaultValue) {
|
||||
var sPageURL = window.location.search.substring(1);
|
||||
var sURLVariables = sPageURL.split('&');
|
||||
for (var i = 0; i < sURLVariables.length; i++) {
|
||||
var sParameterName = sURLVariables[i].split('=');
|
||||
if (sParameterName[0] == sParam) {
|
||||
return sParameterName[1];
|
||||
}
|
||||
}
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
function updatePermalink() {
|
||||
var url = $('#streamURL').val();
|
||||
var hlsLink = document.URL.split('?')[0] + '?src=' + encodeURIComponent(url) + '&enableStreaming=' + enableStreaming + '&autoRecoverError=' + autoRecoverError + '&enableWorker=' + enableWorker;
|
||||
var description = 'permalink: ' + "<a href=\"" + hlsLink + "\">" + hlsLink + "</a>";
|
||||
$("#StreamPermalink").html(description);
|
||||
}
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
|
|
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
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "hls.js",
|
||||
"version": "0.3.11",
|
||||
"version": "0.3.13",
|
||||
"description": "Media Source Extension - HLS library, by/for Dailymotion",
|
||||
"homepage": "https://github.com/dailymotion/hls.js",
|
||||
"authors": "Guillaume du Pontavice <guillaume.dupontavice@dailymotion.com>",
|
||||
|
|
|
@ -65,13 +65,12 @@ class LevelController {
|
|||
}
|
||||
|
||||
// only keep level with supported audio/video codecs
|
||||
levels0 = levels0.filter(function(level) {
|
||||
levels = levels.filter(function(level) {
|
||||
var checkSupported = function(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
|
||||
|
|
|
@ -79,7 +79,7 @@ import {ErrorTypes, ErrorDetails} from '../errors';
|
|||
break;
|
||||
}
|
||||
}
|
||||
this.remuxer.remux(this._aacTrack,{samples : []}, {samples : []}, timeOffset);
|
||||
this.remuxer.remux(this._aacTrack,{samples : []}, {samples : [ { pts: pts, dts : pts, unit : id3.payload} ]}, timeOffset);
|
||||
}
|
||||
|
||||
_ADTStoAudioConfig(data, offset, audioCodec) {
|
||||
|
|
|
@ -41,6 +41,7 @@ import {logger} from '../utils/logger';
|
|||
logger.warn('ID3 tag found, but no timestamp');
|
||||
}
|
||||
this._length = len;
|
||||
this._payload = data.subarray(0,len);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@ -117,6 +118,10 @@ import {logger} from '../utils/logger';
|
|||
return this._length;
|
||||
}
|
||||
|
||||
get payload() {
|
||||
return this._payload;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export default ID3;
|
||||
|
|
|
@ -94,7 +94,7 @@ class PlaylistLoader {
|
|||
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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue