Class
UrlSource
A source backed by a URL. This is useful for reading data from the network. Requests will be made using an optimized reading and prefetching pattern to minimize request count and latency. Works best with servers that support HTTP range requests; otherwise, resources must be streamed and read sequentially.
Extends: PathedSource
Constructor
ts
constructor(
url: string | URL | Request,
options: UrlSourceOptions = {},
): UrlSource;Creates a new UrlSource backed by the resource at the specified URL.
When passing a Request instance, note that its signal will be overridden by Mediabunny; if you want to cancel ongoing requests, use Input.dispose.
See UrlSourceOptions.