N
N
Nikita2018-04-16 13:52:57
YouTube
Nikita, 2018-04-16 13:52:57

Why did Youtube player autoplay stop working (autoplay=1)?

Hello!
Who faced the problem of autostarting the Youtube player on the site? Now the browser blocks autorun and in the console displays: Error parsing header X-XSS-Protection: 1; mode=block; report= https://www.google.com/appserve/security-bugs/log/... : insecure reporting URL for secure page at character position 22. The default protections will be applied.
In htacces I wrote this:

<IfModule mod_headers.c> 
  Header set X-XSS-Protection: 0;
</IfModule>

But it doesn't work, maybe I'm writing wrong?

Then I installed the YouTube Embed plugin and set autorun in the options ( link ) It works through the Youtube API. And it still won't turn on autorun.

Then I tried to do it with jQuery:
$(function(){
var $video = $('#video'),
  src = $video.attr('src');
  $video.attr('src', src + '&autoplay=1');
   });
});

And it doesn't work either. Friends, my brains are already boiling, I don’t know what to do. It seemed to me that this is a common job that I have done several times already. And here I do not understand what it is.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
cportal, 2018-11-09
@cportal

This is the new chrome browser policy
https://developers.google.com/web/updates/2017/09/...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question