admin管理员组文章数量:1122832
Edit: If anyone runs across a similar issue; the problem was I had Cloudflare DNS Proxy turned on for my server and that was causing the audio issues. It seems to be a semi-common problem from Googling it.
I uploaded my audio files to BunnyCDN storage and then turned CloudFlare DNS Proxy back on. Everything works fine now. I'm removing links in this post for privacy reasons.
My site is running on Vultr/RunCloud/Cloudflare. I've done a lot of testing; turned off all plugins, disabled all cache/CDN, disabled Cloudflare cache, disabled Redis Object Cache, changed to default theme and nothing fixed it. The weird thing is that it's totally random, sometimes the audio player will work fine, other times it won't.
Locally hosted mp3/ogg files on my server will not seek, when you try to scrub through the audio it resets back to the beginning. This is happening in Chrome and Edge desktop and mobile, works fine in Firefox. Also, on iPad/iPhone the scrub bar doesn't even react to any touches.
So I uploaded the same mp3/ogg files to my BunnyCDN Storage bucket and those audio files work perfectly across all browsers and iPad/iPhone.
Here is a test page: /
(you might have to F5 a few times to see the issue)
If you take this file and put it directly in Chrome, try to scrub through the audio and it'll reset back to the start: .mp3
Now here's the same file hosted on BunnyCDN and do the same and it works fine: .mp3
I'm getting no errors in Chrome Dev. I'm guessing this a server side issue but I'm totally lost on what it could be.
Edit: If anyone runs across a similar issue; the problem was I had Cloudflare DNS Proxy turned on for my server and that was causing the audio issues. It seems to be a semi-common problem from Googling it.
I uploaded my audio files to BunnyCDN storage and then turned CloudFlare DNS Proxy back on. Everything works fine now. I'm removing links in this post for privacy reasons.
My site is running on Vultr/RunCloud/Cloudflare. I've done a lot of testing; turned off all plugins, disabled all cache/CDN, disabled Cloudflare cache, disabled Redis Object Cache, changed to default theme and nothing fixed it. The weird thing is that it's totally random, sometimes the audio player will work fine, other times it won't.
Locally hosted mp3/ogg files on my server will not seek, when you try to scrub through the audio it resets back to the beginning. This is happening in Chrome and Edge desktop and mobile, works fine in Firefox. Also, on iPad/iPhone the scrub bar doesn't even react to any touches.
So I uploaded the same mp3/ogg files to my BunnyCDN Storage bucket and those audio files work perfectly across all browsers and iPad/iPhone.
Here is a test page: https://www.testsite.com/audiotestpage/
(you might have to F5 a few times to see the issue)
If you take this file and put it directly in Chrome, try to scrub through the audio and it'll reset back to the start: https://www.testsite.com/testfile.mp3
Now here's the same file hosted on BunnyCDN and do the same and it works fine: https://testsite.net/testfile.mp3
I'm getting no errors in Chrome Dev. I'm guessing this a server side issue but I'm totally lost on what it could be.
Share Improve this question edited May 20, 2024 at 13:48 Nate M. asked May 19, 2024 at 16:03 Nate M.Nate M. 774 silver badges11 bronze badges2 Answers
Reset to default 1Most likely the server is not handling byte range requests to support seek.
Test if you get a 206 response from e.g:
curl https://example.com/test.ogg -i -H "Range: bytes=0-1023"
Try (temporary) setting the preload="auto"
to your shortcodes to fully download the audio on page loads.
See more here:
How to test:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Range_requests#requesting_a_specific_range_from_a_server
Server ogg media config info:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Configuring_servers_for_Ogg_media#Handle_HTTP_1.1_byte_range_requests_correctly
Bunny:
https://bunny.net/academy/http/what-are-http-range-and-byte-range-requests/
Audio shortcode:
https://wordpress.org/documentation/article/audio-shortcode/
and varius discussions here
https://stackoverflow.com/questions/9563887/setting-html5-audio-position#9565178
If anyone runs across a similar issue; the problem was I had Cloudflare DNS Proxy turned on for my server and that was causing the audio issues. It seems to be a semi-common problem from Googling it and checking the Cloudflare forums.
Obviously I didn't want to keep the proxies turned off so I uploaded my audio files to another CDN and then turned CloudFlare DNS Proxy back on. Everything works fine now.
本文标签:
版权声明:本文标题:media - Wordpress MediaElement audio player won't seek and resets back to the start when files are locally hosted 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736306615a1933022.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论