Skip to content

Commit

Permalink
Repeat example (videojs#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
incompl authored Apr 4, 2017
1 parent 8b95854 commit 10496e1
Showing 1 changed file with 18 additions and 8 deletions.
26 changes: 18 additions & 8 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
width: 10em;
}

.autoadvance-group {
.options {
margin: 1em;
}

Expand All @@ -24,13 +24,19 @@
<video class="video-js vjs-default-skin" controls width="640px" height="360px"></video>
<button class="previous">Previous</button>
<button class="next">Next</button>
<div class="autoadvance-group">
<h4>Auto-advance (in seconds)</h4>
<label><input type="radio" name="autoadvance" value="null" checked> No auto-advance</label>
<label><input type="radio" name="autoadvance" value="0"> 0</label>
<label><input type="radio" name="autoadvance" value="5"> 5</label>
<label><input type="radio" name="autoadvance" value="10"> 10</label>
<label><input type="radio" name="autoadvance" value="30"> 30</label>
<div class="options">
<div class="autoadvance-group">
<h4>Auto-advance (in seconds)</h4>
<label><input type="radio" name="autoadvance" value="null" checked> No auto-advance</label>
<label><input type="radio" name="autoadvance" value="0"> 0</label>
<label><input type="radio" name="autoadvance" value="5"> 5</label>
<label><input type="radio" name="autoadvance" value="10"> 10</label>
<label><input type="radio" name="autoadvance" value="30"> 30</label>
</div>
<div class="repeat-group">
<h4>Repeat</h4>
<label><input class="repeat" type="checkbox" name="repeat" > Enable Repeat</label>
</div>
</div>
<ul>
<li><a href="/test/">Run unit tests in browser.</a></li>
Expand Down Expand Up @@ -95,6 +101,10 @@ <h4>Auto-advance (in seconds)</h4>
player.playlist.autoadvance(JSON.parse(value));
});
});

document.querySelector('.repeat').addEventListener('click', function() {
player.playlist.repeat(this.checked);
});
</script>
</body>
</html>

0 comments on commit 10496e1

Please sign in to comment.