Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions app/ui/player/player.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,19 @@
}
}

.captions-btn {
@apply cursor-pointer;
transition-duration: 200ms;
&:hover {
scale: 105%;
}
}

.captions-btn[data-active] .captions-btn-image,
.captions-btn:not([data-active]) .close-captions-btn-image {
display: none;
}

// Для мобилок

.mob-buttons {
Expand Down
17 changes: 17 additions & 0 deletions app/ui/player/player.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
VolumeSlider,
Captions,
MediaPlayerInstance,
CaptionButton,
} from "@vidstack/react";
import Image from "next/image";
import clsx from "clsx";
Expand Down Expand Up @@ -282,6 +283,22 @@ export default function Player({
<div className="mobile:hidden compact:block relative">
<PlayerSettings />
</div>
<CaptionButton className={styles["captions-btn"]}>
<Image
className={styles["captions-btn-image"]}
src="/player/subtitles.svg"
alt="captions"
width={32}
height={32}
/>
<Image
className={styles["close-captions-btn-image"]}
src="/player/activeSubtitles.svg"
alt="close captions"
width={32}
height={32}
/>
</CaptionButton>
</div>
</div>
</div>
Expand Down
3 changes: 3 additions & 0 deletions public/player/activeSubtitles.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.