如何使用节点通知程序或其他一些节点通知库增加 macOS Big Sur 中通知中心通知图像的大小?

How do I increase the size of Notification Center notification images in macOS Big Sur using node-notifier or some other Node notifications library?

TL;DR: 这可能是一个简单答案的问题,但我正在寻找一种允许我在 macOS Big Sur 中使用更大内容图像的解决方案不再可能的通知或证据。

在 macOS X High Sierra(可能还有 Catalina)中,可以像这样在屏幕右上角显示通知:

我正在对 OSS spotify-now-playing 进行更改,这将允许在通知中显示专辑封面,因为它目前不这样做。这是大苏尔的样子:

将内容图像添加到通知中非常容易。这就是它的样子:

此代码看起来像这样(为清楚起见被截断):

const NotificationCenter = require('node-notifier').NotificationCenter;
const notifier = new NotificationCenter({ withFallback: false });

// All the data maps correctly. The icon key/value pair does not seem to
// affect the notification that is displayed.

notifier.notify({
  title: mappedData.musicName,
  subtitle: mappedData.artistName,
  message: mappedData.albumName,
  contentImage: mappedData.albumImageSrc,
  icon: mappedData.albumImageSrc,
  group: 'Spotify',
  remove: 'ALL',
  sender: 'com.spotify.client',
  timeout: '5',
});

我遇到的问题是,与我过去找到的示例相比,专辑封面非常小。我很难找到证据证明不再可能显示更大的图像,或者更大的图标。

我什至在这之前在 App Store 上购买了 Notify for Spotify:

也不走运。无论如何,像这样的东西应该是开源的,所以坚持下去,我调查了:

在这一点上,Apple 似乎让无法再显示大图像了。但无论我多么努力地寻找,我都找不到任何证据他们这样做了。

我想要的是证据,使用 node-notifier 或另一个允许更大图像的 Node 通知库的解决方法,或者只有使用 XCode 和 Swift 才有可能的证据.

谢谢!

根据通知中心 Apple 自己的 documentation,Big Sur 改变了图像的显示方式。

这并不像我想要的那样确凿证据,但足以让我不去寻找答案。如果 Apple 对自己的通知这样做,那么第三方软件就不太可能做到这一点。