I’m currently building an xpage application which is used as a video library. All is working pretty good except for the Ipad / Iphone devices. The application uses notes documents to store a description, a summary and ofcourse the mp4 file to be displayed.
To display the information we used a flash control. Since this does not work on ipad ofcourse I’m using the html 5 video tag. Now we have a issue with the videofiles not playing correctly on the ipad.
When I use the $file url such as
http://www.mytesterver.com/database.nsf/.SysAllByUniversalId/5931A35AD3249395C1257AC900587627/$File/test.mp4
The url is not accepted by the ipad and therefore the video won’t play. Now when I check in other browsers this url works perfectly. When I upload the videofile as a file resource and access the file that way on the ipad
http://www.mytesterver.com/database.nsf/test.mp4
The video is playing fluently on all systems. Now I could ofcourse change the code so it will generate a file resource. But I want to keep all files , texts etc together on a document. Is there someone who can explain to me why and how to solve this issue? I think it has something to do with headers not send correctly but I dont realy know for sure.
The difference between the two requests is that if you are open the Attachment, the Accept-Ranges: bytes HTTP header is not set. Safari requires this header.
[Source: Safari Developer library]
If you open the video as a file resource, the header is added correctly from the domino server.
Link: Does iPhone/iPad Safari require 'Accept-Ranges' header for video?
EDIT:
As a possible workaround you could use a servlet like this one: http://balusc.blogspot.de/2009/02/fileservlet-supporting-resume-and.html