# YouTube Hide Related Videos \[BETA]

{% hint style="warning" %}
**BETA note**\
While this version works perfectly in our testing, we have reason to believe there is an underlying race condition occurring with the YouTube player lib. If you encounter any unexpected behaviors, please let us know in the forum ( link at top ).&#x20;
{% endhint %}

When an embedded YouTube video is paused or finished playing, a series of "related videos." are shown. These often detract from your Webflow site's elegant design, and by default they can show unrelated or even a competitor's videos.

It's not ideal...&#x20;

<figure><img src="https://2168358812-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsBcvwQ6TdfCVq8IuMako%2Fuploads%2FtExeRLn7pFzu0L3xmpxe%2Fimage.png?alt=media&#x26;token=fc130fcc-e17d-45e3-81e4-7961cc0a84f5" alt=""><figcaption></figcaption></figure>

This SA5 attribute blocks the play and stop views with an overlay that can make this UX more elegant. At this point it is very simple.

| Video paused overlay                                                                                                                                                                                                | Video finished overlay                                                                                                                                                                                              |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ![](https://2168358812-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsBcvwQ6TdfCVq8IuMako%2Fuploads%2FyCsBv2laTQ5UeFnz3jsO%2Fimage.png?alt=media\&token=70bea8db-6d5d-4cad-80e4-056e27d9fdf3) | ![](https://2168358812-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsBcvwQ6TdfCVq8IuMako%2Fuploads%2FPrtwYZNS13fu9eLwJtHA%2Fimage.png?alt=media\&token=1ff8068f-e823-4a7a-9e14-4d1294762fa8) |

{% hint style="success" %}
It is possible to change the color and the icon however it requires knowledge of CSS. See our [Styling Options](https://attr.sygnal.com/sa5-video/youtube-hide-related-videos-beta/styling-options) for details.&#x20;
{% endhint %}

## Demo <a href="#usage-notes" id="usage-notes"></a>

{% embed url="<https://video-player-control.webflow.io/youtube/hide-related>" %}

## Usage Notes <a href="#usage-notes" id="usage-notes"></a>

{% hint style="info" %}
Currently this feature works with **Webflow's YouTube video element** specifically. Make sure you are using the right one.&#x20;

![](https://2168358812-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsBcvwQ6TdfCVq8IuMako%2Fuploads%2FVogB7HtYoQFyirAOi8kI%2Fimage.png?alt=media\&token=adddef17-c943-4ded-b00c-bdf14f9195f2)
{% endhint %}

Simply add a custom attribute of `wfu-youtube-norel` to any YouTube video on your page.&#x20;

## Getting Started ( NOCODE ) <a href="#getting-started-nocode" id="getting-started-nocode"></a>

### STEP 1 - Add the Library <a href="#step-1---add-the-library" id="step-1---add-the-library"></a>

First, **add the library** as detailed in [Quick Start](https://attr.sygnal.com/sa5-video/quick-start).&#x20;

### STEP 2 - Apply `wfu-youtube-norel` to any YouTube Player Elements you want it to affect <a href="#step-2---apply-wfu-data-poster-url-to-the-background-videos" id="step-2---apply-wfu-data-poster-url-to-the-background-videos"></a>

See above for details.

## Credits

This attribute is based on the work of Maximillian Laumeister who first [published this technique](https://www.maxlaumeister.com/articles/hide-related-videos-in-youtube-embeds/) in May 2018.&#x20;

<br>
