Nathan Explosion Posted January 19, 2018 Posted January 19, 2018 Been looking in to an issue which was brought up in regard to my HTML5 Audio/Video Player plugin, and the issue only presents itself in Google Chrome. The problem is that uploaded attachments do not allow the player to 'seek' through the audio/video player. The cause of the problem is Chrome is being a bit tooooo serious with the media file being served back by /applications/core/interface/file/attachment.php, while other browsers are happy to play and allow the use of 'seek'. It's caused by the absence of the 'Accept-Ranges' header being sent back, and triggers the ultimate Chrome issue. Adding the following to attachment.php will overcome this issue, so if it can be added for situations where the original file that was uploaded is an audio or video mime type then that would be lovely \IPS\Output::i()->sendHeader("Accept-Ranges:bytes"); Here is a link to a page which is independent of the plugin, which plays the same audio file from 4 different sources: Served from another site Served from local site Served via the /applications/core/interface/file/attachment.php Server via my modifed version of /applications/core/interface/file/attachments.php (nathanattachment.php)
Recommended Posts
Archived
This topic is now archived and is closed to further replies.