question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

v3 and multiple instances

See original GitHub issue

The new version exports only Plyr which has no setup method.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
sampottscommented, Mar 3, 2018

Yep, .setup() was removed in favour of a proper class and one to one relationship with element vs instance. It was getting a little messy with allowing whatever in and then spitting out an array with one or many instances back. This way is cleaner and as you’ve found out if a developer wants to setup multiple players it’s as easy as…

const players = Array.from(document.querySelectorAll('.js-player')).map(player => new Plyr(player));

The example is just to show a NodeList is accepted as a value. It doesn’t necessarily make it the best for any scenario. It’s really because I added support for passing jQuery objects which are always an array of elements as I’m sure you know.

I’ll update the docs to make this a little clearer.

1reaction
fridaycommented, Mar 2, 2018

Then don’t use NodeList…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Audio Unit v3 - Multiple instances… | Apple Developer Forums
Audio Unit v3 - Multiple instances of same AU extension ... I am currently investigating Audio Unit v3 - App extension mechanism in...
Read more >
A.3.6 Distinguishing Multiple Instances Through SNMP v3 ...
The MIBs of two instances of Messaging Server running on the same system are distinguished by the instance's SNMP v3 context name and...
Read more >
OSIsoft: Multiple instances of a PI interface. v3.4.375 - YouTube
For performance reasons sometimes you may configure multiple instances of PI interfaces.
Read more >
fancybox3 multiple instances - jquery - Stack Overflow
I need help with fancybox v3 and multiple instances. I have an AJAX call and if the call is successful then I need...
Read more >
Multiple Instances SmartSDR - Same PC - Multi PCs - V3 ...
Ideal situation - would like to run two instances of SmartSDR on the same PC, each instance to a different series 6000 radio....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found