Skip to content

Commit

Permalink
Prefer yellow subtitles
Browse files Browse the repository at this point in the history
  • Loading branch information
huy232 committed Oct 28, 2023
1 parent b7c9ac4 commit fa3f28e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Components/Content/ArtPlayer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ function ArtPlayer({
{
html: "Subtitle",
tooltip:
subtitles.find((sub) => sub.html.split(". ")[1] === selectedSub)?.html || "",
subtitles.find((sub) => sub.html.split(". ")[1] === selectedSub)
?.html || "",
icon: `<svg width="24" height="24" style="fill: #fffc" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path d="M0 96C0 60.7 28.7 32 64 32H512c35.3 0 64 28.7 64 64V416c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V96zM200 208c14.2 0 27 6.1 35.8 16c8.8 9.9 24 10.7 33.9 1.9s10.7-24 1.9-33.9c-17.5-19.6-43.1-32-71.5-32c-53 0-96 43-96 96s43 96 96 96c28.4 0 54-12.4 71.5-32c8.8-9.9 8-25-1.9-33.9s-25-8-33.9 1.9c-8.8 9.9-21.6 16-35.8 16c-26.5 0-48-21.5-48-48s21.5-48 48-48zm144 48c0-26.5 21.5-48 48-48c14.2 0 27 6.1 35.8 16c8.8 9.9 24 10.7 33.9 1.9s10.7-24 1.9-33.9c-17.5-19.6-43.1-32-71.5-32c-53 0-96 43-96 96s43 96 96 96c28.4 0 54-12.4 71.5-32c8.8-9.9 8-25-1.9-33.9s-25-8-33.9 1.9c-8.8 9.9-21.6 16-35.8 16c-26.5 0-48-21.5-48-48z"/></svg>`,
selector: [
{
Expand All @@ -128,7 +129,10 @@ function ArtPlayer({
...subtitles,
],
onSelect: function (item) {
localStorage.setItem("artplayer-language", item.html.split(". ")[1])
localStorage.setItem(
"artplayer-language",
item.html.split(". ")[1]
)
art.subtitle.switch(item.url, {
name: item.html,
})
Expand Down
1 change: 1 addition & 0 deletions src/Components/Content/VideoPlayer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ function VideoPlayer({
left: "50%",
transform: "translateX(-50%)",
padding: "0px",
color: "yellow",
},
escape: false,
},
Expand Down
6 changes: 6 additions & 0 deletions src/Components/Content/VideoPlayer/videoplayer.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@
padding: 5px 5px !important;
}

/* .art-video-player .art-subtitle::before,
.art-video-player .art-subtitle::after {
content: "";
padding: 4px;
} */

@media screen and (max-width: 1024px) {
.art-video-player {
height: calc(var(--vh, 1vh) * 50) !important;
Expand Down

1 comment on commit fa3f28e

@vercel
Copy link

@vercel vercel bot commented on fa3f28e Oct 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

mirai – ./

mirai-git-main-huy8856.vercel.app
mirai-huy8856.vercel.app
unime.vercel.app

Please sign in to comment.