preloadWithUrl

Preloads a URL resource.

public static void preloadWithUrl(String url) throws RteException
Since
Available since v4.4.0.

Successfully preloading a resource can speed up opening the URL resource with openWithUrl, thereby reducing wait time.

Note: This method currently only supports URLs prefixed with rte://. You can preload up to 20 URLs. If the limit is exceeded, the newly preloaded URL replaces the earliest one.

Scenario

Preloading before opening a media resource can reduce user wait time and provide a smoother audiovisual experience.

Timing

You must call this method before calling openWithUrl.

Parameters

url
A URL prefixed with rte://. For details of each field, see "Input Online Media Stream" on the audience side.

Exceptions

When the method call fails, the SDK throws an RteException containing the corresponding error information. You need to catch and handle the exception.