Skip to content
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

Support for Array as selector in .setup() #319

Closed
electerious opened this issue Jul 22, 2016 · 4 comments
Closed

Support for Array as selector in .setup() #319

electerious opened this issue Jul 22, 2016 · 4 comments

Comments

@electerious
Copy link
Contributor

electerious commented Jul 22, 2016

plyr.setup() currently supports NodeList, HTMLElement and a string selector, but sometimes it's easier to work with Arrays instead of NodeLists. Especially when performing a lot of filtering using .map, .filter, ….

Passing an array to plyr.setup() doesn't throw an error and simply uses the default values: <video>, <audio> and [data-type].

Supporting Arrays like [HTMLElement, HTMLElement] would be a nice addition.

@sampotts
Copy link
Owner

Just added this - could you give it a test? 👍

@electerious
Copy link
Contributor Author

electerious commented Jul 24, 2016

Thanks a lot for the implementation! Made a small documentation for it and will try it next week.

@electerious
Copy link
Contributor Author

Tested. Works perfectly!

@sampotts
Copy link
Owner

Awesome 👍 Cheers for the docs update too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants