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

Extracting the players codec at a particular instance in time #2832

Closed
rdailey98 opened this issue Sep 1, 2020 · 6 comments
Closed

Extracting the players codec at a particular instance in time #2832

rdailey98 opened this issue Sep 1, 2020 · 6 comments
Labels
status: archived Archived and locked; will not be updated type: question A question from the community

Comments

@rdailey98
Copy link

Have you read the Tutorials?
Yes

Have you read the FAQ and checked for duplicate open issues?
Yes

What version of Shaka Player are you using?
v3.0.2

Please ask your question
Looking to extract the codec the player is using at a given instance in time for telemetry event purposes. Is there a function or event that can help achieve this?

  • getStats() seemed to be useful at first glance but unfortunately contains no info about the current codec.
  • There's the shaka.Player.StreamingEvent, although for our purposes it would be counter intuitive to parse an event in order to fire off an other event.
  • There's the Stream object, however this contains a list of codecs not the current one being used.

Any help would be greatly appreciated - please let me know if I'm overlooking anything.

@rdailey98 rdailey98 added the type: question A question from the community label Sep 1, 2020
@TheModMaker
Copy link
Contributor

We don't support codec switching, so the array will only contain one kind of codec. They may have different profiles, but they should have the same base codec. You should use player.getVariantTracks() to get the tracks, the codecs field will have the array of codecs. Unfortunately due to Period flattening, there is no way to determine which is being used.

@TheModMaker
Copy link
Contributor

Actually looking over our definitions, I don't know why the codecs field would be an array, it should be a string. In the Track definition, it will have two codecs (e.g. vp09,opus), for audio+video; but there is also the audioCodec/videoCodec fields.

@rdailey98
Copy link
Author

Looking for a bit more clarification - One of the DASH features for example is multi-codec support (suppose I had a manifest with AVC and HEVC tracks). If I were to make a call on getVariantTracks() would the returned array have a single unique codec (i.e. AVC or HEVC) or would it still contain both?

@TheModMaker
Copy link
Contributor

Until we support codec switching (#1528), we filter out codecs that don't match the initial codec selected. We pick the initial codec based on browser support and on bandwidth; once we pick a codec, we filter out all other codecs so you'll only see choices for one.

@shaka-bot
Copy link
Collaborator

@rdailey98 Does this answer all your questions? Can we close the issue?

@shaka-bot shaka-bot added the status: waiting on response Waiting on a response from the reporter(s) of the issue label Sep 11, 2020
@shaka-bot
Copy link
Collaborator

Closing due to inactivity. If this is still an issue for you or if you have further questions, you can ask us to reopen or have the bot reopen it by including @shaka-bot reopen in a comment.

@shaka-bot shaka-bot removed the status: waiting on response Waiting on a response from the reporter(s) of the issue label Sep 18, 2020
@shaka-project shaka-project locked and limited conversation to collaborators Nov 17, 2020
@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Apr 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: archived Archived and locked; will not be updated type: question A question from the community
Projects
None yet
Development

No branches or pull requests

3 participants