My site has embedded black and white youtube trailers and excerpts from classic movies. How do I hide the youtube red button for playback with my counterfeit one, say black, gray or silver/metallic? Keep in mind that I do not want to remove the red button, just hide it with my fake, so when I click on my fake button, actually I click the red button. The main purpose of not being able to see is to not uglify my site, which is entirely black and white stylistically. ...And, something else very important - if you can avoid the youtube API because it slows down my site. Thank you!!!
Asked
Active
Viewed 1,886 times
0
-
[hope this information helps you, similar post](https://stackoverflow.com/questions/20596551/is-it-possible-to-hide-youtubes-big-red-play-button-with-a-parameter) – Foo Bar Jun 19 '17 at 12:32
-
Possible duplicate of [Is it possible to hide youtube's big red play button with a parameter?](https://stackoverflow.com/questions/20596551/is-it-possible-to-hide-youtubes-big-red-play-button-with-a-parameter) – Foo Bar Jun 19 '17 at 12:33
-
Thanks for the fast response Foo Bar, I know that article but it doesnt help me so much... – Явор Зарков Jun 19 '17 at 12:39
1 Answers
1
Well you can't replace the original button, but there's a workaround. I have to credit @TomDoodler for this answer. So:
- Hide the player
- Get the thumbnail like described here and put it in your page at the same position and size of the player
- Put your own play icon over the thumbnail
- When your play icon gets clicked, hide the thumbnail and your play icon, show the player and use the YouTube API like in your link to start the video
And here's the fiddle to this
// fiddles have to be accompanied by code, so here's some code

Tobias Glaus
- 3,008
- 3
- 18
- 37
-
Thanks, Tobias! But can we avoid the youtube API, some pure css tricks are possible here? – Явор Зарков Jun 19 '17 at 12:48
-
@ЯворЗарков I don't think that's possible, since you have to play the video with `player.playVideo();` and you cannot do that with CSS. – Tobias Glaus Jun 19 '17 at 12:55
-
-
Glad I could help. Don't forget to mark the question as answered ;) – Tobias Glaus Jun 19 '17 at 14:03
-
good strategy... I also suggest that you show some kind of "loading" icon over thumbnail before you show your custom "play" icon, otherwise there is a risk that the user hits "play" before the video is actually loaded via YouTube API – Alexander Cherednichenko Feb 03 '18 at 13:49