iOS cannot load video/audio through a NSURLProtocol

Originator:jwight
Number:rdar://8446587 Date Originated:9/17/2010
Status:Open Resolved:
Product:iPhone SDK Product Version:4.1
Classification:Major Bug Reproducible:Yes
 
17-Sep-2010 02:03 PM Jonathan Wight:
'ProtocolTest.zip' was successfully uploaded

17-Sep-2010 02:03 PM Jonathan Wight:
Summary:

UIWebView cannot load audio/video through a custom NSURLProtocol handler. All other web content I've tried (html, js, css & all images) load just fine via a NSURLProtocol handler. Video and audio will fail.

Steps to Reproduce:

1: Download provided project.
2: Note that a custom NSURLProtocol is being register and can handle URLs of the "x-file:" URL scheme
2: Note that a UIWebView is being created and told to load a request with a "x-file" URL.
3: Note that the .html web content loads just fine
4: Click on the links to play video inline, note that video fails to load.

Expected Results:

Video loads through my customized NSURLProtocol.

Actual Results:

Video fails to load. While the video does trigger a canInitWithRequest: message the video still does not load.

Regression:

N/A

Notes:

It seems that video/audio can only play via file: or http(s): urls. Custom URL schemes are not supported.

Comments

Filed possible duplicate

We ran into this bug as well. On advice of Apple Developer Support I have filed another bug report, 8692954.

Did you ever find a workaround?

ProtocolTest.zip (attached to original bug) available from http://dl.dropbox.com/u/26380/ProtocolTest.zip (possibly NOT permanently - get it while it's hot.)


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!