Repository navigation
スマホ用の画面を /m/ に足す(PC 版には手を入れない。D-115) - #41
Merged
Merged
Conversation
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PC 専用だった UI に手を入れずに、スマホ用のページを
/m/に足す(SPEC §12.7、D-115)。何ができるか
PC 版に影響しないようにしたこと
web/src/mobile/に置き、PC とは別の vite ビルド(web/vite.mobile.config.ts→web/dist/m)にした。PC のコンポーネント・フック・App.tsx・index.css・vite.config.tsは import も編集もしていないnpm run buildの PC 側の出力(dist/m以外)が変更前とバイト単位で同一であることを、各タスクでweb/scripts/pc-dist-hash.shで確かめた/はスマホの UA(Mobi / Android / iPhone)のときだけ/m/へ 302 する(no-store、Vary: User-Agent, Cookie)。「PC 版を開く」で Cookiespindle_view=pcを立てると振り分けない。iPad は PC 版になるサーバに足した API
GET /api/stream/:id?transcode=aac: Derived の AAC があれば Range 付きで直送し、無ければ ffmpeg で ADTS に変換して流す。スマホの試し聴きは Opus で流し、鳴らない端末では AAC に一度だけ切り替える(外から LTE 経由で使うため、原本の FLAC は流さない)GET /api/ytmusic/subscriptions/:id/progress: 直近の同期と、その同期で投入した ytdl(と、まだ動いている古い ytdl)を返す確認
cargo test全件、cargo clippy -- -D warnings、cargo fmt --checknpx vitest run(613 件)、npm run build、npm run lint未確認(RC で実機確認が要る)