Skip to content

fix: YouTube 再生不具合の修正(YoutubeAudioSourceManager をコミュニティ保守版に移行)#212

Merged
book000 merged 5 commits intomainfrom
fix/youtube-audio-source-manager
Apr 6, 2026
Merged

fix: YouTube 再生不具合の修正(YoutubeAudioSourceManager をコミュニティ保守版に移行)#212
book000 merged 5 commits intomainfrom
fix/youtube-audio-source-manager

Conversation

@akubiusa
Copy link
Copy Markdown
Member

@akubiusa akubiusa commented Apr 5, 2026

Summary

  • YouTube の player JS 変更により、dev.arbjerg:lavaplayer 組み込みの YoutubeAudioSourceManager がシグネチャ解析に失敗し YouTube 動画が再生できない問題を修正
  • コミュニティが保守する dev.lavalink.youtube:v2:1.18.0 に置き換えることで、YouTube の API 変更に追従できるようにした

主な変更点

pom.xml

  • lavalink-devs Maven リポジトリを追加
  • dev.lavalink.youtube:v2:1.18.0 依存を追加

src/main/java/com/jaoafa/jaotone/player/PlayerManager.java

  • import を com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioSourceManager から dev.lavalink.youtube.YoutubeAudioSourceManager に変更
  • dev.lavalink.youtube.clients.skeleton.Client を import に追加
  • registerSourceManager の引数に MusicWithThumbnailWebWithThumbnailAndroidWithThumbnail クライアントを設定(複数クライアントへのフォールバックで安定性向上)

テスト結果

akubiusa and others added 2 commits April 6, 2026 07:56
YouTube の player JS 変更により dev.arbjerg:lavaplayer 組み込みの
YoutubeAudioSourceManager がシグネチャ解析に失敗する問題を修正する。

- pom.xml: lavalink-devs リポジトリと dev.lavalink.youtube:v2:1.18.0 を追加
- PlayerManager.java: dev.lavalink.youtube.YoutubeAudioSourceManager に移行し、
  MusicWithThumbnail / WebWithThumbnail / AndroidTestsuiteWithThumbnail クライアントを設定

Closes #118

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
v1.18.0 に AndroidTestsuiteWithThumbnail クラスが存在しないため、
実際に利用可能な AndroidWithThumbnail に置き換える

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Comment thread pom.xml Outdated
Comment thread src/main/java/com/jaoafa/jaotone/player/PlayerManager.java Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

YouTube 側の player JS 変更で dev.arbjerg:lavaplayer 内蔵の YouTube ソースがシグネチャ解析に失敗し再生できない問題(#118)に対し、コミュニティ保守の YouTube ソース実装へ差し替えて追従性を上げる PR です。

Changes:

  • Maven に lavalink-devs リポジトリを追加し、dev.lavalink.youtube の依存を追加
  • PlayerManager の YouTube SourceManager を dev.lavalink.youtube.YoutubeAudioSourceManager に置換
  • 複数クライアント(Music/Web/Android)を登録してフォールバック可能に

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
pom.xml lavalink-devs リポジトリ追加と dev.lavalink.youtube 依存追加
src/main/java/com/jaoafa/jaotone/player/PlayerManager.java YouTube SourceManager をコミュニティ保守版へ切替+複数クライアント設定

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/main/java/com/jaoafa/jaotone/player/PlayerManager.java
Comment thread pom.xml Outdated
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 5, 2026

Qodana for JVM

It seems all right 👌

No new problems were found according to the checks applied

💡 Qodana analysis was run in the pull request mode: only the changed files were checked

View the detailed Qodana report

To be able to view the detailed Qodana report, you can either:

To get *.log files or any other Qodana artifacts, run the action with upload-result option set to true,
so that the action will upload the files as the job artifacts:

      - name: 'Qodana Scan'
        uses: JetBrains/qodana-action@v2025.3.2
        with:
          upload-result: true
Contact Qodana team

Contact us at qodana-support@jetbrains.com

@akubiusa
Copy link
Copy Markdown
Member Author

akubiusa commented Apr 5, 2026

Code review

Found 3 issues:

  1. Unnecessary comment in pom.xml (as noted by book000: "このコメントは要らない")

jaoTone/pom.xml

Lines 116 to 120 in 9ac98c6

</dependency>
<!-- YouTube の API 変更に追従するコミュニティ保守版ソースマネージャー(lavaplayer 2.x 対応) -->
<dependency>
<groupId>dev.lavalink.youtube</groupId>
<artifactId>v2</artifactId>

  1. Unnecessary comment in PlayerManager.java (as noted by book000: "このコメントもいらない")

playerManager = new DefaultAudioPlayerManager();
// YouTube の API 変更に追従するコミュニティ保守版ソースマネージャーを使用
playerManager.registerSourceManager(new YoutubeAudioSourceManager(
true,
new dev.lavalink.youtube.clients.skeleton.Client[]{
new MusicWithThumbnail(), new WebWithThumbnail(), new AndroidWithThumbnail()
}
));

  1. dev.lavalink.youtube.clients.skeleton.Client is used as a fully qualified name inline while other client types in the same expression are imported by simple name — inconsistent style. Either add import dev.lavalink.youtube.clients.skeleton.Client; and use Client[], or check if the constructor accepts varargs to remove the explicit array construction. Additionally, the new dev.lavalink.youtube.* imports are inserted in the middle of the com.sedmelluq.* block rather than in a separate group.

import com.sedmelluq.discord.lavaplayer.source.vimeo.VimeoAudioSourceManager;
import dev.lavalink.youtube.YoutubeAudioSourceManager;
import dev.lavalink.youtube.clients.AndroidWithThumbnail;
import dev.lavalink.youtube.clients.MusicWithThumbnail;
import dev.lavalink.youtube.clients.WebWithThumbnail;
import com.sedmelluq.discord.lavaplayer.tools.FriendlyException;

🤖 Generated with Claude Code

- If this code review was useful, please react with 👍. Otherwise, react with 👎.

- pom.xml の依存コメントを削除
- PlayerManager.java の不要なコメントを削除
- Client クラスを import に追加し、インライン完全修飾名を解消
- import の順序を整理(com.sedmelluq.* の後に dev.lavalink.* をまとめる)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
akubiusa and others added 2 commits April 6, 2026 09:35
maven.lavalink.dev は Maven Central に存在しないため、
Renovate がバージョン更新を検出できるようカスタムリポジトリ URL を設定する

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Renovate の Maven マネージャーは pom.xml の <repositories> セクションを
自動読み取りするため、registryUrls の手動設定は不要だった

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@book000 book000 enabled auto-merge (squash) April 6, 2026 00:39
@book000 book000 merged commit 6bb4966 into main Apr 6, 2026
18 checks passed
@book000 book000 deleted the fix/youtube-audio-source-manager branch April 6, 2026 00:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

YouTube動画が再生されない

3 participants