1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

update components

This commit is contained in:
Luke Pulverenti 2016-03-27 19:22:53 -04:00
parent 8c738547c6
commit 52f247c51a
29 changed files with 185 additions and 402 deletions

View file

@ -1,6 +1,6 @@
{
"name": "hls.js",
"version": "0.5.16",
"version": "0.5.17",
"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.16",
"_release": "0.5.17",
"_resolution": {
"type": "version",
"tag": "v0.5.16",
"commit": "a7df764cb21cf306bf4fe7c54ae68c8e4cd30f51"
"tag": "v0.5.17",
"commit": "c8657dbcf4d48d72fab954ee0b23583311bc0b5b"
},
"_source": "git://github.com/dailymotion/hls.js.git",
"_target": "~0.5.7",

View file

@ -191,6 +191,7 @@ configuration parameters could be provided to hls.js upon instantiation of Hls O
maxBufferSize : 60*1000*1000,
maxBufferHole : 0.3,
maxSeekHole : 2,
seekHoleNudgeDuration : 0.01,
maxFragLookUpTolerance : 0.2,
liveSyncDurationCount : 3,
liveMaxLatencyDurationCount: 10,
@ -276,6 +277,13 @@ in case playback is stalled, and a buffered range is available upfront, less tha
hls.js will jump over this buffer hole to reach the beginning of this following buffered range.
```maxSeekHole``` allows to configure this jumpable threshold.
#### ```seekHoleNudgeDuration```
(default 0.01s)
in case playback is still stalling although a seek over buffer hole just occured, hls.js will seek to next buffer start + (nb of consecutive stalls * seekHoleNudgeDuration to try to restore playback
#### ```maxFragLookUpTolerance```
(default 0.2s)

View file

@ -1,6 +1,6 @@
{
"name": "hls.js",
"version": "0.5.16",
"version": "0.5.17",
"license": "Apache-2.0",
"description": "Media Source Extension - HLS library, by/for Dailymotion",
"homepage": "https://github.com/dailymotion/hls.js",

View file

@ -2512,12 +2512,16 @@ var StreamController = function (_EventHandler) {
if (playheadMoving || !expectedPlaying) {
// playhead moving or media not playing
jumpThreshold = 0;
this.seekHoleNudgeDuration = 0;
} else {
// playhead not moving AND media expected to play
if (!this.stalled) {
this.seekHoleNudgeDuration = 0;
_logger.logger.log('playback seems stuck @' + currentTime);
this.hls.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.MEDIA_ERROR, details: _errors.ErrorDetails.BUFFER_STALLED_ERROR, fatal: false });
this.stalled = true;
} else {
this.seekHoleNudgeDuration += this.config.seekHoleNudgeDuration;
}
}
// if we are below threshold, try to jump if next buffer range is close
@ -2528,8 +2532,8 @@ var StreamController = function (_EventHandler) {
if (nextBufferStart && delta < this.config.maxSeekHole && delta > 0 && !media.seeking) {
// next buffer is close ! adjust currentTime to nextBufferStart
// this will ensure effective video decoding
_logger.logger.log('adjust currentTime from ' + media.currentTime + ' to next buffered @ ' + nextBufferStart);
media.currentTime = nextBufferStart;
_logger.logger.log('adjust currentTime from ' + media.currentTime + ' to next buffered @ ' + nextBufferStart + ' + nudge ' + this.seekHoleNudgeDuration);
media.currentTime = nextBufferStart + this.seekHoleNudgeDuration;
this.hls.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.MEDIA_ERROR, details: _errors.ErrorDetails.BUFFER_SEEK_OVER_HOLE, fatal: false });
}
}
@ -5657,6 +5661,7 @@ var Hls = function () {
maxBufferSize: 60 * 1000 * 1000,
maxBufferHole: 0.5,
maxSeekHole: 2,
seekHoleNudgeDuration: 0.01,
maxFragLookUpTolerance: 0.2,
liveSyncDurationCount: 3,
liveMaxLatencyDurationCount: Infinity,
@ -7088,13 +7093,15 @@ var MP4Remuxer = function () {
if (!this.ISGenerated) {
this.generateIS(audioTrack, videoTrack, timeOffset);
}
//logger.log('nb AVC samples:' + videoTrack.samples.length);
if (videoTrack.samples.length) {
this.remuxVideo(videoTrack, timeOffset, contiguous);
}
//logger.log('nb AAC samples:' + audioTrack.samples.length);
if (audioTrack.samples.length) {
this.remuxAudio(audioTrack, timeOffset, contiguous);
if (this.ISGenerated) {
//logger.log('nb AVC samples:' + videoTrack.samples.length);
if (videoTrack.samples.length) {
this.remuxVideo(videoTrack, timeOffset, contiguous);
}
//logger.log('nb AAC samples:' + audioTrack.samples.length);
if (audioTrack.samples.length) {
this.remuxAudio(audioTrack, timeOffset, contiguous);
}
}
//logger.log('nb ID3 samples:' + audioTrack.samples.length);
if (id3Track.samples.length) {
@ -7172,15 +7179,15 @@ var MP4Remuxer = function () {
}
}
if (!Object.keys(tracks)) {
observer.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.MEDIA_ERROR, details: _errors.ErrorDetails.FRAG_PARSING_ERROR, fatal: false, reason: 'no audio/video samples found' });
} else {
if (Object.keys(tracks).length) {
observer.trigger(_events2.default.FRAG_PARSING_INIT_SEGMENT, data);
this.ISGenerated = true;
if (computePTSDTS) {
this._initPTS = initPTS;
this._initDTS = initDTS;
}
} else {
observer.trigger(_events2.default.ERROR, { type: _errors.ErrorTypes.MEDIA_ERROR, details: _errors.ErrorDetails.FRAG_PARSING_ERROR, fatal: false, reason: 'no audio/video samples found' });
}
}
}, {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1,5 +1,5 @@
#/bin/sh
git checkout gh-pages
git rebase master
git rebase v0.5.x
git push origin gh-pages --force
git checkout master
git checkout v0.5.x

View file

@ -1,6 +1,6 @@
{
"name": "hls.js",
"version": "0.5.16",
"version": "0.5.17",
"license": "Apache-2.0",
"description": "Media Source Extension - HLS library, by/for Dailymotion",
"homepage": "https://github.com/dailymotion/hls.js",

View file

@ -1007,12 +1007,16 @@ _checkBuffer() {
if(playheadMoving || !expectedPlaying) {
// playhead moving or media not playing
jumpThreshold = 0;
this.seekHoleNudgeDuration = 0;
} else {
// playhead not moving AND media expected to play
if(!this.stalled) {
this.seekHoleNudgeDuration = 0;
logger.log(`playback seems stuck @${currentTime}`);
this.hls.trigger(Event.ERROR, {type: ErrorTypes.MEDIA_ERROR, details: ErrorDetails.BUFFER_STALLED_ERROR, fatal: false});
this.stalled = true;
} else {
this.seekHoleNudgeDuration += this.config.seekHoleNudgeDuration;
}
}
// if we are below threshold, try to jump if next buffer range is close
@ -1025,8 +1029,8 @@ _checkBuffer() {
!media.seeking) {
// next buffer is close ! adjust currentTime to nextBufferStart
// this will ensure effective video decoding
logger.log(`adjust currentTime from ${media.currentTime} to next buffered @ ${nextBufferStart}`);
media.currentTime = nextBufferStart;
logger.log(`adjust currentTime from ${media.currentTime} to next buffered @ ${nextBufferStart} + nudge ${this.seekHoleNudgeDuration}`);
media.currentTime = nextBufferStart + this.seekHoleNudgeDuration;
this.hls.trigger(Event.ERROR, {type: ErrorTypes.MEDIA_ERROR, details: ErrorDetails.BUFFER_SEEK_OVER_HOLE, fatal: false});
}
}

View file

@ -47,6 +47,7 @@ class Hls {
maxBufferSize: 60 * 1000 * 1000,
maxBufferHole: 0.5,
maxSeekHole: 2,
seekHoleNudgeDuration : 0.01,
maxFragLookUpTolerance : 0.2,
liveSyncDurationCount:3,
liveMaxLatencyDurationCount: Infinity,

View file

@ -37,13 +37,15 @@ class MP4Remuxer {
if (!this.ISGenerated) {
this.generateIS(audioTrack,videoTrack,timeOffset);
}
//logger.log('nb AVC samples:' + videoTrack.samples.length);
if (videoTrack.samples.length) {
this.remuxVideo(videoTrack,timeOffset,contiguous);
}
//logger.log('nb AAC samples:' + audioTrack.samples.length);
if (audioTrack.samples.length) {
this.remuxAudio(audioTrack,timeOffset,contiguous);
if (this.ISGenerated) {
//logger.log('nb AVC samples:' + videoTrack.samples.length);
if (videoTrack.samples.length) {
this.remuxVideo(videoTrack,timeOffset,contiguous);
}
//logger.log('nb AAC samples:' + audioTrack.samples.length);
if (audioTrack.samples.length) {
this.remuxAudio(audioTrack,timeOffset,contiguous);
}
}
//logger.log('nb ID3 samples:' + audioTrack.samples.length);
if (id3Track.samples.length) {
@ -117,15 +119,15 @@ class MP4Remuxer {
}
}
if(!Object.keys(tracks)) {
observer.trigger(Event.ERROR, {type : ErrorTypes.MEDIA_ERROR, details: ErrorDetails.FRAG_PARSING_ERROR, fatal: false, reason: 'no audio/video samples found'});
} else {
if(Object.keys(tracks).length) {
observer.trigger(Event.FRAG_PARSING_INIT_SEGMENT,data);
this.ISGenerated = true;
if (computePTSDTS) {
this._initPTS = initPTS;
this._initDTS = initDTS;
}
} else {
observer.trigger(Event.ERROR, {type : ErrorTypes.MEDIA_ERROR, details: ErrorDetails.FRAG_PARSING_ERROR, fatal: false, reason: 'no audio/video samples found'});
}
}