D
D
Denis Bukreev2016-09-25 14:44:09
YouTube
Denis Bukreev, 2016-09-25 14:44:09

How to make a YouTube video in full screen on the site?

Connected YouTube video via API
The preview looks like this:
2fd4794ef08348a69b28c583c9acd573.png
But when I start the video, black fields appear on the sides and top and bottom:
2fcbce38402845e08543879f6da5c103.png
Why is it not displayed in the same way as the preview? And what to do to display everything adequately?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Timofeev, 2016-09-25
@webinar

1. Depends on how the video is made, are there fields on youtube?
2. There is also such a thing as aspect ratio and pixel format ( provegas.ru/forum/showthread.php?t=773)
So on different screens, the video cannot be stretched to full screen without distortion. If you do not make negative margins. So you need to stretch with js by calculating negative margins from the top or bottom.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question