docs/design.md
Table of Contents
<!-- END doctoc generated TOC please keep comment here to allow auto update -->design idea is pretty simple :
src/controller/abr-controller.ts
stats.loaded counter)src/controller/audio-stream-controller.ts
sourcebuffer.buffered and media.currentTime.src/controller/audio-track-controller.ts
src/controller/buffer-controller.ts
src/controller/cap-level-controller.ts
src/controller/fps-controller.ts
src/controller/id3-track-controller.ts
src/controller/level-controller.ts
fragLoadingMaxRetry limit is reached.levelLoadingMaxRetry limit is reached.Feature: Media Zigzagging
If there is a backup stream, Media Zigzagging will go through all available levels in primary and backup streams. Behavior has a dual constraint, where fragment retry limits and level limits are accounted in the same time.
When the lowest level has been reached, zigzagging will be adjusted to start from the highest level until retry limits are not reached.
Where: F - Bad Fragment, L - Bad Level
Retry Recommendations
By not having multiple renditions, recovery logic will not be able to add extra value to your platform. In order to have good results for dual constraint media hunt, specify big enough limits for fragments and levels retries.
3 - 44 - 60.5 - 4 seconds), and when library returns fatal error switch to a different CDNsrc/controller/stream-controller.ts
config.highBufferWatchdogPeriod 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, one of two things will happen.
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 reachedsrc/controller/subtitle-stream-controller.ts
src/controller/subtitle-track-controller.ts
src/controller/timeline-controller.ts
src/demux/transmuxer-interface.ts
src/demux/transmuxer-worker.ts
src/controller/level-helper.ts
src/controller/fragment-tracker.ts
FRAG_PARSING_INIT_SEGMENT, FRAG_PARSING_DATA and FRAG_PARSED)src/remux/passthrough-remuxer.ts
src/utils/ewma-bandwidth-estimator.ts
MANIFEST_LOAD_ERROR is raised by src/loader/playlist-loader.ts upon xhr failure detected by src/utils/xhr-loader.ts. this error is marked as fatal only after manifestLoadingMaxRetry has been reached and will not be recovered automatically. a call to hls.loadSource(manifestURL) could help recover it.MANIFEST_LOAD_TIMEOUT is raised by src/loader/playlist-loader.ts upon xhr timeout detected by src/utils/xhr-loader.ts. this error is marked as fatal and will not be recovered automatically. a call to hls.loadSource(manifestURL) could help recover it.MANIFEST_PARSING_ERROR is raised by src/loader/playlist-loader.ts if Manifest parsing fails (no EXTM3U delimiter, no levels found in Manifest, ...)LEVEL_LOAD_ERROR is raised by src/loader/playlist-loader.ts upon xhr failure detected by src/utils/xhr-loader.ts. this error is marked as fatal only after levelLoadingMaxRetry has been reached and will not be recovered automatically. a call to hls.startLoad() could help recover it.LEVEL_LOAD_TIMEOUT is raised by src/loader/playlist-loader.ts upon xhr timeout detected by src/utils/xhr-loader.ts. this error is marked as fatal and will not be recovered automatically. a call to hls.startLoad() could help recover it.LEVEL_SWITCH_ERROR is raised by src/controller/level-controller.ts if user tries to switch to an invalid level (invalid/out of range level id)AUDIO_TRACK_LOAD_ERROR is raised by src/loader/playlist-loader.ts upon xhr failure detected by src/utils/xhr-loader.ts. this error is marked as fatal and will not be recovered automatically. a call to hls.startLoad() could help recover it.AUDIO_TRACK_LOAD_TIMEOUT is raised by src/loader/playlist-loader.ts upon xhr timeout detected by src/utils/xhr-loader.ts. this error is marked as fatal and will not be recovered automatically. a call to hls.startLoad() could help recover it.FRAG_LOAD_ERROR is raised by src/loader/fragment-loader.ts upon xhr failure detected by src/utils/xhr-loader.ts.
hls.startLoad() could help recover it.FRAG_LOAD_TIMEOUT is raised by src/loader/fragment-loader.ts upon xhr timeout detected by src/utils/xhr-loader.ts.
hls.startLoad() could help recover it.FRAG_DECRYPT_ERROR is raised by [src/demux/tranmuxer.ts][] upon fragment decrypting error. this error is fatal.FRAG_PARSING_ERROR is raised by src/demux/tsdemuxer.ts or src/demux/adts.ts upon fragment parsing error. this error is not fatal.REMUX_ALLOC_ERROR is raised by src/remux/mp4-remuxer.ts upon memory allocation error while remuxing. this error is not fatal if in auto-mode and loaded frag level is greater than 0. in that case a level switch down will occur.KEY_LOAD_ERROR is raised by src/loader/key-loader.ts upon xhr failure detected by src/utils/xhr-loader.ts.
hls.startLoad() could help recover it.KEY_LOAD_TIMEOUT is raised by src/loader/key-loader.ts upon xhr timeout detected by src/utils/xhr-loader.ts.
hls.startLoad() could help recover it.BUFFER_ADD_CODEC_ERROR is raised by src/controller/buffer-controller.ts when an exception is raised when calling mediaSource.addSourceBuffer(). this error is non fatal.BUFFER_INCOMPATIBLE_CODECS_ERROR is raised by src/controller/buffer-controller.ts when an exception is raised when all attempts to add SourceBuffer(s) failed. this error is fatal.BUFFER_APPEND_ERROR is raised by src/controller/buffer-controller.ts when an exception is raised when calling sourceBuffer.appendBuffer(). this error is non fatal and become fatal after config.appendErrorMaxRetry retries. when fatal, a call to hls.recoverMediaError() could help recover it.BUFFER_APPENDING_ERROR is raised by src/controller/buffer-controller.ts after SourceBuffer appending error. this error is fatal and a call to hls.recoverMediaError() could help recover it.BUFFER_FULL_ERROR is raised by src/controller/buffer-controller.ts if sourcebuffer is fullBUFFER_STALLED_ERROR is raised by src/controller/gap-controller.ts if playback is stalling because of buffer underrunBUFFER_SEEK_OVER_HOLE is raised by src/controller/gap-controller.ts when hls.js seeks over a buffer hole after playback stallsBUFFER_NUDGE_ON_STALL is raised by src/controller/gap-controller.ts when hls.js nudge currentTime (when playback is stuck for more than 1s in a buffered area)INTERNAL_EXCEPTION is raised by src/hls.ts when a runtime exception is triggered by an internal Hls event handler (non-fatal) or in src/demux/transmuxer-interface.ts when the demuxer worker emits an error (fatal).