feat(plugin): MPRIS 媒体控制插件 — 支持分P、合集与单视频#5
Merged
Conversation
Agent-Logs-Url: https://github.com/BlockG-ws/b23-evolved/sessions/a2cea8b2-49fe-462f-8e10-d41d3e953f47 Co-authored-by: GrassBlock1 <46253950+GrassBlock1@users.noreply.github.com>
Agent-Logs-Url: https://github.com/BlockG-ws/b23-evolved/sessions/a2cea8b2-49fe-462f-8e10-d41d3e953f47 Co-authored-by: GrassBlock1 <46253950+GrassBlock1@users.noreply.github.com>
…ogic; add ugcSeason to VideoInfo Agent-Logs-Url: https://github.com/BlockG-ws/b23-evolved/sessions/062bb310-df3b-4b33-8663-34ca6e9695bc Co-authored-by: GrassBlock1 <46253950+GrassBlock1@users.noreply.github.com>
Agent-Logs-Url: https://github.com/BlockG-ws/b23-evolved/sessions/062bb310-df3b-4b33-8663-34ca6e9695bc Co-authored-by: GrassBlock1 <46253950+GrassBlock1@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
GrassBlock1
May 2, 2026 11:40
View session
|
@copilot 再新建一个这个插件的简化版本,只把 mpris 的专辑封面替换成当前正在播放的视频的封面 |
Author
|
@GrassBlock1 I've opened a new pull request, #6, to work on those changes. Once the pull request is ready, I'll request review from you. |
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.
新增
video/mpris插件,通过浏览器 Media Session API 将 Bilibili 视频接入系统媒体控制(Linux MPRIS 等)。同时扩展VideoInfoAPI 以暴露ugc_season数据。src/components/video/video-info.tsUgcSeasonEpisodeInfo/UgcSeasonSectionInfo/UgcSeasonInfo接口VideoInfo新增ugcSeason?: UgcSeasonInfo字段,在现有的fetchInfo()调用中从data.ugc_season提取,无额外网络请求registry/lib/plugins/video/mpris元数据:标题(分P时附
P1 分P名)、UP主名(artist)、视频封面(artwork)进度同步:
setPositionState含 duration / position / playbackRate,每 5s 刷新,play / pause / ratechange 事件即时触发控制:play / pause / seekforward / seekbackward(默认 ±10s)/ seekto,通过
playerAgentAPI 操作上/下一曲(分P 与合集可同时生效,不互斥):
videoChange回调触发时自动刷新全部 metadata 与 handler,切换前清理旧事件监听与定时器使用
VideoInfoAPI 代替裸getJsonWithCredentials调用