kmeixner
04-17-2008, 09:58 AM
Hello,
I am trying to figure out how to use caching for SWF video and MP3 audio downloaded via a URL in an OpenLaszlo application during runtime. I am using OpenLaszlo 3.3.3 with an application compiled in proxied mode to SWF8.
Basically, in my application I often need to reload the same large video or large audio file (from a URL) into multiple views in the application simultaneously and I would like to avoid having to reload the entire media item into memory after it is loaded once.
Right now it seems to load an instance of the media item into the application for every view it is displayed in -- taking the same amount of time to load the second time as the first time. I thought that by turning caching on it would load the media item once and then have it available in memory for re-use if the same media item is set as the resource of another view but this does not seem to be the case.
On the client side, I load all media items into the LzView class with the setSource() method and cache set to 'both' (client and server).
I also attempted to configure the lps/config/lps.properties file by uncommenting the mcache.directory, mcache.disk.size and mcache.mem.size but then when I tried to reload the same item twice the application would hang. Maybe this needs to be working to solve my problem? (any help getting this to work would be appreciated)
If anyone can tell me how to have multiple views of the same resource loaded from a URL (determined during runtime) without loading two copies of the media item into memory it would be greatly appreciated.
Thanks,
Kevin
I am trying to figure out how to use caching for SWF video and MP3 audio downloaded via a URL in an OpenLaszlo application during runtime. I am using OpenLaszlo 3.3.3 with an application compiled in proxied mode to SWF8.
Basically, in my application I often need to reload the same large video or large audio file (from a URL) into multiple views in the application simultaneously and I would like to avoid having to reload the entire media item into memory after it is loaded once.
Right now it seems to load an instance of the media item into the application for every view it is displayed in -- taking the same amount of time to load the second time as the first time. I thought that by turning caching on it would load the media item once and then have it available in memory for re-use if the same media item is set as the resource of another view but this does not seem to be the case.
On the client side, I load all media items into the LzView class with the setSource() method and cache set to 'both' (client and server).
I also attempted to configure the lps/config/lps.properties file by uncommenting the mcache.directory, mcache.disk.size and mcache.mem.size but then when I tried to reload the same item twice the application would hang. Maybe this needs to be working to solve my problem? (any help getting this to work would be appreciated)
If anyone can tell me how to have multiple views of the same resource loaded from a URL (determined during runtime) without loading two copies of the media item into memory it would be greatly appreciated.
Thanks,
Kevin