The video is outside the viewing area.

Один из вариантов когда гугл серч консоль показывает такую ошибку, значит вы поставили в тег frame значение width: 100%; Или ничего не указывали и все равно для мобильных устройств возникает ошибка. Вот и все приехали.

One of the options is when the Google search console shows such an error, which means you set the value width: 100% in the frame tag; Or you didn’t specify anything and still an error occurs for mobile devices. So everyone has arrived. The video is outside the viewing area.

The video is outside the viewing area.

Но как показывать видео с размерами для мобильных устройств? Если необходимо сделать мобильный сайт и встроить в него видео.

But how do you show videos with mobile dimensions? If you need to make a mobile website and embed a video in it.

С помощью javascript обратиться к тегу iframe:

Using javascript, access the iframe tag:

let widthDis;// variable changing when loading

document.querySelector('iframe').width=widthDis;

Или проще с условиями если ширина отображаемой части 1000px, то лучше записать таким образом:

Or it’s easier with the conditions: if the width of the displayed part is 1000px, then it’s better to write it this way:

  if(innerWidth<1000){
widthDis=innerWidth-20;// margin-left_and_right 20px;
}else{
widthDis=1000;
}

после условий обратиться к фрейму с шириной дисплея.

After the conditions, refer to the frame with the display width.

Эта техника была проверена в гугл хроме, мозиле и в вебките на убунту. Значит скорее всего этот способ будет работать везде.

This technique has been tested in Google Chrome, Mozilla and webkit on Ubuntu. This means that this method will most likely work everywhere.

Видео с ютуба отлично встраиваются в любые устройства и работают на всех телефонах, планшетах и других устройствах под все разрешения дисплея.

Videos from YouTube are perfectly integrated into any device and work on all phones, tablets and other devices for all display resolutions.

Но в гугл хроме размер видео отображается с рамкой. Чтобы было ровно 100% width нужно -15px. Поэтому пришлось дописать с помощью найденного в ёнтернет способа с проверкой браузера и конечный результат получился так:

But in Google Chrome the video size is displayed with a frame. To have exactly 100% width you need -15px. Therefore, I had to add it using a browser-checking method found on the Internet, and the end result turned out like this:

let widthDis;// variable changing when loading
function detectBrowser() {
const userAgent = navigator.userAgent.toLowerCase();
if (userAgent.indexOf('firefox') > -1) {
return widthDis=innerWidth;// margin-left_and_right 20px;
// return 'Firefox';
} else if (userAgent.indexOf('chrome') > -1) {
return widthDis=innerWidth-15;// margin-left_and_right 20px;
// return 'Chrome';
} else if (userAgent.indexOf('safari') > -1) {
return widthDis=innerWidth;// margin-left_and_right 20px;
// return 'Safari';
} else if (userAgent.indexOf('opera') > -1 || userAgent.indexOf('opr') > -1) {
return widthDis=innerWidth;// margin-left_and_right 20px;
// return 'Opera';
} else if (userAgent.indexOf('msie') > -1 || userAgent.indexOf('trident') > -1) {
return widthDis=innerWidth;// margin-left_and_right 20px;
// return 'Internet Explorer';
} else {
return widthDis=innerWidth;// margin-left_and_right 20px;
// return 'Unknown';
}
}
if(innerWidth<900){
detectBrowser();
widthDis;
}else{
detectBrowser();
widthDis=900;
}
document.querySelector('iframe').width=widthDis;

Amir

to list
https://qucu.ru/comments/