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

If we create a new element for movingMediaElInDOM, set playerId on the el again #3624

Closed
wants to merge 1 commit into from

Conversation

gkatsev
Copy link
Member

@gkatsev gkatsev commented Sep 19, 2016

Fixes #3283. When videojs is called with an element, we try to see if we already have a player for that element. In some cases, like if data-setup is used with a manual call to videojs, we get called multiple times with the same element. On iOS, we cannot move the media element inside the DOM, so, we recreate it. In the process, we lose a marker we use for knowing whether we've created a player for that element.
This makes sure we keep that marker if we re-create the element.

@gkatsev
Copy link
Member Author

gkatsev commented Sep 19, 2016

This should probably be rebased against stable and released as a patch along with the other items we have there.

@gkatsev gkatsev added patch This PR can be added to a patch release. needs: LGTM Needs one or more additional approvals needs: updates labels Sep 19, 2016
@misteroneill
Copy link
Member

I noticed this was updating the Html5 tech. Is there any reason/need to update the Flash tech or is this isolated to Html5?

@gkatsev
Copy link
Member Author

gkatsev commented Sep 19, 2016

It should only be an issue for when we delete and re-create the mediaEl. The original tag already gets the playerId set by default: https://github.com/videojs/video.js/blob/master/src/js/player.js#L321

@misteroneill
Copy link
Member

Sounds good. LGTM

Copy link
Contributor

@brandonocasey brandonocasey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gkatsev gkatsev added this to the 5.11 milestone Sep 27, 2016
@gkatsev gkatsev removed needs: LGTM Needs one or more additional approvals needs: updates labels Sep 28, 2016
@gkatsev
Copy link
Member Author

gkatsev commented Sep 28, 2016

Closing in favor of #3648

@gkatsev gkatsev closed this Sep 28, 2016
@gkatsev gkatsev deleted the fix-ios-rewrapping branch September 28, 2016 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch This PR can be added to a patch release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants