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

unable to initialize multiple players on elements without IDs #2382

Closed
trinonsense opened this issue Sep 19, 2017 · 2 comments
Closed

unable to initialize multiple players on elements without IDs #2382

trinonsense opened this issue Sep 19, 2017 · 2 comments
Assignees
Milestone

Comments

@trinonsense
Copy link

Expected Behavior

multiple players initialized

Actual Behavior

only one player is initialized

Steps to reproduce

no id code: https://codepen.io/trinonsense/pen/KXzVNZ
with id code: https://codepen.io/trinonsense/pen/JrXXOE

Environment

  • hardware | device: n/a
  • operating system | version: n/a
  • browser | version: n/a
  • JW Player version | url: v7/8
@robwalch
Copy link
Contributor

Hi @trinonsense, please provide the player version or branch you are testing in.

I highly recommend you assign an id to the elements you pass to setup. If you don't the player should do that for you, but this isn't a use-case we test for.

@robwalch robwalch added this to the v8.1.0 milestone Oct 24, 2017
@robwalch
Copy link
Contributor

@trinonsense have a look at https://github.com/jwplayer/jwplayer/compare/feature/support-elements-with-no-id?expand=1

This would assign a data attribute "data-jwplayer-id" to elements queried with jwplayer(domElememt) which do not have an id. The attribute is removed when jwplayer().remove() is called, and it is not present on the player element after setup, because the player always assigns an id to elements it creates.

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

3 participants