Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google search YouTube iframe errors

Some pages of my site contain youtube videos and recently I noticed they were shown with bad description.

To be exact it only shows: Your browser does not currently recognize any of the video formats available. Click here to visit our frequently asked questions about HTML5 video.

It would be okay even if it was blank but why did it pick this thing... Any ideas how to remove this?

like image 679
Gag Er Avatar asked Jan 22 '19 15:01

Gag Er


People also ask

Why is YouTube API not working?

My YouTube API Key is Not Working Your API key may not be working because you're using it for the wrong project. Be sure you're using the key for the project that you created it for, especially if you created multiple projects at the same time. If it's still not working, consider creating a new API key entirely.

What is iframe API?

Developers can use the iFrame API to programmatically create and interact with an Embed or with multiple Embeds in the same web app. The iFrame API includes methods that you can use to start playback, change the content rendering in an Embed, or stop playback.

What is YT player?

Youtube Player. YTPlayer helps you control all of your opened Youtube videos either using keyboard shortcuts or directly using its popup window. The player has audio controls + focus button which focus on a tab, skip button which skip the ad if any, and a button to show suggested youtube videos (exclamation mark icon).


1 Answers

Hi I started the bounty -

Here is an example of the problem on a Google search result:

site:lifes.games

"Your browser does not currently recognize any of the video formats available. Click here to visit our frequently asked questions about HTML5 video."

I found a website where I can view the error in some kind of browser: https://www.websiteplanet.com/webtools/down-or-not/?DorN=http://lifes.games

enter image description here

The browser that site uses seems to be:

Mozilla/5.0 (Unknown; Linux x86_64) AppleWebKit/538.1 (KMTL, like Gecko) PhantomJS/2.1.1 Safari/538.1

See: https://www.websiteplanet.com/webtools/down-or-not/?DorN=https://linenum.com/browser_test.php

edit: a possible answer is:

if (stristr($_SERVER['HTTP_USER_AGENT'], 'googlebot') === false) {
    echo '<iframe>test</iframe>';
}

But I don't think I can give my own answer the bounty.

like image 193
Luke Wenke Avatar answered Oct 31 '22 19:10

Luke Wenke