9001 / 9001/copyparty

MediaSession artwork weirdness on windows 11 with firefox

未關閉
#992 6 則留言 0 個 reaction 已指派 1 人 已被 @9001 認領 在 GitHub 檢視
bug
主要語言
Python
星號
46.7k
分支
1.9k
平均合併
9 天 2 小時
30 天內合併 PR
4

描述

When playing a music file, the `Mediasession` artwork doesnt display on windows. After testing its because either windows / firefox decides to fetch the artwork themselves. And since their request doesnt have proper auth, its returning the e304 svg and being brokenly rendered. (shown the unauthenticated request)

Image

Image

I confirmed by turning the folder into a share and it displays fine.... kinda.

Image

The artwork aspect ratio is off even tho its displaying properly on the browser

Image

Just to confirm, i checked `navigator.mediaSession.metadata` and opened the artwork src manually and indeed its returning a weird image size

Image

For the first part of the issue i was planning on making a PR where it first `fetch`es the artwork, converts it to a base64 then uses that for the artwork, but the weird aspect ratio of the thumbnail made me write this bug report first.

Also of note, the src of the thumbnail on the browser and mediasession has different query string.
Browser: `server.com/bla/song.flac?th=wf&cache=i&_=1Ek2e`
Mediasession: `server.com/bla/song.flac?th=j`
Im unfamiliar with the codebase and cryptic codes sooo idk wut these mean kekw

### To Reproduce
Just play a song on a server on a windows 11 machine using firefox ig

### Expected behavior
Everything to work

### Server details
remove the ones that are not relevant:
* Linux Arm64
* SFX
* copyparty v1.19.20 "usernames" (2025-11-02)
CPython v3.9.21 on Linux64 [GCC 11.5.0 20240719 (Red Hat 11.5.0-5.0.1)]
sqlite 3.34.1*1 | jinja 2.11.3 | pyftpd 1.5.10 | tftp 0.4.0

### Client details
* OS version: Windows 11 26100.2161
* browser version: Firefox dev editiron 145.0b9

貢獻指南

開啟貢獻指南

研究方向

檢查前端程式碼中 Media Session 的 artwork 處理方式,相關程式碼可能位於提供播放器 UI 的 JavaScript 檔案中。查看 artwork URL 如何產生(注意像是 'th=wf' 與 'th=j' 這類查詢參數),以及如何強制執行驗證。檢查提供縮圖或 artwork 的伺服器端路由,以了解為什麼未經驗證的請求會取得 SVG。在 Windows 11 上使用 Firefox 播放一首歌曲並檢查網路要求,以重現此問題。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
javascript, python
領域
backend, frontend
Issue 類型
缺陷
難度
3/5
預估耗時
1-2 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
55/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。