preloadWithUrl
Preloads a URL resource.
public static void preloadWithUrl(String url) throws RteException;
- Since
- v4.5.0
After successful preloading, the speed of accessing URL resources can be accelerated when calling openWithUrl. When you need to use these resources, you can access them more quickly and shorten the waiting process.
Applicable scenarios
Before opening media resources, preloading can reduce the time for waiting and provide a smoother user experience.
Call timing
Call this method after openWithUrl.
Restrictions
This method currently only takes effect on URLs with the prefix rte://. A maximum of 20 URLs can be preloaded. If exceeded, the newly preloaded URL will replace the oldest one.
Parameters
- url
- URLs with the
rte://prefix.
Exception
If the method call fails, the SDK throws RteException and returns an error message. You need to catch the exception and handle it.