-
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
Remove method-chaining capabilities for player.currentTime #3704
Comments
I think we all agree that we should either do nothing or remove all method-chaining capabilities from video.js. Presuming we remove method-chaining capabilities, one thing we need to discuss is what to do about returning a
|
I really like solution 2, but maybe we could make it check if |
Yep, agreed. |
Solution 2 sounds right to me, too. |
Sounds pretty uncontroversial, then. |
Method chaining can save some repetitious typing when using the player APIs:
Unfortunately, switching return types between different function invocations confuses Javascript optimizers and often means the method remains de-optimized. For methods that may be called very frequently during player interactions like currentTime, de-optimized functions that take 10s of milliseconds can lead to frame drops.
The text was updated successfully, but these errors were encountered: