Open terrysonsin opened 11 years ago
Do you still get this in Firefox after refreshing the page a few times? I'm wondering if this is to do with timing.
Yes, After refer i get the alert box to say Error: Sorry, your browser cannot play HTML5 MP3 Audio. I have used the latest FIrefox Already
any body can help me?
Firefox doesn't support audio/mpeg, but support audio/ogg.
You have two solutions: 1) Use SoundManager2 https://github.com/scottschiller/soundmanager2/ 2) Another solution is to use a server-side script to convert mp3 to ogg.
iJab
Use this webpage to test how browser support HTML5: http://html5test.com/
iJab
I've started working a rewrite (see ) which adds support for SoundManager2 (thus enabling Firefox). But the problem is that getting the flash animation to play the MP3 (which is also how Google solves the Firefox problem) on your local machine will require modifying Flash security settings. So it wouldn't be straightforward for users of your app to get the audio working if they're viewing the thing in Firefox. Add to this the issue that non-localhost calls to the Google server return a 404.
i find that firefox is not support HTML5 mp3, but nightly firefox is support,I can use the api if i change the setting in firefox about the referer heading. but i don't think it is godd method to change the setting of browser
There are a few solutions posted online that employ a generic object embed to play the file. I think that Fx still falls back on flash, however.
I've added Firefox support (through SoundManager2) to master. Note that you'll need to run the demo as http://localhost/ in order for the SoundManager2 flash player to work.
Once Firefox support MP3 HTML5 Audio the library will automatically start using that.
Hmm, still not working in Firefox though I can't yet see the error.
This will not work for mobile versions of Firefox. Mozilla is unlikely to introduce support until direct MP3 support until patents run-out sometime ~2017.
I'll be wishing for a JS MP3 -> Opus converter for Xmas : (
Short of writing an MP3 decoder in JS (see http://audiocogs.org/codecs/mp3/ for an example) and hoping that Firefox Mobile also has the Audio API I'm not sure what else can be done for Firefox mobile.
Server side trickery https://gist.github.com/jeffcrow/1739558 is probably the best answer. I've got a more sophisticated version in the works, I'll drop it when I have it done. : )
-Zach Lym
On Mon, Jun 10, 2013 at 2:55 AM, Ramesh Nair notifications@github.comwrote:
Short of writing an MP3 decoder in JS (see http://audiocogs.org/codecs/mp3/ for an example) and hoping that Firefox Mobile also has the Audio API I'm not sure what else can be done for Firefox mobile.
— Reply to this email directly or view it on GitHubhttps://github.com/hiddentao/google-tts/issues/6#issuecomment-19189875 .
You're right. My only concern with that was if you use it too much they can just block your IP. Plus a client-side solution would mean less server load. On Jun 10, 2013 5:58 PM, "Zach Lym" notifications@github.com wrote:
Server side trickery https://gist.github.com/jeffcrow/1739558 is probably the best answer. I've got a more sophisticated version in the works, I'll drop it when I have it done. : )
-Zach Lym
On Mon, Jun 10, 2013 at 2:55 AM, Ramesh Nair notifications@github.comwrote:
Short of writing an MP3 decoder in JS (see http://audiocogs.org/codecs/mp3/ for an example) and hoping that Firefox Mobile also has the Audio API I'm not sure what else can be done for Firefox mobile.
— Reply to this email directly or view it on GitHub< https://github.com/hiddentao/google-tts/issues/6#issuecomment-19189875> .
— Reply to this email directly or view it on GitHubhttps://github.com/hiddentao/google-tts/issues/6#issuecomment-19189980 .
True, but it's all a hack anyway :p If anyone is doing enough TTS to merit an IP ban from Google, they should invest in a commercial API or setup a dedicated FLOSS TTS box.
-Zach Lym
On Mon, Jun 10, 2013 at 7:05 AM, Ramesh Nair notifications@github.comwrote:
You're right. My only concern with that was if you use it too much they can just block your IP. Plus a client-side solution would mean less server load. On Jun 10, 2013 5:58 PM, "Zach Lym" notifications@github.com wrote:
Server side trickery https://gist.github.com/jeffcrow/1739558 is probably the best answer. I've got a more sophisticated version in the works, I'll drop it when I have it done. : )
-Zach Lym
On Mon, Jun 10, 2013 at 2:55 AM, Ramesh Nair notifications@github.comwrote:
Short of writing an MP3 decoder in JS (see http://audiocogs.org/codecs/mp3/ for an example) and hoping that Firefox Mobile also has the Audio API I'm not sure what else can be done for Firefox mobile.
— Reply to this email directly or view it on GitHub< https://github.com/hiddentao/google-tts/issues/6#issuecomment-19189875> .
— Reply to this email directly or view it on GitHub< https://github.com/hiddentao/google-tts/issues/6#issuecomment-19189980> .
— Reply to this email directly or view it on GitHubhttps://github.com/hiddentao/google-tts/issues/6#issuecomment-19200418 .
It´s worth mention also the tts-api.com service, it has a very limited api but gets the job done and overcomes the 'http_referer' limitations mentioned for google translate; i used it in a nodejs script with no 404s return.
Another possibility could be setting an ssl connection on the server because http1.1 spec says browsers shouldn´t sent the referrer header in refered secure connections (see https://tools.ietf.org/html/rfc2616#section-15.1.3).
Finaly, there's the meta referer tag proposal from the html5 spec but i'm unawere of browsers implementation (apparently firefox don´t support it yet acording to bug 704320(tl;dr)) but it deserves a following
@neocris Good points!
I have Download the firefox and use the firefox to open the example, but there is a popup window to say not supoort HTML5 MP3 AUDIO, But i can do it in chrome, what can i do if i want this can do in firefox?