Added some functionality so we can modify the size of the playing video
This commit is contained in:
@@ -331,6 +331,22 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<h2>Video Player</h2>
|
||||
<div class="setting-row">
|
||||
<label>Player size
|
||||
<span class="setting-desc">
|
||||
{% if settings.video_width and settings.video_height %}
|
||||
Remembered at {{ settings.video_width }}×{{ settings.video_height }}px from your last resize
|
||||
{% else %}
|
||||
Using default responsive full-width sizing
|
||||
{% endif %}
|
||||
</span>
|
||||
</label>
|
||||
<button class="btn btn-secondary" onclick="resetVideoSize()">Reset size</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="actions">
|
||||
<button class="btn btn-secondary" onclick="resetSettings()">Reset to Defaults</button>
|
||||
<span id="save-status">✓ Saved</span>
|
||||
@@ -425,6 +441,19 @@
|
||||
});
|
||||
}
|
||||
|
||||
function resetVideoSize() {
|
||||
fetch('/api/settings', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ video_width: '', video_height: '' })
|
||||
})
|
||||
.then(r => r.json())
|
||||
.then(data => {
|
||||
if (data.success) location.reload();
|
||||
})
|
||||
.catch(err => console.error('Failed to reset video size:', err));
|
||||
}
|
||||
|
||||
function resetSettings() {
|
||||
fetch('/api/settings/reset', { method: 'POST' })
|
||||
.then(r => r.json())
|
||||
|
||||
Reference in New Issue
Block a user