Documentation
Include CleanVid in your project.
<script src="https://cleanvid.io/src/1.0.0.js"></script>
Call the initialisation function.
<script type="text/javascript">new CleanVid();</script>
Done! Nothing else needs to be changed.
Customization
To adjust the behaviour of certain iframes, the following attributes can be added:
- autoplay: Enable autoplay
- nocontrols: Hide play button
- nobutton: Hide controls
- lazyload: Lazy loading
- nocleanvid: Ignore iframe
Example: Video with autoplay and no controls
<iframe autoplay nocontrols src="https://wwww.youtube.com/embed/..."></iframe>
Limitations
- Can not be used within an iframe.
- Can not be used on IP domain