jquery - How to get HTML5 video to take up full height and width of browser window? -


i need video take full width , height of browser on first page load, using bootstrap. how achieve this?:

the following code kind of it, height more 100% of browser. want able scroll down text underneath, video showen @ top.

demo

html, body {   height: 100%;   }    #homepage-video {      height: 100%;      width: 100%;   }
<div class="container-fluid">   <div class="row">    <video id="homepage-video" autoplay="true" loop="true" >     <source src="http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4"       type="video/mp4" />           browser not support html5 videos.         </video>       </div>     </div>     <div class="container">          // text in here....     </div>

you can set via jquery, include jquery library , add below code

$(function(){     $('video').css({width:$(window).width(), height:$(window).height()}); }); 

Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -