mirror of
https://git.nadeko.net/Fijxu/invidious.git
synced 2025-12-19 19:38:51 +00:00
Add speed and fix <select> options
This commit is contained in:
@@ -22,12 +22,21 @@ function update_value(element) {
|
||||
<input name="autoplay" id="autoplay" type="checkbox" <% if user.preferences.autoplay %>checked<% end %>>
|
||||
</div>
|
||||
|
||||
<div class="pure-control-group">
|
||||
<label for="speed">Default speed: </label>
|
||||
<select name="speed" id="speed">
|
||||
<% [2.0, 1.5, 1.0, 0.5].each do |option| %>
|
||||
<option <% if user.preferences.speed == option %> selected <% end %>><%= option %></option>
|
||||
<% end %>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="pure-control-group">
|
||||
<label for="quality">Preferred video quality: </label>
|
||||
<select name="quality" id="quality" selected="<%= user.preferences.quality %>">
|
||||
<option>hd720</option>
|
||||
<option>medium</option>
|
||||
<option>small</option>
|
||||
<select name="quality" id="quality">
|
||||
<% ["hd720", "medium", "small"].each do |option| %>
|
||||
<option <% if user.preferences.quality == option %> selected <% end %>><%= option %></option>
|
||||
<% end %>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -91,6 +91,7 @@ var player = videojs('player', options, function() {
|
||||
|
||||
<% if preferences %>
|
||||
player.volume(<%= preferences.volume.to_f / 100 %>);
|
||||
player.playbackRate(<%= preferences.speed %>);
|
||||
<% end %>
|
||||
player.offset({
|
||||
start: <%= video_start %>,
|
||||
|
||||
Reference in New Issue
Block a user