We help IT Professionals succeed at work.

Video Not Being Responsive

David Schure
David Schure asked
on
77 Views
1 Endorsement
Last Modified: 2018-11-13
I have a video on a website.  The problem that I have that it's not resizing to fit phones, tablets, etc,

http://www.mediascrubber.com

margin-right: auto;
margin-left: auto;
display:block;

Open in new window


<video width="1000" controls>
  					<source src="media/Permission.mp4" type="video/mp4">
  					<source src="media/Permission.mp4" type="video/ogg">
  					Your browser does not support the video tag.
					</video>

Open in new window

Comment
Watch Question

CERTIFIED EXPERT

Commented:
Hi,

you can use a script like https://github.com/videojs/video.js

this will be easier to get it resized / responsive
https://docs.videojs.com/tutorial-layout.html#responsive-mode

Plus don't set a fix width as it won't resized...
You can use a min-width instead...

 or you can set your media queries with CSS
https://www.w3schools.com/css/css_rwd_mediaqueries.asp

Author

Commented:
Thank you but this is over my head.  This is suppose to work....

video {
margin-right: auto;
margin-left: auto;
display:block;
max-width: 100%;
height: auto;
}

Open in new window


but doesn't....
CERTIFIED EXPERT

Commented:
You have Bootstrap but you are not using it correctly, you have to use the syntax
check the grid layout and follow one of them
https://getbootstrap.com/docs/4.1/layout/grid/

container / row / column

<div class="container">
  <div class="row">
    <div class="col-sm">
      One of three columns
    </div>
    <div class="col-sm">
      One of three columns
    </div>
    <div class="col-sm">
      One of three columns
    </div>
  </div>
</div>

Open in new window


You may want to take the time to learn Bootstrap 4 on Udemy there are plenty of free course on that topic
https://www.udemy.com/bootstrap-4-tutorials/

 if your video code is outside the grid it won't resized...
CERTIFIED EXPERT
Most Valuable Expert 2017
Distinguished Expert 2019

Commented:
What are we looking for?

If I look at the site on a small screen the video resizes - what should I be looking for.
Analyst Developer
CERTIFIED EXPERT
Distinguished Expert 2018
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
I just figured that out.  I thought that once that happened The site would center on the phone but I am still getting horizontal scroll bars for some reason.  Any help is appreciated.

video {
    /*margin-right: auto;
    margin-left: auto;
    display:block;*/
    max-width: 100%;
    height: auto;
}

Open in new window

CERTIFIED EXPERT
Most Valuable Expert 2017
Distinguished Expert 2019

Commented:
Do you get the scroll bars in Mobile emulation
F12
Firefox click the icon on the top right of the dev console that looks like a small portrait rectangle on a larger one
Chrome Top left of dev bar the icon that looks like a phone.

Do you see scroll bars in either of these?

Author

Commented:
I don't see the scroll bars in Google Chrome Dev. window.  But I get them on my actual iphone 6.
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.