-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
hasClass() is available in dev but not in prod #1829
Comments
We're moving away from GCC for v5 (#1586), so this (and mangling issues like it) shouldn't be an issue in the near future. Just out of curiosity, what are you using |
I'm working on a plugin and I just need to check if the player is using native controls. I looked through the documentation and couldn't find a friendly way to do this so the only way I could see to check if the player is using native controls is to check the player's class for Perhaps the player or the control bar could have a |
@MMC I found what might be a better way to check if a player is using native controls: video.techName === 'Html5' && video.tech.el().controls Although it looks like the |
Since we use class names so extensively for handling view state, I think using it for this makes a lot of sense. We consider checking the tech to be a quasi-bad practice (#1234), so I would discourage going that route. That being said, I can think of a few other options that might work for you:
|
Ah I see. I had looked at the |
Yeah, the undefined bit honestly threw me for a second when I checked to make sure it was exported. I would say we should change that, but since it's technically private I guess it shouldn't matter. I'm not sure I follow the constructor / prototype bit, but I think there's a bit of confusion as to what we intend by private here. Other VJS classes internally need access to this, but it isn't intended to be used externally as we are here. Normally methods like this aren't exported by GCC and as such are actually private from the outside world, so this is a bit of a weird example. |
Sorry, I should have been more specific. It is correct to have the |
Fixed in 265ed0e |
This is another Closure Compiler problem.
videojs.Component.prototype.hasClass
exists in the dev file but not in the prod file.The text was updated successfully, but these errors were encountered: