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

init with video element #52

Closed
jtn-d opened this issue Jul 14, 2015 · 3 comments
Closed

init with video element #52

jtn-d opened this issue Jul 14, 2015 · 3 comments

Comments

@jtn-d
Copy link

jtn-d commented Jul 14, 2015

Would be it possible add init variation that takes video element as one argument, e.g. initWithVideo : function(config, cb, video)?

Current implementation queries #interactive.viewport from document and further video, which doesn't work with Shadow DOM (web components).

          var $viewport = document.querySelector("#interactive.viewport");
          if ($viewport) {
            video = $viewport.querySelector("video");
            if (!video) {
              video = document.createElement("video");
              $viewport.appendChild(video);
            }
          }

I would nice to utilise this great library to implement e.g. Polymer element.

@serratus
Copy link
Owner

Thanks for pointing that out. I have that on my todo-list for ages now, but it haven't had much priority yet. That's going to change and I'll try to come up with a solution that suits most users. My idea is, to include the element to the config object, either as a DomNode, or even selector. I guess you are looking for a way to pass in a Video-element as a DomNode, right?

@jtn-d
Copy link
Author

jtn-d commented Jul 17, 2015

Yes, exactly. So it would be caller's responsibility to layout and style elements and pass them to library.

@serratus
Copy link
Owner

Fixed by #89

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