matthojo / videojs-Background

Allows for videos to be displayed as a full background to any element.
MIT License
77 stars 41 forks source link

Problem Uncaught TypeError: Cannot read property 'appendChild' of undefined #10

Closed Barzon closed 9 years ago

Barzon commented 9 years ago

I can't init the script, error on line 61 in vjs Background. I put script and code at the end and header, but doesn't work.

Same error.

matthojo commented 9 years ago

Hello, do you have you video element setup like the example https://github.com/matthojo/videojs-Background/blob/master/example.html#L42-L48 ?

Are you also calling your video script in your head or via onLoad? Moving your script tag to the end of your page, or add an onLoad handler so it fires after the page has loaded.

snakefooc commented 9 years ago

I have same error for change the container element i need use class

Barzon commented 9 years ago

I tested various sets of template and css, the correct way is after video tag put the scripts with js.

Thanks!