clappr / clappr-level-selector-plugin

Clappr Level Selector Plugin
MIT License
76 stars 56 forks source link

Bind playback events only when core is ready. Fixes #18 #19

Closed gfronza closed 8 years ago

gfronza commented 8 years ago

Wait for the event CORE_READY before listening for playback events.

I'm not sure that this is the best way to address this problem. Maybe UICorePlugin should be responsible for calling this.bindEvents() only when core is ready. But I don't know if that would create side effects for other ui core based plugins.

leandromoreira commented 8 years ago

@gfronza you're fast, thanks!!!

We've discussed that (leave to XCorePlugin to delay bindEvents) and initially we think it's best for the clients to do that. I mean, when you need to listen to a container event from a core plugin you need to wait until it's ready, anyway thanks I did a test yesterday (but using CORE_CONTAINERS_CREATED) if CORE_READY is enough we're good to go

leandromoreira commented 8 years ago

@gfronza do you have anything new, I'm thinking about a new release (since the last one is buggy)

gfronza commented 8 years ago

@leandromoreira Thanks! :) I tried CORE_CONTAINERS_CREATED but didn't work with flash based plugins, it get's triggered before the playback is completely ready. CORE_READY worked fine, we're good to go :)

Oh and I don't have anything new to add right now. A new release is very welcome.