0

I've been asked to create an flip-board style website which will embed both in-view PDF documents and small videos. Easy enough, I've built the flipboard already and understand how to do video embed etc.

The catch is, this needs to be offline as the aim is for users to use it during their plane flights...

Is phonegap able to create a native web-app which embeds say, 10-12: 30 second videos?

I'm trying to actually get my head around this all.

My aim is to have one larger download (potentially up to 80-100mbs) which is then completely useable from first open offline.

Is this the right approach to this?

Thanks,

Alistair.

Roope Hakulinen
  • 7,326
  • 4
  • 43
  • 66

2 Answers2

0

Just as pedantry, speaking about native in case of Cordova (previously PhoneGap) is somewhat misleading as they usually are referred to as hybrid apps.

About your idea, yes it is possible. There is no limit on how much you can store on device file system (other than the obvious physical limits of space available). Also it is possible to show the videos from local file system just like from the web. What you should look into is the File plugin for Cordova with what you can store the videos on local filesystem and then retrieve the URLs or data of them.

Roope Hakulinen
  • 7,326
  • 4
  • 43
  • 66
0

iOS supports HTML5 video playback directly,but android does not. There are several options.

1) Use the FileTransfer plugin to copy the files the first time your app is launched. Then you can play them. See here for details

2) Use a plugin that does the steps in #1 for you. These allow you to have the same HTML5 code for iOS and android.

https://github.com/macdonst/VideoPlayer

https://github.com/jaeger25/Html5Video


For PDF, iOS supports this natively using the InAppBrowser plugin. See this question for details.

Again, android is a problem because there is no native PDF viewer. Here are a couple of suggestions.
1) Use the web intents approach. Web intents is used to find an installed program that will open the file for you. Here is a plug in that handles this issue.

https://github.com/don/FileOpener

2) Here are some other suggestions in this similar question.

Community
  • 1
  • 1
kheld
  • 782
  • 5
  • 14