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

Video.js mangled names #497

Closed
kaba99 opened this issue Jul 19, 2015 · 4 comments
Closed

Video.js mangled names #497

kaba99 opened this issue Jul 19, 2015 · 4 comments

Comments

@kaba99
Copy link

kaba99 commented Jul 19, 2015

Can you change www/js/video.js to unmangled version, so it will be possible to use some videojs plugins without problems with method and property names.

@calzoneman
Copy link
Owner

Can you give an example of a plugin which doesn't work currently? I have not modified video.js at all from the officially distributed uglified version. If there are plugins that don't work with this, I see 2 potential problems:

  • The plugin is relying on a non-public API (i.e., undocumented features)
  • Video.js is uglifying essential property names that many plugins need to function — this would be an issue you should bring up with the video.js team

I'm willing to minify the non-uglified source code myself for a small increase in filesize as long as it doesn't break anything, but if plugins are relying on undocumented APIs that seems fragile and I don't want to continually have to 'fix' video.js in order to support plugin developers' hacks.

@kaba99
Copy link
Author

kaba99 commented Jul 19, 2015

I tried to use videojs.progressTips.js to show tooltips with the time on progressbar.
This plugin checks player.techName property to check if current player is Html5 player, and if it is not, it quits.

The current video.js version uses player.Ua property instead of player.techName, so plugin always quits because player.techName is undefined.

@calzoneman
Copy link
Owner

The video.js developers have stated their reasoning for why the techName property is not available here. I could swap out the dist file for the dev version, but I would like to reiterate that since access to that variable is explicitly not supported by the developers of video.js, it may disappear or be renamed at any time.

For what it's worth, the exact feature provided by that plugin has been merged into core for video.js 5.0 (which is not fully released yet, but I plan to upgrade CyTube to it when it is): videojs/video.js#2255.

@kaba99
Copy link
Author

kaba99 commented Jul 19, 2015

Thank you for your answers, I think it would be better to keep things as they are and wait for 5.0 video.js.

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

No branches or pull requests

2 participants