-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add onPlaybackRateChanged and latency to onPlayerInfoUpdated #362
Open
ryanmccartney
wants to merge
8
commits into
bbc:master
Choose a base branch
from
ryanmccartney:plugin-playback-rate
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ryanmccartney
commented
Dec 9, 2024
src/playbackstrategy/msestrategy.js
Outdated
@@ -429,6 +430,7 @@ function MSEStrategy(mediaSources, windowType, mediaKind, playbackElement, isUHD | |||
bufferLength: playerMetadata.bufferLength, | |||
playbackBitrate: playerMetadata.playbackBitrate, | |||
}) | |||
Plugins.interface.onDashMetrics(dashMetrics) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be more tightly scoped at this point if needed instead looking like.
Plugins.interface.onDvrInfoChanged(dashMetrics.getCurrentDVRInfo())
Avoids exposing unnecessary functions to the plugin interface,
… plugin-playback-rate
9ce249f
to
710c48b
Compare
PR now brought up to date with 9.0.2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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