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

Getting the currently playing resolution #78

Open
mrjackcitrus opened this issue Dec 5, 2021 · 2 comments
Open

Getting the currently playing resolution #78

mrjackcitrus opened this issue Dec 5, 2021 · 2 comments

Comments

@mrjackcitrus
Copy link

mrjackcitrus commented Dec 5, 2021

If a user selects a resolution, how can I know what resolution the current playback is? Is this possible? For example, obtaining the "label" of the currently playing clip.

As a (failed) workaround, I have a filename structure which includes the resolution. I tried using player.currentSrc() to give me the url of the currently playing video but this only returns the default video url and not the one that is necessarily playing after the resolution is switched.

This may or may not be a bug so thought I'd flag it here.

I'm using Video JS in conjunction with its official playlist plugin in case that makes any difference to the above observations.

Thanks.

@Jazzman1976
Copy link

Need the same. We would like to show the current source label instead the gear icon on the button.

@dennisbohn
Copy link

Did you try player.currentSource() instead of player.currentSrc()?

It returns the source object.
https://docs.videojs.com/Player.html#currentSource

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants