Languages

JavaScript - why my Google Chrome web browser doesn't display YouTube videos in ifame?

2 points
Asked by:
Paris-Bateman
504

I have noticed very strange behaving in my Google Chrome web browser. When I try to put in ifame YouTube video on my webpage it displays error about disabled JavaScript. The thing is so strange because in other web browsers, ifame works.

Error:

An error occurred.

Try watching this video on www.youtube.com, or enable JavaScript if it is disabled in your browser.

Preview:

Try watching this video on www.youtube.com, or enable JavaScript if it is disabled in your browser.
Try watching this video on www.youtube.com, or enable JavaScript if it is disabled in your browser.

Source code:

// ONLINE-RUNNER:browser;

<!doctype html>
<html>
<body>
  <iframe src="https://www.youtube.com/embed/zd0nQF5VRjY"
          style="border: none; width: 80%; height: 250px"
          scrolling="no">
  </iframe>
</body>
</html>

 

1 answer
5 points
Answered by:
Paris-Bateman
504

I had the same issue when I had disabled JavaScript by default in my Google Chrome web browser.

It was time when I was giving specific JavaScript execution permissions for specific websites (I mean I was enabling JavaScript only on specific websites).

0 comments Add comment
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join