1014156094 / vue-audio-player

Compact, simple and practical PC mobile audio player components(小巧简单实用的 PC 移动端的 Vue 音频播放器组件)
MIT License
201 stars 47 forks source link

iPhone: Operation not supported #65

Closed ManiMatter closed 10 months ago

ManiMatter commented 10 months ago

On iPhone, I the player won't load. The console prints out below error.

I am not sure what to make out of it; happy to provide more details if you guide me what I shall provide

[Log] 为了解决 iOS 设备接口异步请求后出现无法播放问题,请无视 The play() request was interrupted by a call to pause() 错误 (index-zYvrgO69.js, line 5) [Error] Unhandled Promise Rejection: NotSupportedError: The operation is not supported. play play (index-zYvrgO69.js:5:41164) play pt (index-zYvrgO69.js:1:12821) $e (index-zYvrgO69.js:1:12900) za (index-zYvrgO69.js:1:14893) za R (index-zYvrgO69.js:1:93301) Y (index-zYvrgO69.js:1:97863) pt (index-zYvrgO69.js:1:12821) $e (index-zYvrgO69.js:1:12900) n (index-zYvrgO69.js:1:59953)

ManiMatter commented 10 months ago

Hi,

I tried to get to the bottom of this today, no chance. What I did notice that the problem goes beyond iPhone, and that it is only broken in Production (not when I build my UI with yarn vite)

It does not work on Chrome or Safari on iPhone It does not work for Safari (on Laptop) It works for Chrome (on Laptop)

I don't know if you know what is going on here - I added a stackoverflow ticket as well: https://stackoverflow.com/questions/77687463/audioplayer-vue3-works-for-chrome-but-not-for-safari-in-prod-in-dev-works-for

ManiMatter commented 10 months ago

Solved it, had nothing to do with your player, but with nginx! I posted the solution in above stackoverflow thread.