Explorar o código

feat: advanced cfg option for setting thumbnail object-fit

Sv443 hai 1 ano
pai
achega
ebebfe6550

+ 44 - 16
assets/translations/README.md

@@ -20,15 +20,15 @@ To submit or edit a translation, please follow [this guide](../../contributing.m
 ### Translation progress:
 |   | Locale | Translated keys | Based on |
 | :----: | ------ | --------------- | :------: |
-| ─ | [`en_US`](./en_US.json) | 193 (default locale) |  |
-| ‼️ | [`de_DE`](./de_DE.json) | `161/193` (83.4%) | ─ |
-| ─ | [`en_UK`](./en_UK.json) | `193/193` (100%) | `en_US` |
-| ‼️ | [`es_ES`](./es_ES.json) | `161/193` (83.4%) | ─ |
-| ‼️ | [`fr_FR`](./fr_FR.json) | `161/193` (83.4%) | ─ |
-| ‼️ | [`hi_IN`](./hi_IN.json) | `161/193` (83.4%) | ─ |
-| ‼️ | [`ja_JA`](./ja_JA.json) | `161/193` (83.4%) | ─ |
-| ‼️ | [`pt_BR`](./pt_BR.json) | `161/193` (83.4%) | ─ |
-| ‼️ | [`zh_CN`](./zh_CN.json) | `161/193` (83.4%) | ─ |
+| ─ | [`en_US`](./en_US.json) | 197 (default locale) |  |
+| ‼️ | [`de_DE`](./de_DE.json) | `161/197` (81.7%) | ─ |
+| ─ | [`en_UK`](./en_UK.json) | `197/197` (100%) | `en_US` |
+| ‼️ | [`es_ES`](./es_ES.json) | `161/197` (81.7%) | ─ |
+| ‼️ | [`fr_FR`](./fr_FR.json) | `161/197` (81.7%) | ─ |
+| ‼️ | [`hi_IN`](./hi_IN.json) | `161/197` (81.7%) | ─ |
+| ‼️ | [`ja_JA`](./ja_JA.json) | `161/197` (81.7%) | ─ |
+| ‼️ | [`pt_BR`](./pt_BR.json) | `161/197` (81.7%) | ─ |
+| ‼️ | [`zh_CN`](./zh_CN.json) | `161/197` (81.7%) | ─ |
 
 <sub>
 ✅ - Fully translated
@@ -49,7 +49,7 @@ This means to figure out which keys are untranslated, you will need to manually
 
 ### Missing keys:
 
-<details><summary><code>de_DE</code> - 32 missing keys <i>(click to show)</i></summary><br>
+<details><summary><code>de_DE</code> - 36 missing keys <i>(click to show)</i></summary><br>
 
 | Key | English text |
 | --- | ------------ |
@@ -69,6 +69,9 @@ This means to figure out which keys are untranslated, you will need to manually
 | `thumbnail_overlay_toggle_btn_tooltip_hide` | `Disable the thumbnail overlay - middle-click or shift-click to open in a new tab` |
 | `thumbnail_overlay_toggle_btn_tooltip_show` | `Enable the thumbnail overlay - middle-click or shift-click to open in a new tab` |
 | `thumbnail_overlay_indicator_tooltip` | `The thumbnail overlay is currently active` |
+| `thumbnail_overlay_image_fit_crop` | `Crop if necessary` |
+| `thumbnail_overlay_image_fit_full` | `Show full image` |
+| `thumbnail_overlay_image_fit_stretch` | `Stretch to fit` |
 | `feature_category_volume` | `Volume` |
 | `feature_desc_volumeSharedBetweenTabs` | `Should the set volume be shared between tabs and remembered between sessions?` |
 | `feature_helptext_volumeSharedBetweenTabs` | `If you change the volume in one tab, the volume level will be set to the same value in all other tabs that have this feature enabled.\nThis value will be remembered and restored across sessions, until disabled.` |
@@ -80,6 +83,7 @@ This means to figure out which keys are untranslated, you will need to manually
 | `feature_desc_thumbnailOverlayToggleBtnShown` | `Add a button to the media controls to manually toggle the thumbnail overlay` |
 | `feature_helptext_thumbnailOverlayToggleBtnShown` | `This button will allow you to manually toggle the thumbnail overlay on and off.\nOnce a new video or song starts playing, the default state will be restored.\nHold shift while clicking or press the middle mouse button to open the thumbnail of the highest quality in a new tab.` |
 | `feature_desc_thumbnailOverlayShowIndicator` | `Show an indicator in the bottom right corner of the thumbnail overlay while it's active?` |
+| `feature_desc_thumbnailOverlayImageFit` | `How to fit the thumbnail image into the overlay` |
 | `feature_desc_rememberSongTimeDuration` | `How long in seconds to remember the song's time for after it was last played` |
 | `feature_desc_rememberSongTimeReduction` | `How many seconds to subtract when restoring the time of a remembered song` |
 | `feature_helptext_rememberSongTimeReduction` | `When restoring the time of a song that was remembered, this amount of seconds will be subtracted from the remembered time so you can re-listen to the part that was interrupted.` |
@@ -88,7 +92,7 @@ This means to figure out which keys are untranslated, you will need to manually
 
 <br></details>
 
-<details><summary><code>es_ES</code> - 32 missing keys <i>(click to show)</i></summary><br>
+<details><summary><code>es_ES</code> - 36 missing keys <i>(click to show)</i></summary><br>
 
 | Key | English text |
 | --- | ------------ |
@@ -108,6 +112,9 @@ This means to figure out which keys are untranslated, you will need to manually
 | `thumbnail_overlay_toggle_btn_tooltip_hide` | `Disable the thumbnail overlay - middle-click or shift-click to open in a new tab` |
 | `thumbnail_overlay_toggle_btn_tooltip_show` | `Enable the thumbnail overlay - middle-click or shift-click to open in a new tab` |
 | `thumbnail_overlay_indicator_tooltip` | `The thumbnail overlay is currently active` |
+| `thumbnail_overlay_image_fit_crop` | `Crop if necessary` |
+| `thumbnail_overlay_image_fit_full` | `Show full image` |
+| `thumbnail_overlay_image_fit_stretch` | `Stretch to fit` |
 | `feature_category_volume` | `Volume` |
 | `feature_desc_volumeSharedBetweenTabs` | `Should the set volume be shared between tabs and remembered between sessions?` |
 | `feature_helptext_volumeSharedBetweenTabs` | `If you change the volume in one tab, the volume level will be set to the same value in all other tabs that have this feature enabled.\nThis value will be remembered and restored across sessions, until disabled.` |
@@ -119,6 +126,7 @@ This means to figure out which keys are untranslated, you will need to manually
 | `feature_desc_thumbnailOverlayToggleBtnShown` | `Add a button to the media controls to manually toggle the thumbnail overlay` |
 | `feature_helptext_thumbnailOverlayToggleBtnShown` | `This button will allow you to manually toggle the thumbnail overlay on and off.\nOnce a new video or song starts playing, the default state will be restored.\nHold shift while clicking or press the middle mouse button to open the thumbnail of the highest quality in a new tab.` |
 | `feature_desc_thumbnailOverlayShowIndicator` | `Show an indicator in the bottom right corner of the thumbnail overlay while it's active?` |
+| `feature_desc_thumbnailOverlayImageFit` | `How to fit the thumbnail image into the overlay` |
 | `feature_desc_rememberSongTimeDuration` | `How long in seconds to remember the song's time for after it was last played` |
 | `feature_desc_rememberSongTimeReduction` | `How many seconds to subtract when restoring the time of a remembered song` |
 | `feature_helptext_rememberSongTimeReduction` | `When restoring the time of a song that was remembered, this amount of seconds will be subtracted from the remembered time so you can re-listen to the part that was interrupted.` |
@@ -127,7 +135,7 @@ This means to figure out which keys are untranslated, you will need to manually
 
 <br></details>
 
-<details><summary><code>fr_FR</code> - 32 missing keys <i>(click to show)</i></summary><br>
+<details><summary><code>fr_FR</code> - 36 missing keys <i>(click to show)</i></summary><br>
 
 | Key | English text |
 | --- | ------------ |
@@ -147,6 +155,9 @@ This means to figure out which keys are untranslated, you will need to manually
 | `thumbnail_overlay_toggle_btn_tooltip_hide` | `Disable the thumbnail overlay - middle-click or shift-click to open in a new tab` |
 | `thumbnail_overlay_toggle_btn_tooltip_show` | `Enable the thumbnail overlay - middle-click or shift-click to open in a new tab` |
 | `thumbnail_overlay_indicator_tooltip` | `The thumbnail overlay is currently active` |
+| `thumbnail_overlay_image_fit_crop` | `Crop if necessary` |
+| `thumbnail_overlay_image_fit_full` | `Show full image` |
+| `thumbnail_overlay_image_fit_stretch` | `Stretch to fit` |
 | `feature_category_volume` | `Volume` |
 | `feature_desc_volumeSharedBetweenTabs` | `Should the set volume be shared between tabs and remembered between sessions?` |
 | `feature_helptext_volumeSharedBetweenTabs` | `If you change the volume in one tab, the volume level will be set to the same value in all other tabs that have this feature enabled.\nThis value will be remembered and restored across sessions, until disabled.` |
@@ -158,6 +169,7 @@ This means to figure out which keys are untranslated, you will need to manually
 | `feature_desc_thumbnailOverlayToggleBtnShown` | `Add a button to the media controls to manually toggle the thumbnail overlay` |
 | `feature_helptext_thumbnailOverlayToggleBtnShown` | `This button will allow you to manually toggle the thumbnail overlay on and off.\nOnce a new video or song starts playing, the default state will be restored.\nHold shift while clicking or press the middle mouse button to open the thumbnail of the highest quality in a new tab.` |
 | `feature_desc_thumbnailOverlayShowIndicator` | `Show an indicator in the bottom right corner of the thumbnail overlay while it's active?` |
+| `feature_desc_thumbnailOverlayImageFit` | `How to fit the thumbnail image into the overlay` |
 | `feature_desc_rememberSongTimeDuration` | `How long in seconds to remember the song's time for after it was last played` |
 | `feature_desc_rememberSongTimeReduction` | `How many seconds to subtract when restoring the time of a remembered song` |
 | `feature_helptext_rememberSongTimeReduction` | `When restoring the time of a song that was remembered, this amount of seconds will be subtracted from the remembered time so you can re-listen to the part that was interrupted.` |
@@ -166,7 +178,7 @@ This means to figure out which keys are untranslated, you will need to manually
 
 <br></details>
 
-<details><summary><code>hi_IN</code> - 32 missing keys <i>(click to show)</i></summary><br>
+<details><summary><code>hi_IN</code> - 36 missing keys <i>(click to show)</i></summary><br>
 
 | Key | English text |
 | --- | ------------ |
@@ -186,6 +198,9 @@ This means to figure out which keys are untranslated, you will need to manually
 | `thumbnail_overlay_toggle_btn_tooltip_hide` | `Disable the thumbnail overlay - middle-click or shift-click to open in a new tab` |
 | `thumbnail_overlay_toggle_btn_tooltip_show` | `Enable the thumbnail overlay - middle-click or shift-click to open in a new tab` |
 | `thumbnail_overlay_indicator_tooltip` | `The thumbnail overlay is currently active` |
+| `thumbnail_overlay_image_fit_crop` | `Crop if necessary` |
+| `thumbnail_overlay_image_fit_full` | `Show full image` |
+| `thumbnail_overlay_image_fit_stretch` | `Stretch to fit` |
 | `feature_category_volume` | `Volume` |
 | `feature_desc_volumeSharedBetweenTabs` | `Should the set volume be shared between tabs and remembered between sessions?` |
 | `feature_helptext_volumeSharedBetweenTabs` | `If you change the volume in one tab, the volume level will be set to the same value in all other tabs that have this feature enabled.\nThis value will be remembered and restored across sessions, until disabled.` |
@@ -197,6 +212,7 @@ This means to figure out which keys are untranslated, you will need to manually
 | `feature_desc_thumbnailOverlayToggleBtnShown` | `Add a button to the media controls to manually toggle the thumbnail overlay` |
 | `feature_helptext_thumbnailOverlayToggleBtnShown` | `This button will allow you to manually toggle the thumbnail overlay on and off.\nOnce a new video or song starts playing, the default state will be restored.\nHold shift while clicking or press the middle mouse button to open the thumbnail of the highest quality in a new tab.` |
 | `feature_desc_thumbnailOverlayShowIndicator` | `Show an indicator in the bottom right corner of the thumbnail overlay while it's active?` |
+| `feature_desc_thumbnailOverlayImageFit` | `How to fit the thumbnail image into the overlay` |
 | `feature_desc_rememberSongTimeDuration` | `How long in seconds to remember the song's time for after it was last played` |
 | `feature_desc_rememberSongTimeReduction` | `How many seconds to subtract when restoring the time of a remembered song` |
 | `feature_helptext_rememberSongTimeReduction` | `When restoring the time of a song that was remembered, this amount of seconds will be subtracted from the remembered time so you can re-listen to the part that was interrupted.` |
@@ -205,7 +221,7 @@ This means to figure out which keys are untranslated, you will need to manually
 
 <br></details>
 
-<details><summary><code>ja_JA</code> - 32 missing keys <i>(click to show)</i></summary><br>
+<details><summary><code>ja_JA</code> - 36 missing keys <i>(click to show)</i></summary><br>
 
 | Key | English text |
 | --- | ------------ |
@@ -225,6 +241,9 @@ This means to figure out which keys are untranslated, you will need to manually
 | `thumbnail_overlay_toggle_btn_tooltip_hide` | `Disable the thumbnail overlay - middle-click or shift-click to open in a new tab` |
 | `thumbnail_overlay_toggle_btn_tooltip_show` | `Enable the thumbnail overlay - middle-click or shift-click to open in a new tab` |
 | `thumbnail_overlay_indicator_tooltip` | `The thumbnail overlay is currently active` |
+| `thumbnail_overlay_image_fit_crop` | `Crop if necessary` |
+| `thumbnail_overlay_image_fit_full` | `Show full image` |
+| `thumbnail_overlay_image_fit_stretch` | `Stretch to fit` |
 | `feature_category_volume` | `Volume` |
 | `feature_desc_volumeSharedBetweenTabs` | `Should the set volume be shared between tabs and remembered between sessions?` |
 | `feature_helptext_volumeSharedBetweenTabs` | `If you change the volume in one tab, the volume level will be set to the same value in all other tabs that have this feature enabled.\nThis value will be remembered and restored across sessions, until disabled.` |
@@ -236,6 +255,7 @@ This means to figure out which keys are untranslated, you will need to manually
 | `feature_desc_thumbnailOverlayToggleBtnShown` | `Add a button to the media controls to manually toggle the thumbnail overlay` |
 | `feature_helptext_thumbnailOverlayToggleBtnShown` | `This button will allow you to manually toggle the thumbnail overlay on and off.\nOnce a new video or song starts playing, the default state will be restored.\nHold shift while clicking or press the middle mouse button to open the thumbnail of the highest quality in a new tab.` |
 | `feature_desc_thumbnailOverlayShowIndicator` | `Show an indicator in the bottom right corner of the thumbnail overlay while it's active?` |
+| `feature_desc_thumbnailOverlayImageFit` | `How to fit the thumbnail image into the overlay` |
 | `feature_desc_rememberSongTimeDuration` | `How long in seconds to remember the song's time for after it was last played` |
 | `feature_desc_rememberSongTimeReduction` | `How many seconds to subtract when restoring the time of a remembered song` |
 | `feature_helptext_rememberSongTimeReduction` | `When restoring the time of a song that was remembered, this amount of seconds will be subtracted from the remembered time so you can re-listen to the part that was interrupted.` |
@@ -244,7 +264,7 @@ This means to figure out which keys are untranslated, you will need to manually
 
 <br></details>
 
-<details><summary><code>pt_BR</code> - 32 missing keys <i>(click to show)</i></summary><br>
+<details><summary><code>pt_BR</code> - 36 missing keys <i>(click to show)</i></summary><br>
 
 | Key | English text |
 | --- | ------------ |
@@ -264,6 +284,9 @@ This means to figure out which keys are untranslated, you will need to manually
 | `thumbnail_overlay_toggle_btn_tooltip_hide` | `Disable the thumbnail overlay - middle-click or shift-click to open in a new tab` |
 | `thumbnail_overlay_toggle_btn_tooltip_show` | `Enable the thumbnail overlay - middle-click or shift-click to open in a new tab` |
 | `thumbnail_overlay_indicator_tooltip` | `The thumbnail overlay is currently active` |
+| `thumbnail_overlay_image_fit_crop` | `Crop if necessary` |
+| `thumbnail_overlay_image_fit_full` | `Show full image` |
+| `thumbnail_overlay_image_fit_stretch` | `Stretch to fit` |
 | `feature_category_volume` | `Volume` |
 | `feature_desc_volumeSharedBetweenTabs` | `Should the set volume be shared between tabs and remembered between sessions?` |
 | `feature_helptext_volumeSharedBetweenTabs` | `If you change the volume in one tab, the volume level will be set to the same value in all other tabs that have this feature enabled.\nThis value will be remembered and restored across sessions, until disabled.` |
@@ -275,6 +298,7 @@ This means to figure out which keys are untranslated, you will need to manually
 | `feature_desc_thumbnailOverlayToggleBtnShown` | `Add a button to the media controls to manually toggle the thumbnail overlay` |
 | `feature_helptext_thumbnailOverlayToggleBtnShown` | `This button will allow you to manually toggle the thumbnail overlay on and off.\nOnce a new video or song starts playing, the default state will be restored.\nHold shift while clicking or press the middle mouse button to open the thumbnail of the highest quality in a new tab.` |
 | `feature_desc_thumbnailOverlayShowIndicator` | `Show an indicator in the bottom right corner of the thumbnail overlay while it's active?` |
+| `feature_desc_thumbnailOverlayImageFit` | `How to fit the thumbnail image into the overlay` |
 | `feature_desc_rememberSongTimeDuration` | `How long in seconds to remember the song's time for after it was last played` |
 | `feature_desc_rememberSongTimeReduction` | `How many seconds to subtract when restoring the time of a remembered song` |
 | `feature_helptext_rememberSongTimeReduction` | `When restoring the time of a song that was remembered, this amount of seconds will be subtracted from the remembered time so you can re-listen to the part that was interrupted.` |
@@ -283,7 +307,7 @@ This means to figure out which keys are untranslated, you will need to manually
 
 <br></details>
 
-<details><summary><code>zh_CN</code> - 32 missing keys <i>(click to show)</i></summary><br>
+<details><summary><code>zh_CN</code> - 36 missing keys <i>(click to show)</i></summary><br>
 
 | Key | English text |
 | --- | ------------ |
@@ -303,6 +327,9 @@ This means to figure out which keys are untranslated, you will need to manually
 | `thumbnail_overlay_toggle_btn_tooltip_hide` | `Disable the thumbnail overlay - middle-click or shift-click to open in a new tab` |
 | `thumbnail_overlay_toggle_btn_tooltip_show` | `Enable the thumbnail overlay - middle-click or shift-click to open in a new tab` |
 | `thumbnail_overlay_indicator_tooltip` | `The thumbnail overlay is currently active` |
+| `thumbnail_overlay_image_fit_crop` | `Crop if necessary` |
+| `thumbnail_overlay_image_fit_full` | `Show full image` |
+| `thumbnail_overlay_image_fit_stretch` | `Stretch to fit` |
 | `feature_category_volume` | `Volume` |
 | `feature_desc_volumeSharedBetweenTabs` | `Should the set volume be shared between tabs and remembered between sessions?` |
 | `feature_helptext_volumeSharedBetweenTabs` | `If you change the volume in one tab, the volume level will be set to the same value in all other tabs that have this feature enabled.\nThis value will be remembered and restored across sessions, until disabled.` |
@@ -314,6 +341,7 @@ This means to figure out which keys are untranslated, you will need to manually
 | `feature_desc_thumbnailOverlayToggleBtnShown` | `Add a button to the media controls to manually toggle the thumbnail overlay` |
 | `feature_helptext_thumbnailOverlayToggleBtnShown` | `This button will allow you to manually toggle the thumbnail overlay on and off.\nOnce a new video or song starts playing, the default state will be restored.\nHold shift while clicking or press the middle mouse button to open the thumbnail of the highest quality in a new tab.` |
 | `feature_desc_thumbnailOverlayShowIndicator` | `Show an indicator in the bottom right corner of the thumbnail overlay while it's active?` |
+| `feature_desc_thumbnailOverlayImageFit` | `How to fit the thumbnail image into the overlay` |
 | `feature_desc_rememberSongTimeDuration` | `How long in seconds to remember the song's time for after it was last played` |
 | `feature_desc_rememberSongTimeReduction` | `How many seconds to subtract when restoring the time of a remembered song` |
 | `feature_helptext_rememberSongTimeReduction` | `When restoring the time of a song that was remembered, this amount of seconds will be subtracted from the remembered time so you can re-listen to the part that was interrupted.` |

+ 4 - 0
assets/translations/en_US.json

@@ -118,6 +118,9 @@
     "thumbnail_overlay_toggle_btn_tooltip_hide": "Disable the thumbnail overlay - middle-click or shift-click to open in a new tab",
     "thumbnail_overlay_toggle_btn_tooltip_show": "Enable the thumbnail overlay - middle-click or shift-click to open in a new tab",
     "thumbnail_overlay_indicator_tooltip": "The thumbnail overlay is currently active",
+    "thumbnail_overlay_image_fit_crop": "Crop if necessary",
+    "thumbnail_overlay_image_fit_full": "Show full image",
+    "thumbnail_overlay_image_fit_stretch": "Stretch to fit",
 
     "unit_entries-1": "entry",
     "unit_entries-n": "entries",
@@ -156,6 +159,7 @@
     "feature_desc_thumbnailOverlayToggleBtnShown": "Add a button to the media controls to manually toggle the thumbnail overlay",
     "feature_helptext_thumbnailOverlayToggleBtnShown": "This button will allow you to manually toggle the thumbnail overlay on and off.\nOnce a new video or song starts playing, the default state will be restored.\nHold shift while clicking or press the middle mouse button to open the thumbnail of the highest quality in a new tab.",
     "feature_desc_thumbnailOverlayShowIndicator": "Show an indicator in the bottom right corner of the thumbnail overlay while it's active?",
+    "feature_desc_thumbnailOverlayImageFit": "How to fit the thumbnail image into the overlay",
 
     "feature_desc_lyricsQueueButton": "Add a button to each song in a queue to quickly open its lyrics page",
     "feature_desc_deleteFromQueueButton": "Add a button to each song in a queue to quickly remove it",

+ 1 - 1
src/components/BytmDialog.css

@@ -203,7 +203,7 @@
 }
 
 .bytm-ftconf-category-header {
-  font-size: 18px;
+  font-size: 20px;
   margin-top: 32px;
   margin-bottom: 8px;
   padding: 0px 20px;

+ 1 - 1
src/config.ts

@@ -53,7 +53,7 @@ export const migrations: DataMigrationsDict = {
     "rememberSongTimeMinPlayTime", "volumeSharedBetweenTabs",
     "setInitialTabVolume", "initialTabVolumeLevel",
     "thumbnailOverlayBehavior", "thumbnailOverlayToggleBtnShown",
-    "thumbnailOverlayShowIndicator",
+    "thumbnailOverlayShowIndicator", "thumbnailOverlayImageFit",
   ], oldData),
   // TODO: once advanced filtering is fully implemented, clear cache on migration to fv6
   // 5 -> 6 (v1.3)

+ 15 - 0
src/features/index.ts

@@ -138,6 +138,21 @@ export const featInfo = {
     // TODO: to be reworked or removed in the big menu rework
     textAdornment: adornments.advanced,
   },
+  thumbnailOverlayImageFit: {
+    type: "select",
+    category: "layout",
+    options: () => [
+      { value: "cover", label: t("thumbnail_overlay_image_fit_crop") },
+      { value: "contain", label: t("thumbnail_overlay_image_fit_full") },
+      { value: "fill", label: t("thumbnail_overlay_image_fit_stretch") },
+    ],
+    default: "cover",
+    enable: noopTODO,
+    change: noopTODO,
+    advanced: true,
+    // TODO: to be reworked or removed in the big menu rework
+    textAdornment: adornments.advanced,
+  },
 
   //#SECTION volume
   volumeSliderLabel: {

+ 0 - 1
src/features/layout.css

@@ -240,7 +240,6 @@ yt-multi-page-menu-section-renderer.ytd-multi-page-menu-renderer {
   position: relative;
   width: 100%;
   height: 100%;
-  object-fit: cover;
 }
 
 #bytm-thumbnail-overlay-indicator {

+ 1 - 0
src/features/layout.ts

@@ -466,6 +466,7 @@ export async function initThumbnailOverlay() {
     thumbImgElem.id = "bytm-thumbnail-overlay-img";
     thumbImgElem.role = "presentation";
     thumbImgElem.ariaHidden = "true";
+    thumbImgElem.style.objectFit = getFeatures().thumbnailOverlayImageFit;
   
     overlayElem.appendChild(thumbImgElem);
     playerEl.appendChild(overlayElem);

+ 2 - 0
src/types.ts

@@ -322,6 +322,8 @@ export interface FeatureConfig {
   thumbnailOverlayToggleBtnShown: boolean;
   /** Whether to show an indicator on the thumbnail overlay when it is active */
   thumbnailOverlayShowIndicator: boolean;
+  /** How to fit the thumbnail overlay image */
+  thumbnailOverlayImageFit: "cover" | "contain" | "fill";
 
   //#SECTION volume
   /** Add a percentage label to the volume slider */