import settings from '@/web/states/settings' import { useTranslation } from 'react-i18next' import { useSnapshot } from 'valtio' import { BlockDescription, BlockTitle, Option, OptionText, Switch, Input } from './Controls' import Slider from '@/web/components/Slider' import { cx } from '@emotion/css' import player from '@/web/states/player' import { ceil } from 'lodash' function Player() { return (
) } function FindTrackOnYouTube() { const { t, i18n } = useTranslation() const { enableFindTrackOnYouTube, httpProxyForYouTube } = useSnapshot(settings) return (
{t`settings.player-youtube-unlock`} {t`settings.player-find-alternative-track-on-youtube-if-not-available-on-netease`} {i18n.language === 'zh-CN' && ( <>
此功能需要开启 Clash for Windows 的 TUN Mode 或 ClashX Pro 的增强模式。 )}
{/* Switch */} {/* Proxy */} {/* */}
) } function VolumeSlider() { const { t } = useTranslation() const { volume } = useSnapshot(player) const onChange = (volume: number) => { player.volume = volume } return (
{t(`settings.volume-control`)}
0 {ceil(volume * 100)}
) } export default Player