Embedded YouTube without title!

Sayler8182
2 min readNov 27, 2019

Show info is deprecated and will be ignored after September 25, 2018

As we all know, showinfo parameter has been depreciated in 2018 and since then there is no way to remove header from embedded YouTube video. We can remove controls or related videos, but we will always see disturbing buttons at the top.

This solution is based on my iOS experience with official YT player.
How to make it simple? We load ‘embed’ url to WebView:

https://www.youtube.com/embed/_VIDEO_ID_?_OTHER_PARAMS_

What _VIDEO_ID_ is we all know and _OTHER_PARAMS_ is YT player parameters.

After loading the page, in my case in this function:

func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!)

we can remove unnecessary elements by doing this:

Result is pretty good!

We are also able to interact with video by using JS messages:

Thank you for reading! If you liked this article, please clap so other people can read it too. I will also have more motivation for next article :) You can also see my other articles, maybe you will find something for you.

If you have any question or suggestion leave a comment.

--

--