-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
feat: Add getCurrentPlaybackInfo method to Player #6825
base: main
Are you sure you want to change the base?
Conversation
Incremental code coverage: 36.96% |
* @return {!shaka.extern.PlaybackInfo} | ||
*/ | ||
getCurrentPlaybackInfo() { | ||
const variant = this.streamingEngine_.getCurrentVariant(); |
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 is going to get the variant that is currently being fetched, which may be different from the variant that is being used at the playhead.
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.
We don't currently track that. To solve your problem, it seems like we would need to do so first.
If we did, we would have to be careful not to create memory leaks, e.g. a timeline that maps time ranges to variants, but variant objects get recreated on every manifest refresh, and the timeline still holds references to old ones that now can't be GC'd....
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 doesn't appear to solve the problem, because we don't map the timeline to variants/streams.
Closes #6725