iPad Audio
This is a discussion on iPad Audio within the iPad Development forums, part of the iPad App Store category; This is driving me nuts.
I'm building an HTML application for my iPad, but I can't make it play .wav files which are returned from ...
-
iPad Noob!
iPad Audio
This is driving me nuts.
I'm building an HTML application for my iPad, but I can't make it play .wav files which are returned from either a Java servlet or an ASP handler (I'm sure I'm setting the "content-type" correctly - "audio/wav" or "audio/x-wav")
In either HTML5 or Quicktime, if you set the data source for the object to a static file it works fine e.g. "/foo/bar/baz.wav", but if you set it to a dynamic source e.g. "/foo/bar/GetWav?audioFileId=123" the component just goes into an error state and doesn't play anything.
Does anyone know if this is a formal restriction of Quicktime and the HTML5 <audio/> tag? Any workarounds?
-
07-09-2010 01:21 AM
-
iPad Master!
are you running an apache server?
You could try setting up a .htaccess rule for when a file doesn't exist a PHP script is run instead.
So lets say you have an empty folder at /mainsite/files/audio/.
the webpage tries to download /mainsite/files/audio/123.wav
That file doesnt exist, php script runs and looks at the file name "123" and returns the proper audio file as 123.wav
I have done this before to create dynamic pitures. Example I have a weather script that returns an image with the currnt weather status/temps/ and a background of the current conditions.
file requests look something like /weather/33178.png
now that file doesnt exist but the script looks at the file name which is a zipcode and then generates the correct image.
Last edited by MikesTooLz; 07-09-2010 at 01:47 AM.
-
iPad Noob!
I'm on IIS and tried to do the same thing before I left work today and it didn't work. Have you tried doing this with Quicktime/HTML5 tags before?
I will double-check that tomorrow that I didn't do anything silly and that the response for a static and dynamic resources are identical. If you have any other ideas..
-
iPad Noob!
They're identical! Any ideas?
Request #1 (Real Wav)
GET /Views/MyWav.wav HTTP/1.1
Host localhost:50854
User-Agent Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.6) Gecko/20100625 Firefox/3.6.6
Accept text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language en-us,en;q=0.5
Accept-Encoding gzip,deflate
Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive 115
Cookie ASP.NET_SessionId=uei4...EB0
Cache-Control max-age=0
Request #2 (Dynamically Fetched Wav)
GET /Views/VoiceClip.wav HTTP/1.1
Host localhost:50854
User-Agent Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.6) Gecko/20100625 Firefox/3.6.6
Accept text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language en-us,en;q=0.5
Accept-Encoding gzip,deflate
Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive 115
Cookie ASP.NET_SessionId=uei4v...2CD5EB0
Cache-Control max-age=0
Response #1 (Real Wav)
HTTP/1.1 200 OK
Server: ASP.NET Development Server/10.0.0.0
Date: Fri, 09 Jul 2010 16:09:00 GMT
X-AspNet-Version: 4.0.30319
Cache-Control: private
Content-Type: audio/wav
Content-Length: 110546
Connection: Close
RIFFÊ...
Reponse #2 (Dynamically Fetched Wav)
HTTP/1.1 200 OK
Server: ASP.NET Development Server/10.0.0.0
Date: Fri, 09 Jul 2010 16:09:01 GMT
X-AspNet-Version: 4.0.30319
Content-Length: 100676
Cache-Control: private
Content-Type: audio/wav
Connection: Close
RIFF<......
-
iPad Noob!
It turns out that it's because the iPad etc. demand that any audio/video come from service endpoints which support byte-range HTTP headers i.e. "fetch me byes 50-100". If the endpoint doesn't support this it just fails. I had to go add this support to my ASP.net handler/java servlet.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
Similar Threads
-
By juliakatte in forum iPad General Discussions
Replies: 8
Last Post: 06-01-2011, 08:09 PM
-
By tehjrow in forum iPad General Discussions
Replies: 1
Last Post: 06-22-2010, 12:16 PM
-
By iDan in forum Apple iPad News
Replies: 1
Last Post: 05-23-2010, 10:30 PM
-
By Pennengr in forum iPad General Discussions
Replies: 3
Last Post: 05-14-2010, 09:11 PM
-
By 4phun in forum iPad Help
Replies: 1
Last Post: 04-18-2010, 10:25 PM
Search tags for this page
byte range error message
,
byte range error message .wav
,
byte range error message iis
,
byte range error message iphone
,
byte range error message sharepoint
,
byte range error message ??????????
,
ipad audio development
,
ipad audio tag
,
ipad byte range error message
,
ipad quicktime byte range error message
,
ipad wav
,
play wav files on ipad
,
play wav on ipad
,
playing wav files on ipad
,
quicktime audio for ipad
,
quicktime byte range error message
,
quicktime+byte+range+error message
,
quicktime+byte+range+error+message asp.net
,
servlet stream html5 ios cannot play audio file.
,
wav file on ipad
Click on a term to search for related topics.
Tags for this Thread