php - Changing HTTP Headers -
i'm having issue html5 audio track duration in chrome , safari browsers. (mobile too) firefox fine.
instead of showing track duration, it's showing "infinity:nan:nan" in it's place. 
i using jquery plugin automatically creates fallback flash file of tracks standard html5 <audio> tags:
<audio controls preload="none" itemprop="audio"> <source src="http://my-site/path/to/tracks/mus/town_where_i_live_prev.mp3" /> </audio> the music player plays tracks fine, won't show duration number correctly.
i wondering if has http headers? found this i'm hoping fix issue, think i'm doing wrong. mentions had change content type "application/octet-stream" , fixed problem him. when check site's headers see "text/html; charset=utf-8". don't see "audio/mpeg", again tracks play fine though without that. question think might fix me, , if how go adding/editing site's http header?
i have built site custom wordpres theme, tried adding following functions.php file change header:
add_action( 'send_headers', 'add_header_vary_useragent' ); function add_header_vary_useragent() { header( 'vary: user-agent' ); } and instead of vary: user-agent
i changed 'content-type: application/octet-stream'
and after doing that, if visit site, browser automatically downloads index file. safari won't open it, i'm pretty sure wrong.
i found this on @ wordpress area on modifying it, i'm unclear should doing it. know site built on wordpress, thinking doesn't have wp related, posted here instead.
any direction or suggestions extremely appreciated!
Comments
Post a Comment