jjtbsomhorst
jjtbsomhorst

Reputation: 1667

iPad play videofiles

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.

Upvotes: 4

Views: 893

Answers (5)

Renaud Thiévent
Renaud Thiévent

Reputation: 211

I'm a bit late on this discussion, but I had the same issue and noticed that if the video attachment is compressed with any compression method it won't work on Ipad even if it works on other plateforms.

To verify this, add a video file into a richtext using the notes client and when attaching the file, uncheck "Compress" option at the bottom of the dialogbox when you select the file you want to attach and try to see the video with the ipad and it should work !

It would be nice that the domino server handle the byte-range http request with compressed attachment the same way it does without compressed ones.

The bad side is that if you want to attach a video file using an background agent in lotus script or java, you cannot say "don't compress the attachment" using a parameter... :-(

In my case I had to have the file linked to a richtext so, the only solution I have found is to attach it using the "standard" API in lotusscript to attach a file in a richtext and then search through the $file field to find the video file (using the name of the file), remove it, and reinsert the "$File" field using C APIs in the document without using compression.

I don't have this code with me right now but can post it later if you're interested.

If you don't need to have the file inside a specific field, you can only use the C APIs to attach the file into the document without compressing it.

Hope this helps a bit...

Upvotes: 0

David Leedy
David Leedy

Reputation: 3593

I'm late to the party here, but I've had some good success using the Projekktor Project with XPages. http://www.projekktor.com/

That might be a good option. There's a ton of features in projeckktor. It's really good stuff.

I had an old rough example of it's use on OpenNTF in the XPages Media Library template. There were some issues I need to improve on but it does work. It's also been the player behind XPages.TV for a long time.

Worth checking out.

Upvotes: 0

Sven Hasselbach
Sven Hasselbach

Reputation: 10485

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.

HTTP servers hosting media files for iOS must support byte-range requests

[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

Upvotes: 3

John Dalsgaard
John Dalsgaard

Reputation: 2807

Just a quick shot. If the $-character in the url is the problem (and I do not know is this is a problem??) you could easily get around it by creating a web substitution rule for the internet site in question in the Domino directory, e.i. allowing the "external" url to be, say, http://www.mytesterver.com/database.nsf/.SysAllByUniversalId/5931A35AD3249395C1257AC900587627/files/test.mp4

... and I just stumbled over this new openNTF project that may be of interest to you as well: http://www.openntf.org/blogs/openntf.nsf/d6plinks/NHEF-94NGJX

It is about accessing file attachments through WebDAV ;-)

/John

Upvotes: 0

Panu Haaramo
Panu Haaramo

Reputation: 2932

A few things to try in addition to mime type:

  1. Remove the "." after .nsf/ from your URL. iPad might think it's a relative URL.
  2. Add ?OpenElement at the end of the URL
  3. Save the file to domino/html folder (then it's accessible by everyone)

Upvotes: 1

Related Questions