use dom traversal for element selection to allow multiple videos#126
use dom traversal for element selection to allow multiple videos#126sparksm wants to merge 3 commits intojohnpolacek:masterfrom
Conversation
|
I'll look into implementing this soon. Thanks! |
|
When I pulled this code into my demo pages, the VideoJS breaks with this error: The stack trace points to line 279 of BigVideo.js More important than this though is that I no longer have write access to this repository (I left the company almost a year ago). |
|
My privileges have been restored. If you can fix the issues and get the demo working with your new code, I'll be happy to accept your PR. |
|
from where can i pull your demo code? |
|
It is on the gh-pages branch. |
|
Would love to see this integrated into the master branch. 👍 |
|
FWIW when I used this in a project, the updateSize function broke (so it was not scaling to cover the background). I changed the query to get the mediaAspect on line 321 to query on .vjs-tech and the updateSize function on line 88 and 114 to query on that selector. And also var vid = container.find(vidEl); on line 58 was not getting the right element (the parent div of the video, it was getting the video element itself). |
I needed to run multiple for a project. Figured I'd contribute back.
With this it uses the container's children to add and refer to elements rather than id's.
Also threw in a jQuery helper function to allow $('.video').bigvideo().bigvideo('init').bigvideo('show');
It also uses data-video on elements to load that video.