feat: add native player storyboard preview option
All checks were successful
CI / test (push) Successful in 45s

- Introduced `native_player_storyboard` setting with default disabled.
- Updated templates to conditionally load the storyboard preview script only for native players.
- Added descriptive comments for the new setting and template blocks.
This commit is contained in:
2026-04-20 02:43:41 -05:00
parent b320127f16
commit 3fe256ce29
3 changed files with 18 additions and 2 deletions

View File

@@ -261,6 +261,17 @@ For security reasons, enabling this is not recommended.''',
'category': 'interface', 'category': 'interface',
}), }),
('native_player_storyboard', {
'type': bool,
'default': False,
'label': 'Storyboard preview (native)',
'comment': '''Show thumbnail preview on hover (native player modes).
Positioning is heuristic; may misalign in Firefox/Safari.
Works best on Chromium browsers.
No effect in Plyr.''',
'category': 'interface',
}),
('use_video_download', { ('use_video_download', {
'type': int, 'type': int,
'default': 0, 'default': 0,

View File

@@ -105,5 +105,10 @@
{% if use_dash %} {% if use_dash %}
<script src="/youtube.com/static/js/av-merge.js"></script> <script src="/youtube.com/static/js/av-merge.js"></script>
{% endif %} {% endif %}
<!-- Storyboard Preview Thumbnails (native players only; Plyr handles this internally) -->
{% if settings.use_video_player != 2 and settings.native_player_storyboard %}
<script src="/youtube.com/static/js/storyboard-preview.js"></script>
{% endif %}
</body> </body>
</html> </html>

View File

@@ -304,8 +304,8 @@
<!-- /plyr --> <!-- /plyr -->
{% endif %} {% endif %}
<!-- Storyboard Preview Thumbnails --> <!-- Storyboard Preview Thumbnails (native players only; Plyr handles this internally) -->
{% if settings.use_video_player != 2 %} {% if settings.use_video_player != 2 and settings.native_player_storyboard %}
<script src="/youtube.com/static/js/storyboard-preview.js"></script> <script src="/youtube.com/static/js/storyboard-preview.js"></script>
{% endif %} {% endif %}