Skip to content
This repository has been archived by the owner on Jul 11, 2019. It is now read-only.

Latest commit

 

History

History
24 lines (15 loc) · 790 Bytes

README.md

File metadata and controls

24 lines (15 loc) · 790 Bytes

AutoPlayView Media

Auto play media (video/sound) when in viewport. Currently just supporting youtube and vimeo videos.

Dependencies

Markup example

Youtube Video (API will be loaded automatically):

<iframe data-feature="autoplayview-media" data-type="youtube" scrolling="no" frameborder="0" width="560" height="315" src="https://www.youtube.com/embed/dQw4w9WgXcQ?enablejsapi=1"  allowfullscreen></iframe>

Vimeo Video:

<iframe data-feature="autoplayview-media" data-type="vimeo" scrolling="no" frameborder="0" width="560" height="315" src="https://player.vimeo.com/video/78329678" allowfullscreen></iframe>

<!-- Vimeo API -->
<script src="https://player.vimeo.com/api/player.js"></script>