MediaToast
说明
此(Fabric)模组利用原版音乐提示功能,显示你系统当前正在播放的媒体内容。
要使其正常工作,你还必须在原版选项里启用该提示功能。
本模组最初基于我制作的其他模组 MprisCustomHud,我主要是为了学习如何使用 dbus-java 调用 MPRIS(以及 DBUS)。
我做这个是为了稍微了解一下 mixin,并且我觉得它很酷 :)
控制键
支持以下按键绑定:播放/暂停、下一首、上一首、刷新以及在活跃播放器之间切换。
配置
默认情况下,模组会从当前活跃的播放器中自动选择一个并启用,因此当其他音乐正在播放时,你不会看到原版的音乐提示。若要手动切换当前活跃的播放器,请使用相关按键绑定(仅当“仅使用首选来源”被禁用时才有效)。
所有选项均位于原版声音设置中,即用于启用音乐提示的那个选项下方。每个选项都带有工具提示,解释其具体作用。
Linux Flatpak 注意事项
- 当你在 Flatpak 沙盒环境中运行 Minecraft 时,你需要将
org.mpris.MediaPlayer2.*添加到启动器可以通信的已知会话总线名称列表中,例如使用 Flatseal 进行配置。
备注
- 不会再提供旧版本,因为音乐提示功能在 1.21.6 之前并不存在(我之前误以为它是 1.21.10)。
- macOS 可能不受支持(我也没有测试环境)。
使用的库
- dbus-java
- freedesktop.org 提供的 Java DBus 库的改进版
- mediainterface
- 允许从 Java/Kotlin 访问操作系统的“媒体远程”/正在播放界面。
许可证
本模组采用 MIT 许可证授权。
MediaToast
Description
This (fabric) mod shows the media currently playing on your system using the vanilla music toast feature.
To make it work, you also have to enable the toast in vanilla options.
This mod is originally based on my other mod MprisCustomHud I made mainly to learn how to use MPRIS (and DBUS) with dbus-java.
This I made to learn a little bit about mixins and because I think it's cool :)
Controls
There are keybindings for play/pause, next, previous, refresh and cycle through active players.
Configuration
By default a player is selected from the active ones and the mod is enabled, so you will not see toasts with vanilla music while your other music is playing. To cycle through the currently active ones, use the (only works if "Only preferred source" is disabled).
All options are located in the vanilla sound settings under the option to enable music toasts in the first place. They all have tooltips that explain what they do.
Linux Flatpak notice
- when you're running Minecraft in a Flatpak sandbox, you have to add
org.mpris.MediaPlayer2.*to the list of well known session bus names your launcher can talk to e.g. with Flatseal
Notes
- there will be no older versions, as the music toast didn't exist pre 1.21.6 (how did I think it was 1.21.10)
- macOS is probably not supported (I also have no way to test it)
Libraries used
- dbus-java
- Improved version of java DBus library provided by freedesktop.org
- mediainterface
- Access the operating systems "Media Remote"/Now Playing interface from Java/Kotlin.
License
This Mod is licensed under the MIT License
下载 MediaToast
下载 MediaToast
下载 MediaToast
下载 MediaToast
下载 MediaToast
下载 MediaToast
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 MediaToast
下载 MediaToast
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 MediaToast
下载 MediaToast
- 更新至 26.3
- 更新至最新版的 mediainterface
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
查看物品与配方
模组
AE2:一款流行的自动化与存储模组
模组
那是什么?一个 Waila/Hwyla 的分支。
评论 0
登录后参与评分
还没有评论,来抢沙发吧