跳转到内容
View in the app

A better way to browse. Learn more.

彼岸论坛

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
欢迎抵达彼岸 彼岸花开 此处谁在 -彼岸论坛

[分享创造] 写了个简单的页面,分享此时此刻在听的歌

发表于

演示

played-music.png

页面是 https://test.imba97.cn/playing

因为是个网页,所以还可以通过 iframe 分享到各处

原理

最近发了篇博客文章:《自建音乐服务 Navidrome 》,里面提到可以使用 last.fm 来保存听歌历史

通过这个网站的接口可以拿到播放列表,根据听歌的先后顺序,也有当前是否正在播放的字段

process.png

后端

Chat GPTPHP 写了个程序,功能就是简单的请求接口、10 秒数据缓存

因为 last.fm 接口给的图片国内没法访问,所以图片优先获取 itunes 上的,如果都没图,保底还会有个 icon

前端

用 Vue 简单写了个前端,10 秒轮询调接口获取最新数据

可以展示加载中、当前未听歌、当前正在听歌状态

用了 UnoCSS ,永远的神!

开源

Github: imba97/playing-music

Featured Replies

No posts to show

创建帐户或登录来提出意见

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.