@@ -1104,6 +1104,7 @@ function captureInitialAdminConfig() {
11041104 brandingHeaderBgDark : ( document . getElementById ( "brandingHeaderBgDark" ) ?. value || "" ) . trim ( ) ,
11051105 brandingFooterHtml : ( document . getElementById ( "brandingFooterHtml" ) ?. value || "" ) . trim ( ) ,
11061106 hoverPreviewMaxImageMb : ( document . getElementById ( "hoverPreviewMaxImageMb" ) ?. value || "" ) . trim ( ) ,
1107+ hoverPreviewMaxVideoMb : ( document . getElementById ( "hoverPreviewMaxVideoMb" ) ?. value || "" ) . trim ( ) ,
11071108 fileListSummaryDepth : ( document . getElementById ( "fileListSummaryDepth" ) ?. value || "" ) . trim ( ) ,
11081109
11091110 clamavScanUploads : ! ! document . getElementById ( "clamavScanUploads" ) ?. checked ,
@@ -1145,6 +1146,7 @@ function hasUnsavedChanges() {
11451146 getVal ( "brandingHeaderBgDark" ) !== ( o . brandingHeaderBgDark || "" ) ||
11461147 getVal ( "brandingFooterHtml" ) !== ( o . brandingFooterHtml || "" ) ||
11471148 getVal ( "hoverPreviewMaxImageMb" ) !== ( o . hoverPreviewMaxImageMb || "" ) ||
1149+ getVal ( "hoverPreviewMaxVideoMb" ) !== ( o . hoverPreviewMaxVideoMb || "" ) ||
11481150 getVal ( "fileListSummaryDepth" ) !== ( o . fileListSummaryDepth || "" ) ||
11491151 getChk ( "clamavScanUploads" ) !== o . clamavScanUploads ||
11501152 getChk ( "proSearchEnabled" ) !== o . proSearchEnabled ||
@@ -2232,6 +2234,10 @@ export function openAdminPanel() {
22322234 1 ,
22332235 Math . min ( 50 , parseInt ( displayCfg . hoverPreviewMaxImageMb || 8 , 10 ) || 8 )
22342236 ) ;
2237+ const hoverPreviewMaxVideoMb = Math . max (
2238+ 1 ,
2239+ Math . min ( 2048 , parseInt ( displayCfg . hoverPreviewMaxVideoMb || 200 , 10 ) || 200 )
2240+ ) ;
22352241 const rawSummaryDepth = parseInt ( displayCfg . fileListSummaryDepth , 10 ) ;
22362242 const fileListSummaryDepth = Math . max (
22372243 0 ,
@@ -2503,7 +2509,7 @@ export function openAdminPanel() {
25032509 </div>
25042510 </label>
25052511 <small class="text-muted d-block mb-1">
2506- ${ tf ( "hover_preview_max_image_help" , "Applies to hover previews and gallery thumbnails; larger values can increase bandwidth and memory use." ) }
2512+ ${ tf ( "hover_preview_max_image_help" , "Applies to hover previews and gallery thumbnails. Default 8 MB; higher values increase bandwidth and memory use." ) }
25072513 </small>
25082514 <input
25092515 type="number"
@@ -2516,6 +2522,27 @@ export function openAdminPanel() {
25162522 />
25172523 </div>
25182524
2525+ <!-- Display: Hover preview max video size -->
2526+ <div class="form-group" style="margin-top:16px;">
2527+ <label for="hoverPreviewMaxVideoMb">
2528+ <div class="admin-subsection-title" style="margin-top:2px;">
2529+ ${ tf ( "hover_preview_max_video_mb" , "Hover preview max video size (MB)" ) }
2530+ </div>
2531+ </label>
2532+ <small class="text-muted d-block mb-1">
2533+ ${ tf ( "hover_preview_max_video_help" , "Applies to hover previews and gallery thumbnails. Default 200 MB; higher values can increase bandwidth on large videos." ) }
2534+ </small>
2535+ <input
2536+ type="number"
2537+ id="hoverPreviewMaxVideoMb"
2538+ class="form-control"
2539+ min="1"
2540+ max="2048"
2541+ step="1"
2542+ value="${ hoverPreviewMaxVideoMb } "
2543+ />
2544+ </div>
2545+
25192546 <!-- Display: File list summary depth -->
25202547 <div class="form-group" style="margin-top:16px;">
25212548 <label for="fileListSummaryDepth">
@@ -4102,6 +4129,13 @@ function handleSave() {
41024129 parseInt ( document . getElementById ( "hoverPreviewMaxImageMb" ) ?. value || "8" , 10 ) || 8
41034130 )
41044131 ) ,
4132+ hoverPreviewMaxVideoMb : Math . max (
4133+ 1 ,
4134+ Math . min (
4135+ 2048 ,
4136+ parseInt ( document . getElementById ( "hoverPreviewMaxVideoMb" ) ?. value || "200" , 10 ) || 200
4137+ )
4138+ ) ,
41054139 fileListSummaryDepth : Math . max (
41064140 0 ,
41074141 Math . min (
0 commit comments