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
5973359f39
commit
4c2a7ed02d
23 changed files with 228 additions and 129 deletions
|
@ -15,12 +15,12 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {},
|
"devDependencies": {},
|
||||||
"ignore": [],
|
"ignore": [],
|
||||||
"version": "1.0.57",
|
"version": "1.0.60",
|
||||||
"_release": "1.0.57",
|
"_release": "1.0.60",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "1.0.57",
|
"tag": "1.0.60",
|
||||||
"commit": "65e7ad0446a28e32211da1d73c241cbb6d269f75"
|
"commit": "a55e4324dc88ec5cfa9640d1f5d59228a4c7c8c8"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/MediaBrowser/emby-webcomponents.git",
|
"_source": "git://github.com/MediaBrowser/emby-webcomponents.git",
|
||||||
"_target": "~1.0.0",
|
"_target": "~1.0.0",
|
||||||
|
|
24
dashboard-ui/bower_components/emby-webcomponents/layoutmanager.js
vendored
Normal file
24
dashboard-ui/bower_components/emby-webcomponents/layoutmanager.js
vendored
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
define(['browser'], function (browser) {
|
||||||
|
|
||||||
|
function layoutManager() {
|
||||||
|
|
||||||
|
var self = this;
|
||||||
|
|
||||||
|
self.setFormFactor = function (formFactor) {
|
||||||
|
|
||||||
|
self.mobile = false;
|
||||||
|
self.tv = false;
|
||||||
|
|
||||||
|
self[formFactor] = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Take a guess at initial layout. The consuming app can override
|
||||||
|
if (browser.mobile) {
|
||||||
|
self.setFormFactor('mobile');
|
||||||
|
} else {
|
||||||
|
self.setFormFactor('desktop');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
return new layoutManager();
|
||||||
|
});
|
|
@ -1,4 +1,4 @@
|
||||||
define(['historyManager', 'focusManager', 'performanceManager', 'browser', 'paper-dialog', 'scale-up-animation', 'fade-out-animation', 'fade-in-animation', 'css!./paperdialoghelper.css'], function (historyManager, focusManager, performanceManager, browser) {
|
define(['historyManager', 'focusManager', 'performanceManager', 'browser', 'layoutManager', 'paper-dialog', 'scale-up-animation', 'fade-out-animation', 'fade-in-animation', 'css!./paperdialoghelper.css'], function (historyManager, focusManager, performanceManager, browser, layoutManager) {
|
||||||
|
|
||||||
function paperDialogHashHandler(dlg, hash, resolve) {
|
function paperDialogHashHandler(dlg, hash, resolve) {
|
||||||
|
|
||||||
|
@ -55,6 +55,13 @@
|
||||||
dlg.addEventListener('iron-overlay-closed', onDialogClosed);
|
dlg.addEventListener('iron-overlay-closed', onDialogClosed);
|
||||||
dlg.open();
|
dlg.open();
|
||||||
|
|
||||||
|
// It's not being positioned properly in firefox
|
||||||
|
if (!dlg.classList.contains('fixedSize')) {
|
||||||
|
setTimeout(function () {
|
||||||
|
dlg.refit();
|
||||||
|
}, 100);
|
||||||
|
}
|
||||||
|
|
||||||
if (dlg.getAttribute('data-lockscroll') == 'true' && !document.body.classList.contains('noScroll')) {
|
if (dlg.getAttribute('data-lockscroll') == 'true' && !document.body.classList.contains('noScroll')) {
|
||||||
document.body.classList.add('noScroll');
|
document.body.classList.add('noScroll');
|
||||||
removeScrollLockOnClose = true;
|
removeScrollLockOnClose = true;
|
||||||
|
@ -162,8 +169,10 @@
|
||||||
|
|
||||||
dlg.classList.add('scrollY');
|
dlg.classList.add('scrollY');
|
||||||
|
|
||||||
// TODO: Don't hide for mouse?
|
if (layoutManager.tv || layoutManager.mobile) {
|
||||||
|
// Need scrollbars for mouse use
|
||||||
dlg.classList.add('hiddenScroll');
|
dlg.classList.add('hiddenScroll');
|
||||||
|
}
|
||||||
|
|
||||||
if (options.removeOnClose) {
|
if (options.removeOnClose) {
|
||||||
dlg.setAttribute('data-removeonclose', 'true');
|
dlg.setAttribute('data-removeonclose', 'true');
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "hls.js",
|
"name": "hls.js",
|
||||||
"version": "0.4.9",
|
"version": "0.4.10",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"description": "Media Source Extension - HLS library, by/for Dailymotion",
|
"description": "Media Source Extension - HLS library, by/for Dailymotion",
|
||||||
"homepage": "https://github.com/dailymotion/hls.js",
|
"homepage": "https://github.com/dailymotion/hls.js",
|
||||||
|
@ -16,11 +16,11 @@
|
||||||
"test",
|
"test",
|
||||||
"tests"
|
"tests"
|
||||||
],
|
],
|
||||||
"_release": "0.4.9",
|
"_release": "0.4.10",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "v0.4.9",
|
"tag": "v0.4.10",
|
||||||
"commit": "11f271bfa1f17571756d1b4cf79271c45035bbbf"
|
"commit": "57c46a5eaa157dba3fc495236ff30a61a3ea5d89"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/dailymotion/hls.js.git",
|
"_source": "git://github.com/dailymotion/hls.js.git",
|
||||||
"_target": "~0.4.5",
|
"_target": "~0.4.5",
|
||||||
|
|
10
dashboard-ui/bower_components/hls.js/API.md
vendored
10
dashboard-ui/bower_components/hls.js/API.md
vendored
|
@ -184,6 +184,7 @@ configuration parameters could be provided to hls.js upon instantiation of Hls O
|
||||||
var config = {
|
var config = {
|
||||||
debug : false,
|
debug : false,
|
||||||
autoStartLoad : true,
|
autoStartLoad : true,
|
||||||
|
defaultAudioCodec : undefined,
|
||||||
maxBufferLength : 30,
|
maxBufferLength : 30,
|
||||||
maxMaxBufferLength : 600,
|
maxMaxBufferLength : 600,
|
||||||
maxBufferSize : 60*1000*1000,
|
maxBufferSize : 60*1000*1000,
|
||||||
|
@ -234,6 +235,15 @@ a logger object could also be provided for custom logging : ```config.debug=cust
|
||||||
- if set to true, start level playlist and first fragments will be loaded automatically, after triggering of ```Hls.Events.MANIFEST_PARSED``` event
|
- if set to true, start level playlist and first fragments will be loaded automatically, after triggering of ```Hls.Events.MANIFEST_PARSED``` event
|
||||||
- if set to false, an explicit API call (```hls.startLoad()```) will be needed to start quality level/fragment loading.
|
- if set to false, an explicit API call (```hls.startLoad()```) will be needed to start quality level/fragment loading.
|
||||||
|
|
||||||
|
#### ```defaultAudioCodec```
|
||||||
|
(default undefined)
|
||||||
|
|
||||||
|
if audio codec is not signaled in variant manifest, or if only a stream manifest is provided, hls.js tries to guess audio codec by parsing audio sampling rate in ADTS header. if sampling rate is less or equal than 22050 Hz, then hls.js assumes it is HE-AAC, otherwise it assumes it is AAC-LC. This could result in bad guess, leading to audio decode error, ending up in media error.
|
||||||
|
it is possible to hint default audiocodec to hls.js by configuring this value as below:
|
||||||
|
- ```mp4a.40.2``` (AAC-LC) or
|
||||||
|
- ```mp4a.40.5``` (HE-AAC) or
|
||||||
|
- ```undefined``` (guess based on sampling rate)
|
||||||
|
|
||||||
#### ```maxBufferLength```
|
#### ```maxBufferLength```
|
||||||
(default 30s)
|
(default 30s)
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "hls.js",
|
"name": "hls.js",
|
||||||
"version": "0.4.9",
|
"version": "0.4.10",
|
||||||
"license" : "Apache-2.0",
|
"license" : "Apache-2.0",
|
||||||
"description": "Media Source Extension - HLS library, by/for Dailymotion",
|
"description": "Media Source Extension - HLS library, by/for Dailymotion",
|
||||||
"homepage": "https://github.com/dailymotion/hls.js",
|
"homepage": "https://github.com/dailymotion/hls.js",
|
||||||
|
|
|
@ -76,6 +76,7 @@ header {
|
||||||
<label class="innerControls"><input id="autoRecoverError" type=checkbox checked/> Auto-Recover Media Error</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>
|
<label class="innerControls"><input id="enableWorker" type=checkbox checked/> Enable Worker</label>
|
||||||
<label class="innerControls">Level Capping <input id="levelCapping" type=number/></label>
|
<label class="innerControls">Level Capping <input id="levelCapping" type=number/></label>
|
||||||
|
<label class="innerControls">default Audio Codec <input id="defaultAudioCodec"/></label>
|
||||||
<div id="StreamPermalink" class="innerControls"></div>
|
<div id="StreamPermalink" class="innerControls"></div>
|
||||||
<div>
|
<div>
|
||||||
<select id="videoSize" style="float:left">
|
<select id="videoSize" style="float:left">
|
||||||
|
@ -207,10 +208,12 @@ $(document).ready(function() {
|
||||||
$('#autoRecoverError').click(function() { autoRecoverError = this.checked; updatePermalink();});
|
$('#autoRecoverError').click(function() { autoRecoverError = this.checked; updatePermalink();});
|
||||||
$('#enableWorker').click(function() { enableWorker = this.checked; updatePermalink();});
|
$('#enableWorker').click(function() { enableWorker = this.checked; updatePermalink();});
|
||||||
$('#levelCapping').change(function() { levelCapping = this.value; updatePermalink();});
|
$('#levelCapping').change(function() { levelCapping = this.value; updatePermalink();});
|
||||||
|
$('#defaultAudioCodec').change(function() { defaultAudioCodec = this.value; updatePermalink();});
|
||||||
$('#enableStreaming').prop( "checked", enableStreaming );
|
$('#enableStreaming').prop( "checked", enableStreaming );
|
||||||
$('#autoRecoverError').prop( "checked", autoRecoverError );
|
$('#autoRecoverError').prop( "checked", autoRecoverError );
|
||||||
$('#enableWorker').prop( "checked", enableWorker );
|
$('#enableWorker').prop( "checked", enableWorker );
|
||||||
$('#levelCapping').val(levelCapping);
|
$('#levelCapping').val(levelCapping);
|
||||||
|
$('#defaultAudioCodec').val(defaultAudioCodec);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
@ -218,8 +221,9 @@ $(document).ready(function() {
|
||||||
var hls,events, stats,
|
var hls,events, stats,
|
||||||
enableStreaming = JSON.parse(getURLParam('enableStreaming',true))
|
enableStreaming = JSON.parse(getURLParam('enableStreaming',true))
|
||||||
autoRecoverError = JSON.parse(getURLParam('autoRecoverError',true)),
|
autoRecoverError = JSON.parse(getURLParam('autoRecoverError',true)),
|
||||||
enableWorker = JSON.parse(getURLParam('enableWorker',true));
|
enableWorker = JSON.parse(getURLParam('enableWorker',true)),
|
||||||
levelCapping = JSON.parse(getURLParam('levelCapping',-1));
|
levelCapping = JSON.parse(getURLParam('levelCapping',-1)),
|
||||||
|
defaultAudioCodec = getURLParam('defaultAudioCodec',undefined);
|
||||||
var video = $('#video')[0];
|
var video = $('#video')[0];
|
||||||
video.volume = 0.05;
|
video.volume = 0.05;
|
||||||
|
|
||||||
|
@ -247,7 +251,7 @@ $(document).ready(function() {
|
||||||
$("#HlsStatus").text('loading ' + url);
|
$("#HlsStatus").text('loading ' + url);
|
||||||
events = { url : url, t0 : performance.now(), load : [], buffer : [], video : [], level : [], bitrate : []};
|
events = { url : url, t0 : performance.now(), load : [], buffer : [], video : [], level : [], bitrate : []};
|
||||||
recoverDecodingErrorDate = recoverSwapAudioCodecDate = null;
|
recoverDecodingErrorDate = recoverSwapAudioCodecDate = null;
|
||||||
hls = new Hls({debug:true, enableWorker : enableWorker});
|
hls = new Hls({debug:true, enableWorker : enableWorker, defaultAudioCodec : defaultAudioCodec});
|
||||||
$("#HlsStatus").text('loading manifest and attaching video element...');
|
$("#HlsStatus").text('loading manifest and attaching video element...');
|
||||||
hls.loadSource(url);
|
hls.loadSource(url);
|
||||||
hls.autoLevelCapping = levelCapping;
|
hls.autoLevelCapping = levelCapping;
|
||||||
|
@ -945,7 +949,8 @@ function timeRangesToString(r) {
|
||||||
'&enableStreaming=' + enableStreaming +
|
'&enableStreaming=' + enableStreaming +
|
||||||
'&autoRecoverError=' + autoRecoverError +
|
'&autoRecoverError=' + autoRecoverError +
|
||||||
'&enableWorker=' + enableWorker +
|
'&enableWorker=' + enableWorker +
|
||||||
'&levelCapping=' + levelCapping;
|
'&levelCapping=' + levelCapping +
|
||||||
|
'&defaultAudioCodec=' + defaultAudioCodec;
|
||||||
var description = 'permalink: ' + "<a href=\"" + hlsLink + "\">" + hlsLink + "</a>";
|
var description = 'permalink: ' + "<a href=\"" + hlsLink + "\">" + hlsLink + "</a>";
|
||||||
$("#StreamPermalink").html(description);
|
$("#StreamPermalink").html(description);
|
||||||
}
|
}
|
||||||
|
|
41
dashboard-ui/bower_components/hls.js/dist/hls.js
vendored
41
dashboard-ui/bower_components/hls.js/dist/hls.js
vendored
|
@ -1224,28 +1224,28 @@ var MSEMediaController = (function (_EventHandler) {
|
||||||
break;
|
break;
|
||||||
case State.PARSED:
|
case State.PARSED:
|
||||||
case State.APPENDING:
|
case State.APPENDING:
|
||||||
if (this.sourceBuffer) {
|
var sourceBuffer = this.sourceBuffer,
|
||||||
|
mp4segments = this.mp4segments;
|
||||||
|
if (sourceBuffer) {
|
||||||
if (this.media.error) {
|
if (this.media.error) {
|
||||||
_utilsLogger.logger.error('trying to append although a media error occured, switch to ERROR state');
|
_utilsLogger.logger.error('trying to append although a media error occured, switch to ERROR state');
|
||||||
this.state = State.ERROR;
|
this.state = State.ERROR;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// if MP4 segment appending in progress nothing to do
|
// if MP4 segment appending in progress nothing to do
|
||||||
else if (this.sourceBuffer.audio && this.sourceBuffer.audio.updating || this.sourceBuffer.video && this.sourceBuffer.video.updating) {
|
else if (sourceBuffer.audio && sourceBuffer.audio.updating || sourceBuffer.video && sourceBuffer.video.updating) {
|
||||||
//logger.log('sb append in progress');
|
//logger.log('sb append in progress');
|
||||||
// check if any MP4 segments left to append
|
// check if any MP4 segments left to append
|
||||||
} else if (this.mp4segments.length) {
|
} else if (mp4segments.length) {
|
||||||
var segment = this.mp4segments.shift();
|
var segment = mp4segments.shift();
|
||||||
try {
|
try {
|
||||||
//logger.log(`appending ${segment.type} SB, size:${segment.data.length});
|
//logger.log(`appending ${segment.type} SB, size:${segment.data.length});
|
||||||
this.sourceBuffer[segment.type].appendBuffer(segment.data);
|
sourceBuffer[segment.type].appendBuffer(segment.data);
|
||||||
this.appendError = 0;
|
this.appendError = 0;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
// in case any error occured while appending, put back segment in mp4segments table
|
// in case any error occured while appending, put back segment in mp4segments table
|
||||||
_utilsLogger.logger.error('error while trying to append buffer:' + err.message + ',try appending later');
|
_utilsLogger.logger.error('error while trying to append buffer:' + err.message + ',try appending later');
|
||||||
this.mp4segments.unshift(segment);
|
mp4segments.unshift(segment);
|
||||||
// just discard QuotaExceededError for now, and wait for the natural browser buffer eviction
|
|
||||||
//http://www.w3.org/TR/html5/infrastructure.html#quotaexceedederror
|
|
||||||
if (err.code !== 22) {
|
if (err.code !== 22) {
|
||||||
if (this.appendError) {
|
if (this.appendError) {
|
||||||
this.appendError++;
|
this.appendError++;
|
||||||
|
@ -1253,9 +1253,6 @@ var MSEMediaController = (function (_EventHandler) {
|
||||||
this.appendError = 1;
|
this.appendError = 1;
|
||||||
}
|
}
|
||||||
var event = { type: _errors.ErrorTypes.MEDIA_ERROR, details: _errors.ErrorDetails.BUFFER_APPEND_ERROR, frag: this.fragCurrent };
|
var event = { type: _errors.ErrorTypes.MEDIA_ERROR, details: _errors.ErrorDetails.BUFFER_APPEND_ERROR, frag: this.fragCurrent };
|
||||||
/* with UHD content, we could get loop of quota exceeded error until
|
|
||||||
browser is able to evict some data from sourcebuffer. retrying help recovering this
|
|
||||||
*/
|
|
||||||
if (this.appendError > this.config.appendErrorMaxRetry) {
|
if (this.appendError > this.config.appendErrorMaxRetry) {
|
||||||
_utilsLogger.logger.log('fail ' + this.config.appendErrorMaxRetry + ' times to append segment in sourceBuffer');
|
_utilsLogger.logger.log('fail ' + this.config.appendErrorMaxRetry + ' times to append segment in sourceBuffer');
|
||||||
event.fatal = true;
|
event.fatal = true;
|
||||||
|
@ -1266,6 +1263,15 @@ var MSEMediaController = (function (_EventHandler) {
|
||||||
event.fatal = false;
|
event.fatal = false;
|
||||||
hls.trigger(_events2['default'].ERROR, event);
|
hls.trigger(_events2['default'].ERROR, event);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
// handle QuotaExceededError: http://www.w3.org/TR/html5/infrastructure.html#quotaexceedederror
|
||||||
|
// let's stop appending any segments, and trigger a smooth level switch to empty buffers
|
||||||
|
// also reduce max buffer length as it might be too high. we do this to avoid loop flushing ...
|
||||||
|
mp4segments = [];
|
||||||
|
this.config.maxMaxBufferLength /= 2;
|
||||||
|
_utilsLogger.logger.warn('reduce max buffer length to ' + this.config.maxMaxBufferLength + 's and trigger a nextLevelSwitch to flush old buffer and fix QuotaExceededError');
|
||||||
|
this.nextLevelSwitch();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.state = State.APPENDING;
|
this.state = State.APPENDING;
|
||||||
|
@ -1859,7 +1865,7 @@ var MSEMediaController = (function (_EventHandler) {
|
||||||
start = fragCurrent.start,
|
start = fragCurrent.start,
|
||||||
level = fragCurrent.level,
|
level = fragCurrent.level,
|
||||||
sn = fragCurrent.sn,
|
sn = fragCurrent.sn,
|
||||||
audioCodec = currentLevel.audioCodec;
|
audioCodec = currentLevel.audioCodec || this.config.defaultAudioCodec;
|
||||||
if (this.audioCodecSwap) {
|
if (this.audioCodecSwap) {
|
||||||
_utilsLogger.logger.log('swapping playlist audio codec');
|
_utilsLogger.logger.log('swapping playlist audio codec');
|
||||||
if (audioCodec === undefined) {
|
if (audioCodec === undefined) {
|
||||||
|
@ -1962,8 +1968,17 @@ var MSEMediaController = (function (_EventHandler) {
|
||||||
key: 'onFragParsed',
|
key: 'onFragParsed',
|
||||||
value: function onFragParsed() {
|
value: function onFragParsed() {
|
||||||
if (this.state === State.PARSING) {
|
if (this.state === State.PARSING) {
|
||||||
this.state = State.PARSED;
|
|
||||||
this.stats.tparsed = performance.now();
|
this.stats.tparsed = performance.now();
|
||||||
|
|
||||||
|
var sb = this.sourceBuffer,
|
||||||
|
appending = sb.audio && sb.audio.updating || sb.video && sb.video.updating;
|
||||||
|
|
||||||
|
// if fragment parsed, and all segments appended, and no appending in progress, we are done with this fragment
|
||||||
|
if (this.mp4segments.length === 0 && !appending) {
|
||||||
|
this.state = State.IDLE;
|
||||||
|
} else {
|
||||||
|
this.state = State.PARSED;
|
||||||
|
}
|
||||||
//trigger handler right now
|
//trigger handler right now
|
||||||
this.tick();
|
this.tick();
|
||||||
}
|
}
|
||||||
|
|
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",
|
"name": "hls.js",
|
||||||
"version": "0.4.9",
|
"version": "0.4.10",
|
||||||
"license" : "Apache-2.0",
|
"license" : "Apache-2.0",
|
||||||
"description": "Media Source Extension - HLS library, by/for Dailymotion",
|
"description": "Media Source Extension - HLS library, by/for Dailymotion",
|
||||||
"homepage": "https://github.com/dailymotion/hls.js",
|
"homepage": "https://github.com/dailymotion/hls.js",
|
||||||
|
|
|
@ -390,29 +390,28 @@ class MSEMediaController extends EventHandler {
|
||||||
break;
|
break;
|
||||||
case State.PARSED:
|
case State.PARSED:
|
||||||
case State.APPENDING:
|
case State.APPENDING:
|
||||||
if (this.sourceBuffer) {
|
var sourceBuffer = this.sourceBuffer, mp4segments = this.mp4segments;
|
||||||
|
if (sourceBuffer) {
|
||||||
if (this.media.error) {
|
if (this.media.error) {
|
||||||
logger.error('trying to append although a media error occured, switch to ERROR state');
|
logger.error('trying to append although a media error occured, switch to ERROR state');
|
||||||
this.state = State.ERROR;
|
this.state = State.ERROR;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// if MP4 segment appending in progress nothing to do
|
// if MP4 segment appending in progress nothing to do
|
||||||
else if ((this.sourceBuffer.audio && this.sourceBuffer.audio.updating) ||
|
else if ((sourceBuffer.audio && sourceBuffer.audio.updating) ||
|
||||||
(this.sourceBuffer.video && this.sourceBuffer.video.updating)) {
|
(sourceBuffer.video && sourceBuffer.video.updating)) {
|
||||||
//logger.log('sb append in progress');
|
//logger.log('sb append in progress');
|
||||||
// check if any MP4 segments left to append
|
// check if any MP4 segments left to append
|
||||||
} else if (this.mp4segments.length) {
|
} else if (mp4segments.length) {
|
||||||
var segment = this.mp4segments.shift();
|
var segment = mp4segments.shift();
|
||||||
try {
|
try {
|
||||||
//logger.log(`appending ${segment.type} SB, size:${segment.data.length});
|
//logger.log(`appending ${segment.type} SB, size:${segment.data.length});
|
||||||
this.sourceBuffer[segment.type].appendBuffer(segment.data);
|
sourceBuffer[segment.type].appendBuffer(segment.data);
|
||||||
this.appendError = 0;
|
this.appendError = 0;
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
// in case any error occured while appending, put back segment in mp4segments table
|
// in case any error occured while appending, put back segment in mp4segments table
|
||||||
logger.error(`error while trying to append buffer:${err.message},try appending later`);
|
logger.error(`error while trying to append buffer:${err.message},try appending later`);
|
||||||
this.mp4segments.unshift(segment);
|
mp4segments.unshift(segment);
|
||||||
// just discard QuotaExceededError for now, and wait for the natural browser buffer eviction
|
|
||||||
//http://www.w3.org/TR/html5/infrastructure.html#quotaexceedederror
|
|
||||||
if(err.code !== 22) {
|
if(err.code !== 22) {
|
||||||
if (this.appendError) {
|
if (this.appendError) {
|
||||||
this.appendError++;
|
this.appendError++;
|
||||||
|
@ -420,9 +419,6 @@ class MSEMediaController extends EventHandler {
|
||||||
this.appendError = 1;
|
this.appendError = 1;
|
||||||
}
|
}
|
||||||
var event = {type: ErrorTypes.MEDIA_ERROR, details: ErrorDetails.BUFFER_APPEND_ERROR, frag: this.fragCurrent};
|
var event = {type: ErrorTypes.MEDIA_ERROR, details: ErrorDetails.BUFFER_APPEND_ERROR, frag: this.fragCurrent};
|
||||||
/* with UHD content, we could get loop of quota exceeded error until
|
|
||||||
browser is able to evict some data from sourcebuffer. retrying help recovering this
|
|
||||||
*/
|
|
||||||
if (this.appendError > this.config.appendErrorMaxRetry) {
|
if (this.appendError > this.config.appendErrorMaxRetry) {
|
||||||
logger.log(`fail ${this.config.appendErrorMaxRetry} times to append segment in sourceBuffer`);
|
logger.log(`fail ${this.config.appendErrorMaxRetry} times to append segment in sourceBuffer`);
|
||||||
event.fatal = true;
|
event.fatal = true;
|
||||||
|
@ -433,6 +429,15 @@ class MSEMediaController extends EventHandler {
|
||||||
event.fatal = false;
|
event.fatal = false;
|
||||||
hls.trigger(Event.ERROR, event);
|
hls.trigger(Event.ERROR, event);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
// handle QuotaExceededError: http://www.w3.org/TR/html5/infrastructure.html#quotaexceedederror
|
||||||
|
// let's stop appending any segments, and trigger a smooth level switch to empty buffers
|
||||||
|
// also reduce max buffer length as it might be too high. we do this to avoid loop flushing ...
|
||||||
|
mp4segments = [];
|
||||||
|
this.config.maxMaxBufferLength/=2;
|
||||||
|
logger.warn(`reduce max buffer length to ${this.config.maxMaxBufferLength}s and trigger a nextLevelSwitch to flush old buffer and fix QuotaExceededError`);
|
||||||
|
this.nextLevelSwitch();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.state = State.APPENDING;
|
this.state = State.APPENDING;
|
||||||
|
@ -1022,7 +1027,7 @@ class MSEMediaController extends EventHandler {
|
||||||
start = fragCurrent.start,
|
start = fragCurrent.start,
|
||||||
level = fragCurrent.level,
|
level = fragCurrent.level,
|
||||||
sn = fragCurrent.sn,
|
sn = fragCurrent.sn,
|
||||||
audioCodec = currentLevel.audioCodec;
|
audioCodec = currentLevel.audioCodec || this.config.defaultAudioCodec;
|
||||||
if(this.audioCodecSwap) {
|
if(this.audioCodecSwap) {
|
||||||
logger.log('swapping playlist audio codec');
|
logger.log('swapping playlist audio codec');
|
||||||
if(audioCodec === undefined) {
|
if(audioCodec === undefined) {
|
||||||
|
@ -1123,8 +1128,18 @@ class MSEMediaController extends EventHandler {
|
||||||
|
|
||||||
onFragParsed() {
|
onFragParsed() {
|
||||||
if (this.state === State.PARSING) {
|
if (this.state === State.PARSING) {
|
||||||
this.state = State.PARSED;
|
|
||||||
this.stats.tparsed = performance.now();
|
this.stats.tparsed = performance.now();
|
||||||
|
|
||||||
|
var sb = this.sourceBuffer,
|
||||||
|
appending = ((sb.audio && sb.audio.updating) ||
|
||||||
|
(sb.video && sb.video.updating));
|
||||||
|
|
||||||
|
// if fragment parsed, and all segments appended, and no appending in progress, we are done with this fragment
|
||||||
|
if (this.mp4segments.length === 0 && !appending) {
|
||||||
|
this.state = State.IDLE;
|
||||||
|
} else {
|
||||||
|
this.state = State.PARSED;
|
||||||
|
}
|
||||||
//trigger handler right now
|
//trigger handler right now
|
||||||
this.tick();
|
this.tick();
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,14 +26,14 @@
|
||||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||||
},
|
},
|
||||||
"main": "iron-meta.html",
|
"main": "iron-meta.html",
|
||||||
"homepage": "https://github.com/PolymerElements/iron-meta",
|
"homepage": "https://github.com/polymerelements/iron-meta",
|
||||||
"_release": "1.1.1",
|
"_release": "1.1.1",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "v1.1.1",
|
"tag": "v1.1.1",
|
||||||
"commit": "e171ee234b482219c9514e6f9551df48ef48bd9f"
|
"commit": "e171ee234b482219c9514e6f9551df48ef48bd9f"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/PolymerElements/iron-meta.git",
|
"_source": "git://github.com/polymerelements/iron-meta.git",
|
||||||
"_target": "^1.0.0",
|
"_target": "^1.0.0",
|
||||||
"_originalSource": "PolymerElements/iron-meta"
|
"_originalSource": "polymerelements/iron-meta"
|
||||||
}
|
}
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "iron-pages",
|
"name": "iron-pages",
|
||||||
"version": "1.0.6",
|
"version": "1.0.7",
|
||||||
"license": "http://polymer.github.io/LICENSE.txt",
|
"license": "http://polymer.github.io/LICENSE.txt",
|
||||||
"description": "Organizes a set of pages and shows one at a time",
|
"description": "Organizes a set of pages and shows one at a time",
|
||||||
"main": "iron-pages.html",
|
"main": "iron-pages.html",
|
||||||
|
@ -19,24 +19,24 @@
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"iron-resizable-behavior": "polymerelements/iron-resizable-behavior#^1.0.0",
|
"iron-resizable-behavior": "polymerelements/iron-resizable-behavior#^1.0.0",
|
||||||
"iron-demo-helpers": "polymerelements/iron-demo-helpers#^1.0.0",
|
|
||||||
"iron-selector": "polymerelements/iron-selector#^1.0.0",
|
"iron-selector": "polymerelements/iron-selector#^1.0.0",
|
||||||
"polymer": "Polymer/polymer#^1.0.0"
|
"polymer": "Polymer/polymer#^1.1.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"paper-styles": "polymerelements/paper-styles#^1.0.2",
|
|
||||||
"iron-component-page": "polymerelements/iron-component-page#^1.0.0",
|
"iron-component-page": "polymerelements/iron-component-page#^1.0.0",
|
||||||
|
"iron-demo-helpers": "polymerelements/iron-demo-helpers#^1.0.0",
|
||||||
|
"paper-styles": "polymerelements/paper-styles#^1.0.2",
|
||||||
"test-fixture": "polymerelements/test-fixture#^1.0.0",
|
"test-fixture": "polymerelements/test-fixture#^1.0.0",
|
||||||
"web-component-tester": "^4.0.0",
|
"web-component-tester": "^4.0.0",
|
||||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||||
},
|
},
|
||||||
"ignore": [],
|
"ignore": [],
|
||||||
"homepage": "https://github.com/PolymerElements/iron-pages",
|
"homepage": "https://github.com/PolymerElements/iron-pages",
|
||||||
"_release": "1.0.6",
|
"_release": "1.0.7",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "v1.0.6",
|
"tag": "v1.0.7",
|
||||||
"commit": "efd2e94f4bc4d3c3041833346285df3784670559"
|
"commit": "357acb8508da5093b22887a85cb785919c20cfde"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/PolymerElements/iron-pages.git",
|
"_source": "git://github.com/PolymerElements/iron-pages.git",
|
||||||
"_target": "~1.0.2",
|
"_target": "~1.0.2",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "iron-pages",
|
"name": "iron-pages",
|
||||||
"version": "1.0.6",
|
"version": "1.0.7",
|
||||||
"license": "http://polymer.github.io/LICENSE.txt",
|
"license": "http://polymer.github.io/LICENSE.txt",
|
||||||
"description": "Organizes a set of pages and shows one at a time",
|
"description": "Organizes a set of pages and shows one at a time",
|
||||||
"main": "iron-pages.html",
|
"main": "iron-pages.html",
|
||||||
|
@ -19,13 +19,13 @@
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"iron-resizable-behavior": "polymerelements/iron-resizable-behavior#^1.0.0",
|
"iron-resizable-behavior": "polymerelements/iron-resizable-behavior#^1.0.0",
|
||||||
"iron-demo-helpers": "polymerelements/iron-demo-helpers#^1.0.0",
|
|
||||||
"iron-selector": "polymerelements/iron-selector#^1.0.0",
|
"iron-selector": "polymerelements/iron-selector#^1.0.0",
|
||||||
"polymer": "Polymer/polymer#^1.0.0"
|
"polymer": "Polymer/polymer#^1.1.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"paper-styles": "polymerelements/paper-styles#^1.0.2",
|
|
||||||
"iron-component-page": "polymerelements/iron-component-page#^1.0.0",
|
"iron-component-page": "polymerelements/iron-component-page#^1.0.0",
|
||||||
|
"iron-demo-helpers": "polymerelements/iron-demo-helpers#^1.0.0",
|
||||||
|
"paper-styles": "polymerelements/paper-styles#^1.0.2",
|
||||||
"test-fixture": "polymerelements/test-fixture#^1.0.0",
|
"test-fixture": "polymerelements/test-fixture#^1.0.0",
|
||||||
"web-component-tester": "^4.0.0",
|
"web-component-tester": "^4.0.0",
|
||||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||||
|
|
|
@ -38,8 +38,8 @@ Example:
|
||||||
|
|
||||||
<dom-module id="iron-pages">
|
<dom-module id="iron-pages">
|
||||||
|
|
||||||
|
<template>
|
||||||
<style>
|
<style>
|
||||||
|
|
||||||
:host {
|
:host {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
@ -47,19 +47,12 @@ Example:
|
||||||
:host > ::content > :not(.iron-selected) {
|
:host > ::content > :not(.iron-selected) {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<template>
|
|
||||||
|
|
||||||
<content></content>
|
<content></content>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
</dom-module>
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
Polymer({
|
Polymer({
|
||||||
|
|
||||||
is: 'iron-pages',
|
is: 'iron-pages',
|
||||||
|
@ -92,3 +85,4 @@ Example:
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
</dom-module>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "marked-element",
|
"name": "marked-element",
|
||||||
"version": "1.1.2",
|
"version": "1.1.3",
|
||||||
"description": "Element wrapper for the marked library",
|
"description": "Element wrapper for the marked library",
|
||||||
"private": true,
|
"private": true,
|
||||||
"authors": [
|
"authors": [
|
||||||
|
@ -33,11 +33,11 @@
|
||||||
},
|
},
|
||||||
"ignore": [],
|
"ignore": [],
|
||||||
"homepage": "https://github.com/polymerelements/marked-element",
|
"homepage": "https://github.com/polymerelements/marked-element",
|
||||||
"_release": "1.1.2",
|
"_release": "1.1.3",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "v1.1.2",
|
"tag": "v1.1.3",
|
||||||
"commit": "6e55c2290ad89a520a25a88f3fafc49b8d654c68"
|
"commit": "19b30d7151b2420cf84387b6711d9042cbb29c26"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/polymerelements/marked-element.git",
|
"_source": "git://github.com/polymerelements/marked-element.git",
|
||||||
"_target": "^1.0.0",
|
"_target": "^1.0.0",
|
||||||
|
|
|
@ -51,14 +51,14 @@ Polymer Elements are built in the open, and the Polymer authors eagerly encourag
|
||||||
|
|
||||||
When submitting pull requests, please provide:
|
When submitting pull requests, please provide:
|
||||||
|
|
||||||
1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues using the following syntax:
|
1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax:
|
||||||
|
|
||||||
```markdown
|
```markdown
|
||||||
(For a single issue)
|
(For a single issue)
|
||||||
Fixes #20
|
Fixes #20
|
||||||
|
|
||||||
(For multiple issues)
|
(For multiple issues)
|
||||||
Fixes #32, #40
|
Fixes #32, fixes #40
|
||||||
```
|
```
|
||||||
|
|
||||||
2. **A succinct description of the design** used to fix any related issues. For example:
|
2. **A succinct description of the design** used to fix any related issues. For example:
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "marked-element",
|
"name": "marked-element",
|
||||||
"version": "1.1.2",
|
"version": "1.1.3",
|
||||||
"description": "Element wrapper for the marked library",
|
"description": "Element wrapper for the marked library",
|
||||||
"private": true,
|
"private": true,
|
||||||
"authors": [
|
"authors": [
|
||||||
|
|
|
@ -158,7 +158,7 @@ as you would a regular DOM element:
|
||||||
* Unindents the markdown source that will be rendered.
|
* Unindents the markdown source that will be rendered.
|
||||||
*/
|
*/
|
||||||
unindent: function(text) {
|
unindent: function(text) {
|
||||||
this._unindent(text);
|
return this._unindent(text);
|
||||||
},
|
},
|
||||||
|
|
||||||
get outputElement () {
|
get outputElement () {
|
||||||
|
@ -171,6 +171,14 @@ as you would a regular DOM element:
|
||||||
return this.$.content;
|
return this.$.content;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The `marked-render-complete` event is fired once Markdown to HTML
|
||||||
|
* conversion has finished, and the DOM has been populated via the resulting
|
||||||
|
* HTML.
|
||||||
|
*
|
||||||
|
* @event marked-render-complete
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Renders `markdown` into this element's DOM.
|
* Renders `markdown` into this element's DOM.
|
||||||
*
|
*
|
||||||
|
@ -193,6 +201,7 @@ as you would a regular DOM element:
|
||||||
smartypants: this.smartypants
|
smartypants: this.smartypants
|
||||||
};
|
};
|
||||||
Polymer.dom(this._outputElement).innerHTML = marked(this.markdown, opts);
|
Polymer.dom(this._outputElement).innerHTML = marked(this.markdown, opts);
|
||||||
|
this.fire('marked-render-complete');
|
||||||
},
|
},
|
||||||
|
|
||||||
_highlight: function(code, lang) {
|
_highlight: function(code, lang) {
|
||||||
|
@ -212,7 +221,7 @@ as you would a regular DOM element:
|
||||||
}, null);
|
}, null);
|
||||||
|
|
||||||
return lines.map(function(l) { return l.substr(indent); }).join('\n');
|
return lines.map(function(l) { return l.substr(indent); }).join('\n');
|
||||||
},
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
<!doctype html>
|
<!DOCTYPE html><!--
|
||||||
<!--
|
|
||||||
@license
|
@license
|
||||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
Copyright (c) 2015 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
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||||
|
@ -7,9 +6,7 @@ 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
|
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
|
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
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||||
-->
|
--><html><head>
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
|
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
|
||||||
<title>Tests</title>
|
<title>Tests</title>
|
||||||
|
@ -18,8 +15,10 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
<body>
|
<body>
|
||||||
<script>
|
<script>
|
||||||
WCT.loadSuites([
|
WCT.loadSuites([
|
||||||
'marked-element.html'
|
'marked-element.html',
|
||||||
|
'marked-element.html?dom=shadow'
|
||||||
]);
|
]);
|
||||||
</script>
|
</script>
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
</body></html>
|
||||||
|
|
|
@ -241,6 +241,24 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
suite('events', function() {
|
||||||
|
var markedElement;
|
||||||
|
var outputElement;
|
||||||
|
|
||||||
|
setup(function() {
|
||||||
|
markedElement = fixture('CamelCaseHTML');
|
||||||
|
outputElement = document.getElementById('output');
|
||||||
|
});
|
||||||
|
|
||||||
|
test('render() fires marked-render-complete', function(done) {
|
||||||
|
markedElement.addEventListener('marked-render-complete', function() {
|
||||||
|
expect(outputElement.innerHTML).to.not.equal('');
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
markedElement.render();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
|
@ -1853,6 +1853,7 @@ var AppInfo = {};
|
||||||
connectservice: apiClientBowerPath + '/connectservice',
|
connectservice: apiClientBowerPath + '/connectservice',
|
||||||
hammer: bowerPath + "/hammerjs/hammer.min",
|
hammer: bowerPath + "/hammerjs/hammer.min",
|
||||||
performanceManager: embyWebComponentsBowerPath + "/performancemanager",
|
performanceManager: embyWebComponentsBowerPath + "/performancemanager",
|
||||||
|
layoutManager: embyWebComponentsBowerPath + "/layoutmanager",
|
||||||
focusManager: embyWebComponentsBowerPath + "/focusmanager",
|
focusManager: embyWebComponentsBowerPath + "/focusmanager",
|
||||||
imageLoader: embyWebComponentsBowerPath + "/images/imagehelper"
|
imageLoader: embyWebComponentsBowerPath + "/images/imagehelper"
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue