-
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
Fixed vertical slider check when obfuscated #1303
Conversation
In #477, support for vertical slider computation was added. The config check breaks when obfuscated, it ends up being something like `if(a.j.Wd)` I've just started to familiarize myself with the code-base, but I believe `this.options().vertical` is the correct way to check an option. This should solve the obfuscation issue.
|
The difference being I see there are some instances in the code where code like Ignoring the fact that it's breaking on obfuscation, Edit: changed the property to a string. Kept the |
Well, it's supposed to be a internal to videojs, so, any videojs code can use it. Just don't use it outside (also, because it wont exist outside, you can't use it anyway). But I guess this is fine too, since they are equivalent. Also, thanks for the PR! |
lgtm! |
There are a lot of places in the code where you could save 3 bytes by switching from array notation to dot notation. Here's one place where the two are intermixed. Although, apparently the minifying code fixes this anyway. LINE 6146: vjs.TEST_VID['volume'] = 0.5; |
The array notation is necessary in some places where vars need to be external. Otherwise closure compiler aggressively mangles them. The volume example sneaks by because closure compiler has a default set of 'externs', the protect html-defined properties (including video element properties like volume) from getting mangled. |
Thank you! |
No problem. |
In #477, support for vertical slider computation was added.
The config check breaks when obfuscated, it ends up being something like
if(a.j.Wd)
I've just started to familiarize myself with the code-base, but I believe
this.options().vertical
is the correct way to check an option. This should solve the obfuscation issue.