Add setting to autoplay videos
This commit is contained in:
parent
97972d6fa3
commit
b215e2a3b2
@ -151,6 +151,13 @@ For security reasons, enabling this is not recommended.''',
|
|||||||
'category': 'interface',
|
'category': 'interface',
|
||||||
}),
|
}),
|
||||||
|
|
||||||
|
('autoplay_videos', {
|
||||||
|
'type': bool,
|
||||||
|
'default': False,
|
||||||
|
'comment': '',
|
||||||
|
'category': 'playback',
|
||||||
|
}),
|
||||||
|
|
||||||
('default_resolution', {
|
('default_resolution', {
|
||||||
'type': int,
|
'type': int,
|
||||||
'default': 720,
|
'default': 720,
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
</div>
|
</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
<figure class="sc-video">
|
<figure class="sc-video">
|
||||||
<video id="js-video-player" playsinline controls>
|
<video id="js-video-player" playsinline controls {{ 'autoplay' if settings.autoplay_videos }}>
|
||||||
{% if uni_sources %}
|
{% if uni_sources %}
|
||||||
<source src="{{ uni_sources[uni_idx]['url'] }}" type="{{ uni_sources[uni_idx]['type'] }}" data-res="{{ uni_sources[uni_idx]['quality'] }}">
|
<source src="{{ uni_sources[uni_idx]['url'] }}" type="{{ uni_sources[uni_idx]['type'] }}" data-res="{{ uni_sources[uni_idx]['quality'] }}">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user