uikit
Version:
UIkit is a lightweight and modular front-end framework for developing fast and powerful web interfaces.
74 lines (56 loc) • 2.92 kB
HTML
<html lang="en-gb" dir="ltr">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Video - UIkit tests</title>
<script src="js/test.js"></script>
</head>
<body>
<div class="uk-container">
<h1>Video</h1>
<div class="uk-grid uk-child-width-1-3@s">
<div>
<h3>Autoplay</h3>
<button class="uk-button uk-button-default uk-margin-bottom" type="button" uk-toggle="target: +">Toggle Video</button>
<video src="https://yootheme.com/site/images/media/yootheme-pro.mp4" width="1920" height="1080" controls playsinline uk-video="automute: true"></video>
</div>
<div>
<h3>Autoplay Inview</h3>
<button class="uk-button uk-button-default uk-margin-bottom" type="button" uk-toggle="target: +">Toggle Video</button>
<iframe src="https://www.youtube-nocookie.com/embed/c2pz2mlSfXA?autoplay=0&showinfo=0&rel=0&modestbranding=1&playsinline=1" width="1920" height="1080" allowfullscreen uk-responsive uk-video="automute: true; autoplay: inview"></iframe>
</div>
<div>
<h3>Autoplay Hover</h3>
<button class="uk-button uk-button-default uk-margin-bottom" type="button" uk-toggle="target: +">Toggle Video</button>
<video src="https://yootheme.com/site/images/media/yootheme-pro.mp4" width="1920" height="1080" playsinline uk-video="automute: true; autoplay: hover"></video>
</div>
</div>
<h2>JavaScript Options</h2>
<table class="uk-table uk-table-striped">
<thead>
<tr>
<th>Option</th>
<th>Value</th>
<th>Default</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>autoplay</code></td>
<td>Boolean, String</td>
<td>true</td>
<td>The video automatically plays/pauses when visible/hidden on the page. A value of `inview` will delay loading the video and play/pause the video as it enters/leaves the viewport. A value of `hover` will play the video as it is being hovered.</td>
</tr>
<tr>
<td><code>automute</code></td>
<td>Boolean</td>
<td>false</td>
<td>Automatically mute YouTube or Vimeo videos.</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>