pwired Posted February 5, 2015 Share Posted February 5, 2015 Hi,I am trying to put an interview online in a webshop.I am using the html5 audio tag <audio> --- </audio>It plays fine locally for both firefox and chrome and plays online in chrome so that means the html5 <audio>code and the ogg file should be ok.However it does not play online in firefox.When I open the webshop in firefox I can see the audioplayerappear for a moment and then it simply disappears.I parked the interview on a filehoster so the mp3 and ogg filesdon't take space away where the webshop is hosted.The code is very simple and straightforward:<p>Interview 3 Februar 2015</p><p><audio autoplay="" controls="" preload="auto"><source src="http://domain.com/test1.mp3" type="audio/mpeg" /><source src="http://domain.com/test2.ogg" type="audio/ogg" />Your browser does not support the audio element.</audio></p>Searching with google, the only thing that I found that I couldhave missed was about mime types and that those should be addedin the .htaccess file so I did add the following:AddType audio/ogg .ogaAddType video/ogg .ogvAddType application/ogg .oggLike I said it plays in chrome but still no luck with firefox. Link to comment Share on other sites More sharing options...
diogo Posted February 5, 2015 Share Posted February 5, 2015 Did you try to open the file url directly? does it work? Link to comment Share on other sites More sharing options...
pwired Posted February 5, 2015 Author Share Posted February 5, 2015 If I open the url directly it only asks me the file to either: open or save, like any other file. Link to comment Share on other sites More sharing options...
cstevensjr Posted February 5, 2015 Share Posted February 5, 2015 You can try this possible fix: Source: https://support.mozilla.org/en-US/questions/1002505 Good luck 1 Link to comment Share on other sites More sharing options...
pwired Posted February 5, 2015 Author Share Posted February 5, 2015 Thanks for the replies. I have only 1 file now just the ogg file and nothing else. Still the player disappears. Chrome plays it correctly. It looks like what charles posted that it must be a server side problem with mime types. Going to send an email to the hostmaster and clarify. Will post back. Link to comment Share on other sites More sharing options...
diogo Posted February 5, 2015 Share Posted February 5, 2015 If I open the url directly it only asks me the file to either: open or save, like any other file. When I open a OGG file in chrome or firefox it plays it in the browser, same happens with MP3 or most video files. If I open a PDF, it is also shown in the browser, same with JPG, PNG, GIF and most surprising of all, it even happens with HTML files! 1 Link to comment Share on other sites More sharing options...
pwired Posted February 5, 2015 Author Share Posted February 5, 2015 Sure, pdf, pictures, etc. But it's not so simple in this case. For example in Chrome the <audio> player shows up and starts to play the .ogg file. But when I enter the complete url path to this .ogg file, a download window pops up with open or save. In Firefox the player appears for a second and then disappears. If I enter the full url in Firefox also a window pops up with open or save with this info: application/x-msdownload Maybe the server where the .ogg file is hosted doesn't send the right or any mime types for firefox ? My last hope to solve this is on the hosting side. Link to comment Share on other sites More sharing options...
horst Posted February 5, 2015 Share Posted February 5, 2015 @pwired: you need something like Live HTTP headers add on for firefox. It shows you all HTTP headers on a request: GET /talk/index.php?s=0d6414d19471a5ffe658f8c55baa5fbf&app=forums&module=ajax§ion=topics&do=pollForReplies&t=9012&pid=87061&md5check=44832c85a77619c3d2b0e0556554f1c4 HTTP/1.1 Host: processwire.com User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:35.0) Gecko/20100101 Firefox/35.0 Accept: text/javascript, text/html, application/xml, text/xml, */* Accept-Language: de,en-US;q=0.7,en;q=0.3 Accept-Encoding: gzip, deflate DNT: 1 X-Requested-With: XMLHttpRequest X-Prototype-Version: 1.7.1 Referer: Cookie: session_id=0d6414d19471a5ffe658f8c55baa5fbf; member_id=1041; pass_hash=017b6310e0be2a6304edad69d32e23ee; ipsconnect_06d1bd83c662d93898a81b0739fcd4db=1; coppa=0; rteStatus=rte Connection: keep-alive HTTP/1.1 200 OK Date: Thu, 05 Feb 2015 18:10:19 GMT Server: Apache X-Frame-Options: SAMEORIGIN X-Powered-By: PHP/5.4.15 Cache-Control: no-cache, must-revalidate, max-age=0 Expires: 0 Pragma: no-cache X-XSS-Protection: 1; mode=block X-Content-Type-Options: nosniff Content-Length: 11 Keep-Alive: timeout=5, max=100 Connection: Keep-Alive Content-Type: application/json;charset=UTF-8 2 Link to comment Share on other sites More sharing options...
LostKobrakai Posted February 5, 2015 Share Posted February 5, 2015 Chrome has this out of the box. 2 Link to comment Share on other sites More sharing options...
horst Posted February 5, 2015 Share Posted February 5, 2015 Yep, FF has this too under developer tools since the last #n? major versions, but I need to click three times until I get this native tool. The other ones I use since FF before version 2 ! and I need to click only once to open it. Therefore I said / thought "something like that". But you are right @Lostkobrakai, - @pwired: you only need to open the network monitor from FFs developer tools and have a look to the response headers of your ogg-page. 3 Link to comment Share on other sites More sharing options...
pwired Posted February 5, 2015 Author Share Posted February 5, 2015 guys thanks for the replies and @horst I didn't know about the live headers plugin for firefox, next time this will allow me to debug. I gave this a try: I simply copied the .ogg file to another server and tried again. Now it's working ! html5 <audio> Player now shows up in firefox and plays the file. So it was definitely a server end problem on the host. I am going to install the live headers plugin and want to see the difference between both servers. 2 Link to comment Share on other sites More sharing options...
cstevensjr Posted February 5, 2015 Share Posted February 5, 2015 I'm glad to see that you are making some progress on this. 1 Link to comment Share on other sites More sharing options...
Recommended Posts