Expose PLAYBACK_RATE_CHANGED to the plugin interface #362
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.
📺 What
Exposes PLAYBACK_RATE_CHANGED event from Dash.js to the plugin interface - part of larger work to support low-latency playback. This change allows information on the current playback rate to be captured.
Additionally, it also adds
onDashMetrics
to the plugin interface to expose more detailed player information to the plugin. Specifically, this would be used to determine the current latency as follows;These are important for identifying any devices which have problems with low-latency playback.
E.g.) If logs suggest the playback rate is greater than 1.0 but the latency reported does not reduce we can reasonably assume that the device is struggling to playback at the speed requested by the player.
🛠 How
Adds an additional event
PLAYBACK_RATE_CHANGED
toDashJSEvents
in theMSEStrategy
. On this event being triggered it is passed to a newly added plugin functionPlugins.interface.onPlaybackRateChanged
.Also adds a plugin interface
Plugins.interface.onDashMetrics
to an existing eventMETRIC_ADDED
to provide more detailed access to metrics with plugins. This could potentially be more tightly scoped toonDvrInfoChanged
.✅ Testing
No new tested added for this change, happy to add any ones deemed necessary on review.
Test Guidelines