improve quality-select
This commit is contained in:
parent
ecb8d406f8
commit
8b745907cc
@ -118,11 +118,4 @@
|
|||||||
},
|
},
|
||||||
settings: ['captions', 'quality', 'speed', 'loop'],
|
settings: ['captions', 'quality', 'speed', 'loop'],
|
||||||
});
|
});
|
||||||
|
|
||||||
// Hide the external quality selector
|
|
||||||
window.addEventListener('DOMContentLoaded', function(){
|
|
||||||
const qs = document.getElementById('quality-select');
|
|
||||||
if (qs)
|
|
||||||
qs.hidden = true;
|
|
||||||
});
|
|
||||||
}());
|
}());
|
||||||
|
@ -31,11 +31,12 @@ if (data.using_pair_sources) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Quality selector
|
// Quality selector
|
||||||
document.getElementById('quality-select').addEventListener(
|
const qs = document.getElementById('quality-select');
|
||||||
'change', function(e) {
|
if (qs) {
|
||||||
changeQuality(JSON.parse(this.value))
|
qs.addEventListener('change', function(e) {
|
||||||
}
|
changeQuality(JSON.parse(this.value))
|
||||||
);
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// Set up video start time from &t parameter
|
// Set up video start time from &t parameter
|
||||||
if (data.time_start != 0 && video) {video.currentTime = data.time_start};
|
if (data.time_start != 0 && video) {video.currentTime = data.time_start};
|
||||||
|
@ -82,14 +82,16 @@
|
|||||||
|
|
||||||
<div class="external-player-controls">
|
<div class="external-player-controls">
|
||||||
<input class="speed" id="speed-control" type="text" title="Video speed">
|
<input class="speed" id="speed-control" type="text" title="Video speed">
|
||||||
<select id="quality-select" autocomplete="off">
|
{% if settings.use_video_player != 2 %}
|
||||||
{% for src in uni_sources %}
|
<select id="quality-select" autocomplete="off">
|
||||||
<option value='{"type": "uni", "index": {{ loop.index0 }}}' {{ 'selected' if loop.index0 == uni_idx and not using_pair_sources else '' }} >{{ src['quality_string'] }}</option>
|
{% for src in uni_sources %}
|
||||||
{% endfor %}
|
<option value='{"type": "uni", "index": {{ loop.index0 }}}' {{ 'selected' if loop.index0 == uni_idx and not using_pair_sources else '' }} >{{ src['quality_string'] }}</option>
|
||||||
{% for src_pair in pair_sources %}
|
{% endfor %}
|
||||||
<option value='{"type": "pair", "index": {{ loop.index0}}}' {{ 'selected' if loop.index0 == pair_idx and using_pair_sources else '' }} >{{ src_pair['quality_string'] }}</option>
|
{% for src_pair in pair_sources %}
|
||||||
{% endfor %}
|
<option value='{"type": "pair", "index": {{ loop.index0}}}' {{ 'selected' if loop.index0 == pair_idx and using_pair_sources else '' }} >{{ src_pair['quality_string'] }}</option>
|
||||||
</select>
|
{% endfor %}
|
||||||
|
</select>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<input class="v-checkbox" name="video_info_list" value="{{ video_info }}" form="playlist-edit" type="checkbox">
|
<input class="v-checkbox" name="video_info_list" value="{{ video_info }}" form="playlist-edit" type="checkbox">
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user