-1

I want my video to be responsive and scale size depending on the display size but its not working. I'm using bootstrap 3x

    <div class="embed-responsive embed-responsive-16by9">
      <video class="embed-responsive-item" onloadstart="this.volume=0.05" width="1080" loop="true" autoplay="autoplay">
        <source src="assets/images/compilation1-HB.mp4" type="video/mp4" >
      </video>
      </div>   
    </div>
Gel
  • 11
  • 6
  • Is there a reason why it's version 3 of Bootstrap? Can't you switch over to version 4? – yunzen Oct 10 '19 at 09:18
  • I could make your code work like intended with no hassle: https://codepen.io/HerrSerker/pen/22a946f45384a887e3f97425e5372b3c There must be something else that causes your issue. You have to post an example that shows the wrong behavior in order for us to help you – yunzen Oct 10 '19 at 09:23
  • @yunzen how did you do that? is that bs3? Im using bs3 because its an old project and im only modifying it. – Gel Oct 10 '19 at 09:30
  • I only copied your code and used bootstrap 3.4.1 (edit this behind the cogwheel top left of CSS field) – yunzen Oct 10 '19 at 09:38

1 Answers1

-1

have you checked this post yet? Bootstrap 3 - Responsive mp4-video

And i see in your code have an excess close div tag. May be that is the problem.

Thuat Nguyen
  • 272
  • 3
  • 15
  • The div is okay. I just didnt copy the div above my mistake. And yes, I already checked the 3.x documentation still no luck – Gel Oct 10 '19 at 09:29
  • The accepted answer in that post is the same code as in the OP – yunzen Oct 10 '19 at 09:42