IOS Web App Video Caching Playback Issue (mp4)

大城市里の小女人 提交于 2019-12-07 09:30:25

问题


Hello, I'm running the most recent version of iOS (5.0.1) on an iPad2 and cannot get the caching of .mp4 videos to work properly.

I've added the necessary listeners to listen for applicationCache events and then write to the console when those events happen, most notably, when my app is cached as noted here: https://developer.apple.com/library/archive/documentation/iPhone/Conceptual/SafariJSDatabaseGuide/OfflineApplicationCache/OfflineApplicationCache.html

Using the debug console in mobile safari on my ipad, I can see messages stating that my application has "cached" successfully (hooray!). When I reload the page EVERYTHING works, except the video (there is the icon similar to when you point to a non-existent video source; play button with a slash through it).

In checking my "Website Data" for Safari on my iPad and the full video size (and other files) are there (~28mb). This caches fine in desktop Safari (while offline), Chrome, etc. When caching the app, I get a message "Would you like to allow www.site.com to increase cache greater than 25mb", and approve and the download/cache completes.

What's even more crazy, even if I'm still online, my iPad is pointing to the local file, and it appears my iPad is trying to pull the local video, and the same error persists.


I've also:

  • made a simpler version (1 html file 1 video) cached, same issue.

  • A 1mb video, same issue, so it's not a size issue

Is it just impossible to playback cached video on the iPad? I can see the mb's so I know it's cached, it just won't play.


回答1:


Unless you don't find a way to implement a video player and rely on the standard way to include the video in your webapp, on iOS it will be managed by the external video player application and apparently it is not able to make use of the web application cache :(



来源:https://stackoverflow.com/questions/8899561/ios-web-app-video-caching-playback-issue-mp4

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!