Skip to content

Initialize plugin on demand #74

@szostteek

Description

@szostteek

Hi, I wanted to thank you for such an awesome plugin!

Sometimes my sprite is not processed yet so I wait for it and dynamically call player.spriteThumbnails({...}) after some time. It's working on 2.1.1 and unfortunately it's not with newer versions.

There's a difference in a source code between 2.1.1 and newer versions. In older versions init function is called in spriteThumbs:
player.on(['loadstart', 'loadedmetadata'], init);
init();
In newer versions init function is called only on loadstart and loadedmetadata:
player.on(['loadstart', 'loadedmetadata'], init);

For testing I added this init() line and seems like it's working as expected.
I wanted to ask why this line was deleted?

Thank you for your contribution!

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions