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

Getting multiple iframes when switching from HTML5 tech to YouTube tech and back again #45

Closed
markkennedy opened this issue Dec 9, 2013 · 4 comments

Comments

@markkennedy
Copy link

Howdy!

I first reported this on the video.js issues list, but they suggested that it might make more sense here.

I've put some demo code into jsbin here:

http://jsbin.com/ocOrogAT/3/edit?html

I inlined the source of the videojs-youtube plugin.

The output can be seen here: http://jsbin.com/ocOrogAT/3

It continually cycles through two videos: a 5 second MP4 clip, then a 10
second YouTube clip.

Here's the behavior I see:

  1. The MP4 loads and plays in a
  2. When the MP4 finishes, the
  3. When the YouTube clip finishes, the <iframe> stays in place.
  4. The MP4 video is loaded, but the
  5. When the MP4 finishes, a second <iframe> tag is added to the DOM which
    plays the YouTube clip.
  6. GOTO 3

It seems that the YouTube tech should either reuse the iframe or clean up the iframe after it is used.

I'm not sure if the

Let me know if you have questions, etc.

MK

@eXon
Copy link
Collaborator

eXon commented Dec 10, 2013

I've successfully fixed the problem. However, I need to send a pull request to VideoJS first and there is a small bug to be fixed. Should be done soon.

@eXon
Copy link
Collaborator

eXon commented Dec 10, 2013

You can use video.js code from https://github.com/eXon/video.js until the pull request is accepted within VideoJS

@markkennedy
Copy link
Author

Nice! Thanks for the quick turn around. Also, our team is working on another tech plugin based in large part on your work here, so thanks for the great example.

@eXon
Copy link
Collaborator

eXon commented Dec 12, 2013

The pull request has been accepted and I updated the lib folder with video.js

@eXon eXon closed this as completed Dec 12, 2013
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