Skip to content
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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

theodab
Copy link
Collaborator

@theodab theodab commented Jun 14, 2024

Closes #6725

@theodab theodab added the type: enhancement New feature or request label Jun 14, 2024
@theodab theodab requested a review from avelad June 14, 2024 09:07
@avelad avelad added the priority: P3 Useful but not urgent label Jun 14, 2024
@avelad avelad added this to the v4.10 milestone Jun 14, 2024
@shaka-bot
Copy link
Collaborator

shaka-bot commented Jun 14, 2024

Incremental code coverage: 36.96%

* @return {!shaka.extern.PlaybackInfo}
*/
getCurrentPlaybackInfo() {
const variant = this.streamingEngine_.getCurrentVariant();
Copy link
Contributor

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.

Copy link
Member

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....

Copy link
Member

@joeyparrish joeyparrish left a 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.

@avelad avelad modified the milestones: v4.10, v4.11 Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: P3 Useful but not urgent type: enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How can I query for the active codec and bandwidth being played in a mixed-codec, multi-period manifest?
5 participants