-
Notifications
You must be signed in to change notification settings - Fork 849
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #69 from ztpn/subs-icon
Add a shortcut to subtitle settings in the bottomControls and update ui
- Loading branch information
Showing
11 changed files
with
435 additions
and
295 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { useEffect } from "react"; | ||
|
||
import { Icons } from "@/components/Icon"; | ||
import { OverlayAnchor } from "@/components/overlays/OverlayAnchor"; | ||
import { VideoPlayerButton } from "@/components/player/internals/Button"; | ||
import { useOverlayRouter } from "@/hooks/useOverlayRouter"; | ||
import { usePlayerStore } from "@/stores/player/store"; | ||
|
||
export function Captions() { | ||
const router = useOverlayRouter("settings"); | ||
const setHasOpenOverlay = usePlayerStore((s) => s.setHasOpenOverlay); | ||
|
||
useEffect(() => { | ||
setHasOpenOverlay(router.isRouterActive); | ||
}, [setHasOpenOverlay, router.isRouterActive]); | ||
|
||
return ( | ||
<OverlayAnchor id={router.id}> | ||
<VideoPlayerButton | ||
onClick={() => { | ||
router.open(); | ||
router.navigate("/captionsOverlay"); | ||
}} | ||
icon={Icons.CAPTIONS} | ||
/> | ||
</OverlayAnchor> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.