[PR #908] [MERGED] feat(EMI): 添加音量控制功能 (linux-only) #722

Closed
opened 2026-02-27 07:12:51 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/imsyy/SPlayer/pull/908
Author: @MoYingJi
Created: 2/20/2026
Status: Merged
Merged: 2/21/2026
Merged by: @apoint123

Base: devHead: pr/m


📝 Commits (1)

  • dc2962d feat(EMI): 添加音量控制功能 (linux-only)

📊 Changes

11 files changed (+98 additions, -1 deletions)

View changed files

📝 electron/main/ipc/ipc-media.ts (+10 -0)
📝 native/external-media-integration/index.d.ts (+11 -0)
📝 native/external-media-integration/src/lib.rs (+10 -0)
📝 native/external-media-integration/src/model.rs (+13 -0)
📝 native/external-media-integration/src/sys_media/linux.rs (+16 -0)
📝 native/external-media-integration/src/sys_media/macos.rs (+4 -0)
📝 native/external-media-integration/src/sys_media/mod.rs (+4 -0)
📝 native/external-media-integration/src/sys_media/windows.rs (+4 -0)
📝 src/core/player/MediaSessionManager.ts (+13 -1)
📝 src/core/player/PlayerController.ts (+3 -0)
📝 src/core/player/PlayerIpc.ts (+10 -0)

📄 Description

实现了 volume 的双向通道,在 PlayerController 中的 setVolume 中更新 EMI,监听 EMI 调用 setVolume

macOS 没有实现,因为在 Apple Developer Documentation 中被标记为 Deprecated

在 Linux (mpris-ctl) 上测试通过

Windows 实现为 AI 生成,通过编译 (workflow) (Windows 没有)


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/imsyy/SPlayer/pull/908 **Author:** [@MoYingJi](https://github.com/MoYingJi) **Created:** 2/20/2026 **Status:** ✅ Merged **Merged:** 2/21/2026 **Merged by:** [@apoint123](https://github.com/apoint123) **Base:** `dev` ← **Head:** `pr/m` --- ### 📝 Commits (1) - [`dc2962d`](https://github.com/imsyy/SPlayer/commit/dc2962dcff308c3175f29c9fc6d07f130d3d970b) feat(EMI): 添加音量控制功能 (linux-only) ### 📊 Changes **11 files changed** (+98 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `electron/main/ipc/ipc-media.ts` (+10 -0) 📝 `native/external-media-integration/index.d.ts` (+11 -0) 📝 `native/external-media-integration/src/lib.rs` (+10 -0) 📝 `native/external-media-integration/src/model.rs` (+13 -0) 📝 `native/external-media-integration/src/sys_media/linux.rs` (+16 -0) 📝 `native/external-media-integration/src/sys_media/macos.rs` (+4 -0) 📝 `native/external-media-integration/src/sys_media/mod.rs` (+4 -0) 📝 `native/external-media-integration/src/sys_media/windows.rs` (+4 -0) 📝 `src/core/player/MediaSessionManager.ts` (+13 -1) 📝 `src/core/player/PlayerController.ts` (+3 -0) 📝 `src/core/player/PlayerIpc.ts` (+10 -0) </details> ### 📄 Description 实现了 `volume` 的双向通道,在 `PlayerController` 中的 `setVolume` 中更新 EMI,监听 EMI 调用 `setVolume` macOS 没有实现,因为在 [Apple Developer Documentation](https://developer.apple.com/documentation/mediaplayer/mpmusicplayercontroller/volume) 中被标记为 Deprecated 在 Linux (mpris-ctl) 上测试通过 ~~Windows 实现为 AI 生成,通过编译 ([workflow](https://github.com/MoYingJi/SPlayer/actions/runs/22222686005))~~ (Windows 没有) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 07:12:51 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/SPlayer#722
No description provided.