Not quite, no - I'd like the video to always fill the window (100% width), and be vertically centred, so the top and bottom will crop off if it is too shallow.
Also I am using a video that I will package with my project, not a YouTube vid.
1 person found this helpful
Using a modified version of Heathrowe's code:
//set the width and height to percentage
var vid = $("<video width='100%' height='100%'>" +
"<source src='http://www.w3schools.com/html5/movie.mp4' type='video/mp4' />" +
"<source src='http://www.w3schools.com/html5/movie.ogg' type='video/ogg' />" +
"This browser is not compatible with HTML 5" +
// stage symbol lookup, and append the above vid object to it;
//I created a symbol called frame and placed vcontainer inside that
// additional options for the video object
// don't forget to loop the video
here is the result:
That looks positive, though I'd want to be able to set it to width: 100%, height: auto and to tweak the position as if it were a background image (particularly to centre it vertically).
Would you mind sending me your Edge project so I can have a play? Had difficulties even getting to this point before.
Thanks v much for your help!
Cheers Jonathan, will continue this tomorrow - I think I've worked it out with your help, just need to figure out how to centrally align the image vertically with CSS. Once I've cracked it I'll post the code…!