diff --git a/packages/react/src/components/layouts/default/shared-layout.tsx b/packages/react/src/components/layouts/default/shared-layout.tsx index f6b528941..dbfc60912 100644 --- a/packages/react/src/components/layouts/default/shared-layout.tsx +++ b/packages/react/src/components/layouts/default/shared-layout.tsx @@ -477,14 +477,21 @@ export { DefaultTimeInfo }; * -----------------------------------------------------------------------------------------------*/ function DefaultChaptersMenu({ tooltip, placement, portalClass }: DefaultMediaMenuProps) { - const { showMenuDelay, noModal, isSmallLayout, Icons } = React.useContext(DefaultLayoutContext), + const { showMenuDelay, noModal, isSmallLayout, Icons, menuGroup } = + React.useContext(DefaultLayoutContext), chaptersText = useDefaultLayoutLang('Chapters'), options = useChapterOptions(), disabled = !options.length, - { thumbnails } = React.useContext(DefaultLayoutContext); + { thumbnails } = React.useContext(DefaultLayoutContext), + $viewType = useMediaState('viewType'), + $offset = !isSmallLayout && menuGroup === 'bottom' && $viewType === 'video' ? 26 : 0; const Content = ( - + + diff --git a/packages/vidstack/src/elements/define/layouts/default/shared-layout.ts b/packages/vidstack/src/elements/define/layouts/default/shared-layout.ts index bf85965e8..666f491eb 100644 --- a/packages/vidstack/src/elements/define/layouts/default/shared-layout.ts +++ b/packages/vidstack/src/elements/define/layouts/default/shared-layout.ts @@ -226,12 +226,15 @@ export function DefaultChaptersMenu({ placement: MenuPlacement | ReadSignal; tooltip: TooltipPlacement | ReadSignal; }) { - const { translations, smQueryList, thumbnails, menuContainer, noModal, menuGroup } = + const { viewType } = useMediaContext().$state, + { translations, smQueryList, thumbnails, menuContainer, noModal, menuGroup } = useDefaultLayoutContext(), $placement = computed(() => noModal() ? unwrap(placement) : !smQueryList.matches ? unwrap(placement) : null, ), - $offset = computed(() => (!smQueryList.matches && menuGroup() === 'bottom' ? 26 : 0)); + $offset = computed(() => + !smQueryList.matches && menuGroup() === 'bottom' && viewType() === 'video' ? 26 : 0, + ); const items = html` ; placement: MenuPlacement | ReadSignal; }) { - const { translations, smQueryList, menuContainer, noModal, menuGroup } = - useDefaultLayoutContext(), + const { viewType } = useMediaContext().$state, + { translations, smQueryList, menuContainer, noModal, menuGroup } = useDefaultLayoutContext(), $placement = computed(() => noModal() ? unwrap(placement) : !smQueryList.matches ? unwrap(placement) : null, ), - $offset = computed(() => (!smQueryList.matches && menuGroup() === 'bottom' ? 26 : 0)); + $offset = computed(() => + !smQueryList.matches && menuGroup() === 'bottom' && viewType() === 'video' ? 26 : 0, + ); const items = html`