Hiding YouTube embed title and 'More videos' (Updated) - youtube-iframe-api

Is there an official way to hide the title and the More videos section from a YouTube embed (latest version as of July 2nd 2018), and just show the YouTube logo bottom-right? I know the embed used to have this ability some time ago.
What I'm basically looking for is have the embed auto play with no other elements on it except the mandatory YouTube logo and be able to pause it, but no More videos appear when doing that.
For the showinfo option, the documentation currently says:
Setting the parameter's value to 0 causes the player to not display
information like the video title and uploader before the video starts
playing.
So that before clearly says that this does not take effect during the video play.
But is there any way to hide the Uploader, Title, Watch Later and Share buttons from the top part of an embed?
This is how it currently looks when the video is paused:
<iframe src="https://www.youtube.com/embed/dnmJLVWetQM?autoplay=1&controls=0&modestbranding=1&showinfo=0&iv_load_policy=3" frameborder="0" allowfullscreen="1" allow="autoplay; encrypted-media" title="YouTube video player" width="720" height="405">
Also the comment from here is not up to date anymore.
For the rel option, the documentation currently says:
This parameter indicates whether the player should show related videos when playback of the initial video ends.
So this too doesn't apply when the video is paused.

YouTube deprecated parameter showinfo (can no more hide title) and changed parameter rel behavior (will show related videos).
Details in https://developers.google.com/youtube/player_parameters#release_notes_08_23_2018
Note: This is a deprecation announcement for the showinfo parameter. In addition, the behavior for the rel parameter is changing. Titles, channel information, and related videos are an important part of YouTube’s core user experience, and these changes help to make the YouTube viewing experience consistent across different platforms.

Related

How to customize embedded YouTube video players?

When you embed a YouTube video using its provided <iframe> code: you're not able to hide title and a couple other "features".
Some of these features could be disabled using parameters, back in a day. As of now: they're deprecated.
So, now I'm left with a client that needs to embed YouTube videos without all of that junk we see when hovering over the video: title, related videos, channel logo, etc.
From what I've researched, it's not possible to disable title and a some other features: be it using URL parameters or CSS+JS.
Although, I've come with a solution that has a lot of potential: not only for user's privacy, but also for UX. This solution is:
figuring out a way to extract YouTube videos source URL;
using extracted URL in <video> or <iframe>;
replicate YouTube player styles.
For the first part, I've used Invidious API. But I think you can also create an API that uses youtube-dl to extract videos URL (?).
In my tests, I didn't even had to install my own isntance of Invidious: I've used public API endpoints:
https://yewtu.be/latest_version?id=dasdsa312&itag=84
Where:
id: video ID;
itag: video stream format code.
Then, I made JavaScript code to:
dynamically get all available Invidious public instances;
generate a video element with sources to many different video quality and available instances.
These sources are generated depending on the query parameters available in my website URL:
https://riservato-xyz.frama.io/watch/?v=gprAWYQ47uY
With that in mind, whenever I need a customized YouTube player, I can use my own website to embed YouTube videos.
I understand the testing website (former url) is slow, indeed. Although, this is because I'm not using my own Invidious instance and rely on public instance. BUT IT WORKS!
<iframe width="560"
height="315"
src="https://riservato-xyz.frama.io/watch/?v=W_xIBfrdxQU" frameborder="0"></iframe>

Vimeo embed on Squarespace: hide controls on load, show on hover

New Squarespace, Vimeo, and iFrame user here. I'm doing some work for a non-profit, and they've asked me to create a "Testimonials" page with ~10 videos where the controls of each are revealed only on hover.
On load / inactive state
When the video loads, there shouldn't be any controls; sharing; or title/byline visible.
On hover
On hover, the user should see the player controls.
What I've tried
Given the basic iFrame embed code:
<iframe src="https://player.vimeo.com/video/58659769" width="640" height="360" frameborder="0" allow="autoplay; fullscreen" allowfullscreen></iframe>
✅?title=0&byline=0&portrait=0 gets rid of the title, owner name, and owner avatar of Vimeo accounts, regardless of paid status. This is a step in the right direction!
🛑?controls=0 gets rid of all controls for Pro+ videos, which is the desired start state. However, the only way to then play the videos is via autoplay=1: https://developer.vimeo.com/player/sdk/embed. This wouldn't work with multiple videos on the page. Also, we don't have a paid Vimeo account.
🛑Targeting the elements with a { display: none; } works when in my Dev Tools Panel after page load. However, I can't produce the same effect via the Custom CSS panel -- I suspect due to Vimeo server-side restrictions. (It hides the elements at first, then renders them after ~3 seconds.)
🛑I can't inject custom Javascript into the site via Developer Mode because we're only using the basic Squarespace, so all JS solutions are currently blocked. However, I may be able to get them to pay to upgrade Squarespace, so JS solutions are welcome!
🛑Injecting <script> tags into the embed modal doesn't execute the code
I know this would be possible from the Vimeo development side because the desired event happens when I've started to play the video. After pausing a video that has been playing, the controls disappear, and then reappear on mouse movement over the video.
The closest thing I could find was using Frogaloop (https://forum.webflow.com/t/play-vimeo-video-on-hover-from-a-cms-collection/78458). However, given JavaScript restrictions, I don't know how to execute something similar in Squarespace.
Credit
The video stills are just for testing, given that I know that it is uploaded to a user with a Vimeo Plus account. Thanks to Bianca Giaever! https://vimeo.com/58659769
I was able to connect with the folks on the #VimeoStaff Twitter account, who provided me with the following answer. TL;DR: what I'm attempting to do isn't possible, but there are some (suboptimal) workarounds.
As you've found, you can control settings individually (such as the
title and byline) within the Embed tab of your video settings page.
I'm afraid it's not possible to change anything mid-load in JS,
meaning you won't be able to load the player with no controls and then
activate them with a hover. We're so sorry for any inconvenience! I'll
be sure to extend this feedback to our product team.
It is possible to remove the playbar from your embedded videos. You
can enable this feature by adding the ?background=1 parameter to the
end of the player URL in your embed code, for example:
<iframe src="https://player.vimeo.com/video/76979871?background=1"
width="640" height="360" frameborder="0" allow="autoplay; fullscreen"
allowfullscreen></iframe>
Adding this parameter will have the following effect:
All player toggles and elements will be turned off (including the play/pause button!)
The video will automatically loop.
The video will be set to autoplay
The video will be muted
If you would simply like to hide the UI of the player without
muting/autoplaying/looping (i.e for a chromeless player), you can
alternatively add the controls=0 to the end of the player URL in your
embed code, for example:
<iframe src="https://player.vimeo.com/video/76979871?controls=0"
width="640" height="360" frameborder="0" allow="autoplay; fullscreen"
allowfullscreen></iframe>
When using the controls embed parameter, you'll need to either enable
autoplay (?autoplay=1), use keyboard shortcuts, or implement our
player SDK to start and control playback.
More information on background and chromeless videos can be found
here. Please note that keyboard shortcuts cannot be disabled
currently.
Additionally, I can see you've mentioned having multiple videos on one
page. If you have more than one video autoplaying on a particular
page, you will also need to include this parameter: autopause=0

YouTube showinfo parameter not working

According to the YouTube docs for the showinfo parameter:
Setting the parameter's value to 0 causes the player to not display information like the video title and uploader before the video starts playing.
So why does the title still show in the code below? Note that I'm not using any other parameters that could cause a conflict (e.g. modestbranding).
<iframe src="https://www.youtube.com/embed/fVH2lJeZVGU?showinfo=0">
Showinfo doesnot work like that.
Refer to the defined method help:
Setting the parameter's value to 0 causes the player to not display
information like the video title and uploader before the video starts
playing. If the player is loading a playlist, and you explicitly set
the parameter value to 1, then, upon loading, the player will also
display thumbnail images for the videos in the playlist. Note that
this functionality is only supported for the AS3 player.

is it possible to replace Youtube's Iframe Video Ads

is it possible to replace Youtube's embedded Video's Ads with my own video ads.
maybe using a video player to do that but how can i do?
for example. someone is embedding youtube videos somewhere else. he wants to show some video ads on those videos. how can he do that?
I doubt it is impossible. It is, however, illegal to do so. When using the YouTube Data API or the JS API you agree to their terms of service, which explicitly state that you may not alter or remove in-player ads of embedded videos (section II, paragraph 7).
Is it possible to replace Youtube's embedded Video's ads with my own video ads?
If you own the video the answer is YES, but if it's own by someone, the answer is NO. Only the owner/author of the video have rights to the ads of these video.
For more information, you can check this related SO question. It might give you an idea about your problem.
Also from the YouTube Help, it is stated here that:
You will automatically be opted into showing ads on embedded videos if
you've associated your YouTube and AdSense accounts and have enabled
your videos for embedding. Note that embedded videos will honor the
same ad enablement settings as videos on youtube.com.
If you don't want to show ads on your embedded videos, there is no way
to directly disable ads on just embedded videos, however, you may
disable your videos for embedding altogether.

Open related video from IFrame Player in the same page

When a YouTube video stops playing, related videos are often shown at the end in a grid (depending on the video owner's preference). I have an IFrame Player embedded on a web page that plays public YouTube videos. When a related videos at the end is clicked, a new page is opened playing the related video. I've scoured the API docs and although there doesn't seem to be a solution, I'm going to ask anyway in case I've missed something or some perspective. Is there an API setting that allows the video to play on the same iframe instead of opening a new page, or some solution that could be worked out?

Resources