-
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
Setting the src is not synchronous #2326
Comments
Hmmm...that would appear be the result of #1667 and #2188. We may want Do we really need every function passed to ready(fn) to be triggered asynchronously, or do we just want the initial ready to happen async and then anything after that could be synchronous? If we could do the latter that would fix this issue. |
Yeah, I think this introduces a lot of accidental asynchronicity that will make things much more complicated. Another possibility would be to make the "public" version asynchronous but convert all internal usage to a synchronous version. |
Yeah, that could do it. Have a |
For 5.0 we switched ready() to always execute listeners asynchronously, but for most internal use cases we would prefer the ready function to execute immediately if the component is already ready. Fixes videojs#2326 Related: videojs#2382, videojs#1667, videojs#2188
@heff it looks like #2392 didn't completely fix setting the source synchronously for the Flash tech because we're still setting it in an async ready handler on construction. |
@dmlap that block sets sync=true (second arg) so it shouldn't be working any differently than 4.12 now. When that specific code runs the swf object is never ready. If we're trying to improve on the previous functionality then, we'll probably have to cache the source value and return that while the swf boots up. |
Oops... I missed the |
Even when the tech is ready, setting the source doesn't take effect at the tech level for one tick because it's wrapped in a call to ready()
The text was updated successfully, but these errors were encountered: