-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
fix: ensure the default ID of the first player is 'vjs_video_3' as some people have relied on this #6216
Conversation
…me people have relied on this
This should probably be merged to a branch off of 7.6.4 as that's what I based this branch on. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good, and from a test with data-setup
and a player with no id this looks good. I wonder if we should have a sandbox page for data-setup so this can more easily be tested in the future
Maybe, but |
data-setup is just an easy way to force videojs to use a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally, works fine for manually created and data-setup cases.
…me people have relied on this (#6216) When a player is created without an id on the embed code, Video.js automatically assigns it one based on an auto-incrementing number (a.k.a. a GUID). For the longest time, this has happened to result in the default id of the first player being vjs_video_3. It was never intended for users to rely on this value being consistent, but users do strange and inadvisable things. PR #6103 had an unintended side effect in that it changed the default id to vjs_video_2, which we worry could affect some users of Video.js.
Description
When a player is created without an
id
on the embed code, Video.js automatically assigns it one based on an auto-incrementing number (a.k.a. a GUID). For the longest time, this has happened to result in the defaultid
of the first player beingvjs_video_3
.It was never intended for users to rely on this value being consistent, but users do strange and inadvisable things.
PR #6103 had an unintended side effect in that it changed the default
id
tovjs_video_2
, which we worry could affect some users of Video.js.Specific Changes proposed
id
assigned asvjs_video_3
.Requirements Checklist
Docs/guides updatedExample created (starter template on JSBin)