jj.
jj.

Reputation: 333

HTML5 offline video caching in mobile safari

I can't seem to get Safari on the iPhone or iPad to offline cache videos. Everything else gets cached just fine when I go offline. The video file is obviously in the manifest, but I just get the broken arrow. Works fine in Safari desktop. Any clues? I've tried both object embed and the video tags.

Upvotes: 14

Views: 14996

Answers (7)

Luke Stanley
Luke Stanley

Reputation: 1294

Perhaps something like this would work: http://www.nihilogic.dk/labs/jsvideo/test2.php

Upvotes: 0

matejk
matejk

Reputation: 818

Update for iOS 4.3 on iPad:

I just tried adding a movie to a manifest file in iOS 4.3.

Safari asked me to allow extending the offline storage and then downloaded the movie.

Upvotes: 0

Ganesh Krishnan
Ganesh Krishnan

Reputation: 369

Audio & video are not cached by iPhone since they are played by external applications. It seems the only workaround is to store them as base64 in local database or have them cached in application manifest as php(or similar) file but with base64 encoded audio and video content.

Upvotes: 2

Alexander Klimetschek
Alexander Klimetschek

Reputation: 3714

See these two articles for mobile browser cache limits (note that the second one adds vital information):

http://www.yuiblog.com/blog/2010/06/28/mobile-browser-cache-limits/

http://www.yuiblog.com/blog/2010/07/12/mobile-browser-cache-limits-revisited/

It only generically covers html and "external resources", but they didn't explicitly test video files, so maybe these are never cached by Mobile Safari.

Upvotes: 2

Steve
Steve

Reputation: 241

Use the manifest to cache the html pages containing the video tag, then tell your web server to expire the video in 30 years. That way the video will be in the browser cache not the manifest cache.

Upvotes: 0

user356866
user356866

Reputation: 103

i have read it needs an html5 manifest setup to cache files

Upvotes: -2

Mathias Bynens
Mathias Bynens

Reputation: 149534

Sadly there’s a ~5 MB limit on offline cache in Mobile Safari. Not much you can do about it.

Upvotes: 11

Related Questions