last day (15 days later) » 

7:20 PM
0
Q: HTML5 audio cross browser comtability

thatidiotguyI work for a company and am trying to make a new demo page. I would love to dumb down the page to exactly what is not working, but unfortunately it is tied to a variety of scripts on my server, as well as AJAX requests that have to go to the same domain name. I will describe the going ons as well...

 
"I am simply trying to get the audio to play without the horrible echo" Have you tested the files outside of the browser?
"onAudioLoad sends a request to delete the audio, to avoid people stealing our product too easily" You know that everything you send to the client is already out of you hands right?
It isn't clear what your actual question is. Do you have a specific question? IMHO this is borderline spam in this state.
 
I added a more clear question about what is going on. I thought it was clear from the get go, but of course, one always understands their own writing easiest.
 
Tested in all three browsers and it just works here.
 
Hmmm, what could be causing this discrepancy on my machine. All my browsers are fully updated.
 
Idunno. Hard to test if it just works here :) BTW I wouldn't put too much effort in trying to protect from download. Because it could easily be downloaded by simply going to the create url with your own text. If it is meant as a demo rather render the sound with some demo text it in at random points of the real text.
 
7:20 PM
So it works for you, even if you try to change the audio after your first say it? So first example. Page loads, you hit say it. The audio plays fine. Change the text, hit say it again. On all my browsers except chrome, it keeps playing the original text. Adding some demo audio in is not a bad idea by the way... Thanks for your help.
I know for a fact that the get request from the audio tag only occurs for the first"say it" and none afterwards by watching the network traffic in firebug. I feel like it may be a caching issue, but am unsure how to prevent it programatically.
 
lemme test
1 sec
ok I got the same text. lemme try to find out whats going on
@thatidiotguy btw why does the session expire?
 
time based
5 minutes
there is small bug with that, but I am confident that I could fix that given some time
 
but why?
 
the idea is that you need a valid session
to get audio
 
k lemme install firebug
 
7:27 PM
I am just trying to stop people who do not know what they are doing from getting free audio. Anyone who knows what they are doing could get the audio easily just by sniffing the http response ya know
that's why I log IPs :D
 
it is strange indeed.
When I look at what Chrome gets for responses it is:
createaudio
.ogg
.ogg
deleteaudio
But when I look in FF:
createaudio
deleteaudio
@thatidiotguy I might have an idea
I see that you always return a file with the same name. What happens when you return audio files with different names on each request (it might be a caching issue)
When downloading the audiofile or opening it in a new tab it DOES work: cepstral.com/demos/audio/b4764139e9f2405560c8a692fe4961d7.ogg
 
7:47 PM
Right
It is definitely a caching issue
but that is why I added the (new Date()).getTime()
query parameter
so each query is different
but I do not know how to force the audio tag source element to send another get request
that is really all that needs to be done here I suppose. Changing the name of the audio file would definitely work, although it does seem a bit hacky
 
@thatidiotguy doesn't seem that hacky to me at all. It's another sound so expect it to be another file(name).
 
hmmm, true enough
so it works in your IE9 browser
it does not work at all
in mine
like, the audio player does not even show up
ie 9.0.8
 
lemme boot IE up again 1 sec
 
i dont think IE likes having html5 elements shoved in (possibly a result of the whole doctype nonsense)
 
Yup it is working in 9.0.8. same thing as in FF only plays same text again
 
7:58 PM
hmmm weird it does not work for me. Well I will look into that. Thank you for taking a second look for me and thanks the different audio name idea
you are a good person
if you want to submit an aswer
ill check mark it/upvote
 
np. good luck fixing the issue. I'll summarize this chat session and add it as answer
0
A: HTML5 audio cross browser comtability

RepWhoringPeeHaaAfter trying to find out what was going on and having contact in chat (transcript) I've come to the following conclusion: it's an caching issue. When trying to change text in FF and requesting a new soundfile it still plays the old sound. By checking the requests and responses it looks like you ...

 

last day (15 days later) »