I want to put text on fullscreen video at HTML.
I could make it non fullscreen but it is not working on fullscreen.
Is there any way to do it?
I use position:absoulute
for text and position:relative/fixed/none
for video.
Also I don't know if it works but I called .requestFullscreen();
function for browser unhappily I cannot resize video.
If .requestFullscreen();
is works. I need to resize video.
width and height of video tags is changing but video is not changing.
Full-screen can be activated for the whole browser window by pressing the F11 key. It can be exited by pressing the Esc button.
It's a simple trick, you need to add the maximum value of z-index which is (z-index: 2147483647;) in to the overlay element. That trick will solve your issue.
You can embed responsively with Youtube and vimeo with iframes, and with Viddler and Blip.tv with object embed. There is an article that explains it here and code is available on github
Sample code for Youtube (using jquery):
// Find all YouTube videos
var $allVideos = $("iframe[src^='//www.youtube.com']"),
// The element that is fluid width
$fluidEl = $("body");
// Figure out and save aspect ratio for each video
$allVideos.each(function() {
$(this)
.data('aspectRatio', this.height / this.width)
// and remove the hard coded width/height
.removeAttr('height')
.removeAttr('width');
});
// When the window is resized
$(window).resize(function() {
var newWidth = $fluidEl.width();
// Resize all videos according to their own aspect ratio
$allVideos.each(function() {
var $el = $(this);
$el
.width(newWidth)
.height(newWidth * $el.data('aspectRatio'));
});
// Kick off one resize to fix all videos on page load
}).resize();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With