Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Improves the logging system so it works with log levels (as requested in #2601).
A couple of methods have been created in Debug class to allow developers to set/retrieve the log level:
Debug.setLogLevel
Debug.getLogLevel
The following log levels are supported:
dashjs.Debug.LOG_LEVEL_DEBUG
: what we have today. Everything.dashjs.Debug.LOG_LEVEL_INFO
: key events (ex: segment loaded, bitrate changes).dashjs.Debug.LOG_LEVEL_WARNING
: (ex: timecode jumping, fetch is not available, EME not available, adaptations set that are not supported, semantic problems with the mpd that dont avoid playback to start).dashjs.Debug.LOG_LEVEL_ERROR
: errors that don't stop playback (ex: segment 404, codec errors - fallback).dashjs.Debug.LOG_LEVEL_FATAL
: Playback fails completely (codecs not supported).With the new approach, any dash.js class that wants to use the new Logger has to create its own Logger instance. Example:
Additionally:
Debug.setLogToBrowserConsole
has been deprecated and will be removed two versions after current one (v2.7.0)Debug.getLogToBrowserConsole
has been deprecated and will be removed two versions after current one (v2.7.0)Event Events.LOG
has been deprecated and will be removed two versions after current one (v2.7.0)Documentation, definition file and unit tests updated.