Make any YouTube embed click-to-load using uBlock Origin
Part of YouTube's success comes from the fact that it is easy to embed YouTube videos on third-party sites. Many website owners publish YouTube videos on the site itself but also on their own sites, and others may embed YouTube videos by other creators on their sites.
It is convenient to supplement an article that you are writing with a video, either self-created or created by someone else. On the other hand, users who don't want to watch the video may still have it played outright on the site or at least loaded to a degree. Connections to YouTube may not be wanted because of privacy. Some web browsers come with options to control media playback, others offer limited functionality in this regard only.
If you are using the content blocker uBlock Origin, you may use it to turn any YouTube embeds on third-party sites into click-to-play widgets. The main benefit of doing so is that there won't be any connections to YouTube and that nothing will load from the site unless you interact with that widget.
Here is an example screenshot captured here on this site after making the change in uBlock Origin. Note that we use the nocookie version of YouTube embeds on this site only.
A click on the widget loads the content; in this case just the YouTube video with options to start playback. On other sites, videos may play right away depending on factors such as the web browser that is used, the video in question, and the site.
The only downside to the approach is that you don't see the thumbnail or title of the video anymore on the page.
How to make YouTube embeds click-to-play in uBlock Origin
It is actually very easy and can be done in just a minute. Here are the steps:
- Activate the uBlock Origin icon in the browser's toolbar and select the "open the dashboard" option to open the management dashboard.
- Switch to the "My filters" section when the page opens.
- Add the following two lines to the list of filters:
- Click on "apply changes" to save the new filters.
Once done, visit any site with YouTube embeds to test the filters. You can try our Vivaldi 2.10 review for example, as it includes a video embed.
Turning third-party embeds into click-to-play widgets is an excellent way of speeding up the loading of websites and improving privacy at the same time. Raymond Hill, the creator of uBlock Origin, published the tip on Twitter recently.
It should be easy enough to use the two filters as a blueprint for other third-party embeds that you encounter. All you have to do, usually, is replace the domain name of the site in question while leaving the instructions untouched.
Now You: do you prefer click to play or autoload?Advertisement