mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
reduce traffic from play to feature
This commit is contained in:
parent
7b80b2ea32
commit
58cebe2486
18 changed files with 157 additions and 59 deletions
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "hls.js",
|
||||
"version": "0.6.17",
|
||||
"version": "0.6.18",
|
||||
"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.6.17",
|
||||
"_release": "0.6.18",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v0.6.17",
|
||||
"commit": "51624f2b19db3d1e205188d541d0e379275eef2a"
|
||||
"tag": "v0.6.18",
|
||||
"commit": "69a7a73cbc5fa2a9022c0eef8ebb603de699c4a8"
|
||||
},
|
||||
"_source": "https://github.com/dailymotion/hls.js.git",
|
||||
"_target": "^0.6.11",
|
||||
|
|
28
dashboard-ui/bower_components/hlsjs/API.md
vendored
28
dashboard-ui/bower_components/hlsjs/API.md
vendored
|
@ -185,7 +185,10 @@ Configuration parameters could be provided to hls.js upon instantiation of `Hls`
|
|||
maxBufferSize: 60*1000*1000,
|
||||
maxBufferHole: 0.5,
|
||||
maxSeekHole: 2,
|
||||
seekHoleNudgeDuration: 0.01,
|
||||
lowBufferWatchdogPeriod: 0.5,
|
||||
highBufferWatchdogPeriod: 3,
|
||||
nudgeOffset: 0.1,
|
||||
nudgeMaxRetry : 3,
|
||||
maxFragLookUpTolerance: 0.2,
|
||||
liveSyncDurationCount: 3,
|
||||
liveMaxLatencyDurationCount: 10,
|
||||
|
@ -317,10 +320,27 @@ In case no quality level with this criteria can be found (lets say for example t
|
|||
|
||||
max video loading delay used in automatic start level selection : in that mode ABR controller will ensure that video loading time (ie the time to fetch the first fragment at lowest quality level + the time to fetch the fragment at the appropriate quality level is less than ```maxLoadingDelay``` )
|
||||
|
||||
#### ```seekHoleNudgeDuration```
|
||||
(default 0.01s)
|
||||
#### ```lowBufferWatchdogPeriod```
|
||||
(default 0.5s)
|
||||
|
||||
In case playback is still stalling although a seek over buffer hole just occured, hls.js will seek to next buffer start + (number of consecutive stalls * `seekHoleNudgeDuration`) to try to restore playback.
|
||||
if media element is expected to play and if currentTime has not moved for more than ```lowBufferWatchdogPeriod``` and if there are less than `maxBufferHole` seconds buffered upfront, hls.js will try to nudge playhead to recover playback
|
||||
|
||||
#### ```highBufferWatchdogPeriod```
|
||||
(default 3s)
|
||||
|
||||
if media element is expected to play and if currentTime has not moved for more than ```highBufferWatchdogPeriod``` and if there are more than `maxBufferHole` seconds buffered upfront, hls.js will try to nudge playhead to recover playback
|
||||
|
||||
|
||||
#### ```nudgeOffset```
|
||||
(default 0.1s)
|
||||
|
||||
In case playback continues to stall after first playhead nudging, currentTime will be nudged evenmore following nudgeOffset to try to restore playback.
|
||||
media.currentTime += (nb nudge retry -1)*nudgeOffset
|
||||
|
||||
#### ```nudgeMaxRetry```
|
||||
(default 3)
|
||||
|
||||
Max nb of nudge retries before hls.js raise a fatal BUFFER_STALLED_ERROR
|
||||
|
||||
#### `maxFragLookUpTolerance`
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "hls.js",
|
||||
"version": "0.6.17",
|
||||
"version": "0.6.18",
|
||||
"license": "Apache-2.0",
|
||||
"description": "Media Source Extension - HLS library, by/for Dailymotion",
|
||||
"homepage": "https://github.com/dailymotion/hls.js",
|
||||
|
|
|
@ -78,9 +78,10 @@ design idea is pretty simple :
|
|||
- trigger BUFFER_APPENDING on FRAG_PARSING_DATA
|
||||
- once FRAG_PARSED is received an all segments have been appended (BUFFER_APPENDED) then buffer controller will recheck whether it needs to buffer more data.
|
||||
- **monitor current playback quality level** (buffer controller maintains a map between media position and quality level)
|
||||
- **monitor playback progress** : if playhead is not moving anymore although it should (video metadata is known and video is not ended, nor paused, nor in seeking state) and if we have less than 400ms buffered upfront, and if there is a new buffer range available upfront, less than config.maxSeekHole from currentTime, then hls.js will **jump over the buffer hole** and seek to the beginning of this new buffered range, to "unstuck" the playback.
|
||||
400 ms is a "magic number" that has been set to overcome browsers not always stopping playback at the exact end of a buffered range.
|
||||
- **monitor playback progress** : if playhead is not moving for more than `config.lowBufferWatchdogPeriod` although it should (video metadata is known and video is not ended, nor paused, nor in seeking state) and if we have less than 500ms buffered upfront, and if there is a new buffer range available upfront, less than `config.maxSeekHole` from currentTime, then hls.js will **jump over the buffer hole** and seek to the beginning of this new buffered range, to "unstuck" the playback.
|
||||
500 ms is a "magic number" that has been set to overcome browsers not always stopping playback at the exact end of a buffered range.
|
||||
these holes in media buffered are often encountered on stream discontinuity or on quality level switch. holes could be "large" especially if fragments are not starting with a keyframe.
|
||||
if playhead is stuck for more than `config.highBufferWatchdogPeriod` second in a buffered area, hls.js will nudge currentTime until playback recovers (it will retry every seconds, and report a fatal error after config.maxNudgeRetry retries)
|
||||
- convert non-fatal `FRAG_LOAD_ERROR`/`FRAG_LOAD_TIMEOUT`/`KEY_LOAD_ERROR`/`KEY_LOAD_TIMEOUT` error into fatal error when media position is not buffered and max load retry has been reached
|
||||
- stream controller actions are scheduled by a tick timer (invoked every 100ms) and actions are controlled by a state machine.
|
||||
- [src/controller/timeline-controller.js][]
|
||||
|
@ -253,4 +254,5 @@ design idea is pretty simple :
|
|||
- ```BUFFER_STALLED_ERROR``` is raised by [src/controller/stream-controller.js][] if playback is stalling because of buffer underrun
|
||||
- ```BUFFER_FULL_ERROR``` is raised by [src/controller/buffer-controller.js][] if sourcebuffer is full
|
||||
- ```BUFFER_SEEK_OVER_HOLE``` is raised by [src/controller/stream-controller.js][] when hls.js seeks over a buffer hole after playback stalls
|
||||
- ```BUFFER_NUDGE_ON_STALL``` is raised by [src/controller/stream-controller.js][] when hls.js nudge currentTime (when playback is stuck for more than 1s in a buffered area)
|
||||
- ```INTERNAL_EXCEPTION``` is raised by [src/event-handler.js][] when a runtime exception is triggered by an internal Hls event handler. this error is non-fatal.
|
||||
|
|
File diff suppressed because one or more lines are too long
10
dashboard-ui/bower_components/hlsjs/package.json
vendored
10
dashboard-ui/bower_components/hlsjs/package.json
vendored
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "hls.js",
|
||||
"version": "0.6.17",
|
||||
"version": "0.6.18",
|
||||
"license": "Apache-2.0",
|
||||
"description": "Media Source Extension - HLS library, by/for Dailymotion",
|
||||
"homepage": "https://github.com/dailymotion/hls.js",
|
||||
|
@ -27,7 +27,7 @@
|
|||
"watch": "watchify --debug -s Hls src/index.js -t [babelify] -o dist/hls.js",
|
||||
"pretest": "npm run lint",
|
||||
"test": "mocha --compilers js:babel-register --recursive tests/unit",
|
||||
"testfunc": "mocha --compilers js:babel-register --recursive tests/functional/auto --timeout 40000",
|
||||
"testfunc": "mocha --compilers js:babel-register tests/functional/auto/hlsjs.js --timeout 40000",
|
||||
"lint": "jshint src/",
|
||||
"serve": "http-server -p 8000 .",
|
||||
"open": "opener http://localhost:8000/demo/",
|
||||
|
@ -36,15 +36,15 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"arraybuffer-equal": "^1.0.4",
|
||||
"babel-cli": "^6.18.0",
|
||||
"babel-cli": "^6.22.1",
|
||||
"babel-preset-es2015": "^6.18.0",
|
||||
"babel-register": "^6.18.0",
|
||||
"babelify": "^7.2.0",
|
||||
"browserify": "^13.1.1",
|
||||
"browserify": "^13.2.0",
|
||||
"browserify-derequire": "^0.9.4",
|
||||
"browserify-versionify": "^1.0.6",
|
||||
"bundle-collapser": "^1.2.1",
|
||||
"chromedriver": "^2.26.1",
|
||||
"chromedriver": "^2.27.1",
|
||||
"deep-strict-equal": "^0.2.0",
|
||||
"exorcist": "^0.4.0",
|
||||
"http-server": "^0.9.0",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue