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

Latest commit

 

History

History

autoplayview-media

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

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>