Video script issue, JavaScript attribute remains ‘undefined’

Hard to tell exactly what’s happening without checking your code, but if you inspect your home page, you’ll see that the video element is being added outside the BODY tag (check attachment below). That might be the reason your script can’t find the video source.

Chrome Dev Tools Screenshot