问题
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.
回答1:
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.
来源:https://stackoverflow.com/questions/51136955/hiding-youtube-embed-title-and-more-videos-updated