Does anyone know how to restrict the HTML5 Video fullsize limit to the portion of the screen instead of the complete screen.
Example: My screen size is 1920 * 1080 where my whole page will be displayed and on top of the page I've a modal dialog with 920 * 800 where I will display the list of videos, when I click on fullscreen of any video it is occupying my whole screen size 1920 * 1080, instead of it I want it to occupy only 920 * 800, which is my modal dialog size. Any thoughts. Any help would be highly appreciated.
You can fullscreen an outer element that contains the tag, instead of making the itself full screen, by using requestFullscreen on the outer element from JavaScript:
https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Using_full_screen_mode
Unfortunately, if you enable controls on the video element, it will still have its own fullscreen button too. There might be ways to hide it; here's another question about that topic:
How to hide full screen button of the video tag in HTML5
but it doesn't seem to be possible in all browsers. The best thing is probably to hide all of the video's controls, and implement your own controls (there's open source out there that does this kind of thing, like video.js).
Related
I am making an html webpage with a video in the background and would like to accomplish the following using CSS:
The video keeps its aspect ratio
The video fills the width of the screen
At relatively large window size the whole video is visible
The video has a minimum height (i.e. when the window is shrunk, at a certain size, the whole video is no longer visible).
There are elements positioned directly below the video, dynamically following it if the window is resized
It would also be nice if when the video is invisible it is centered (not crucial).
I've been trying this for ages now and have been able to get most of the points but not all of them; in particular I find the last point (positioning another element directly below) to be hard to combine with the others. I've been using the html video element and CSS.
Is this possible?
You can use a Jquery plugin for this. I recommend looking at this one in particular.
Vide - Jquery Plugin For Fullscreen Background Videos
I embedded a youtube video to a page using bootstrap's embed-responsive. When I resize the browser to fill the left half of my screen the video resizes correctly but when I resize the browser to fill the right-half of my screen or the top half the video doesn't resize and overlaps other content... Any idea how to fix this/why this is happening?
My code:
I am trying to use bootstrap's responsive-embed to embed a youtube video but for some reason it doesn't show on the page at all. I know it's on the page as I am using a screenreader which reads it and I can play it and hear the sound but visually it doesn't show at all.
Any idea what i'm doing wrong?
my code:
screenshots of the resized page:
https://www.sendspace.com/filegroup/8N0y4wQ5CwHATxM25UavWLvhrs7%2By5Wv
turn out I just had to remove the embed-responsive-item and the col-md-4 from the iframe
Is it possible to define fullscreen HTML5 video attribute? Let's say, I only want to make the fullscreen shows 30% of the video.
What I want to achieve is to open 3 browser tab, the first tab shows 33% of the video, second tab 33% and the third tab shows 33% of the video. BUT, this three tab must be full screen.
Any alternative or method is highly appreciated.
You could put all three video element inside a div and then fullscreen the div.
I'm using Thickbox to display videos on a website and the youtube video seems to be too large for the thickbox frame. I've tried decreasing the youtube video size but the thick box seems to follow the size of the video because no matter what I adjust the size to I always have this:
http://imgur.com/KJ2kJYr
Notice in the bottom right corner, the video goes outside the frame. Any suggestions are welcome.
Here is the html code for the video. Personal info has been removed (site name, youtube embed, etc.):
<a class="thickbox" href="//www.youtube.com/embed/XXXXXXXXX?rel=0&showinfo=0&controls=0&KeepThis=true&TB_iframe=true&height=400&width=600" title="XXXXXXXXX"><img src="http://www.XXXXXXXXXXX.org/campaign/wp-content/uploads/sites/59/2013/11/XXXXXXXXXX.png"/></a>
I would need the full code to give a complete answer, but based on my experience with other plugins:
Most plugins have very specific styles that are sometimes difficult to override. Give the video a "class" and set the width to width: 100% !important; (or whatever). This should override the defaults set in place by the plugin.
I'm trying to build a very simple proof-of-concept for the guys I work for to demonstrate something for them. As of right now, I've got everything working, except that in my (obviously extremely crude) website, I'm trying to embed a video and FORCE the video to completely fill a certain size. The main problem that I'm facing is that if I try to embed a video with:
<video width="1920" height="1080">
then it increases the size of the video screen (though not to those actual dimensions - it stops at a much smaller size), but keeps the actual viewable video size at the original dimensions and just adds a lot of black space into the video player.
Clearly, this isn't the right way to do this. I know HTML is usually regarded as pretty easy, but this is literally the first webpage I've had to do, haha. Any help is greatly appreciated!
I found this # http://www.w3schools.com/html5/att_video_height.asp
Note: Do not rescale video with the height and width attributes! Downsizing a large video with the height and width attributes forces a user to download the original video (even if it looks small on the page). The correct way to rescale a video is with a program, before using it on a page.
So guess you can't scale up a video with width and height tags. Just define it's dimensions so the browser can reserve space for it while loading a webpage.