WebSite X5Help Center

 
Gerhard B.
Gerhard B.
User

Selection of video object  en

Autor: Gerhard B.
Visitado 522, Followers 1, Compartido 0  
Tags: file,video

Some of my users are online and read the HTML on the web, some are offline with installation of the HTML through an installation CD, copying the content to a local drive. How can I make the Video Object to look either for the local drive (something like 'if video file exists...') or on the web/YouTube (if file does not exist)???

Any idea appreciated

Publicado en
1 RESPUESTAS
Paul M.
Paul M.
Moderator

Hello Gerhard,

HTML5 can make use of the browser "application cache" to provide offline access, whereby the browser will "fallback" to using files stored in the cache in the event that a connection to the internet is not available.  This cache is not to be confused with the browser's local cache...  even when users empty the local cache, the files in the application cache will remain untouched.

However, you would need to find a way to populate the application cache from the installation CD.  This is because the application cache is normally populated the first time a user requests a file from the internet, which is then stored and made available for offline viewing.  However, in your own case you want the files to be available in the application cache immediately after installation from the CD, as an initial download will not be possible.

You would need to add some HTML to your page(s) as necessary.  WebSite X5 has several ways of adding HTML to a project, including the HTML Object of course.

Unfortunately I've never created a project which makes use of offline resources in this way, so I can't advise you further.  But the following links should give you a good starting point for further reading:

http://www.html5rocks.com/en/tutorials/appcache/beginner/

http://en.wikipedia.org/wiki/Cache_manifest_in_HTML5

http://mislav.uniqpath.com/diveintohtml5/offline.html

Hope this helps in some way.

Best wishes,

Paul

Leer más
Publicado en de Paul M.