ConstQueues a download (idempotent per URL — re-adding a completed or
in-flight URL is a no-op). For DRM items this also acquires the
persistent offline license during the download; see the DRM note above
for how tokenProvider items are handled. Resolves once the request has
been handed to the native download manager — progress and completion
arrive via OGDownloads.addListener.
Subscribes to download events: stateChanged on every state transition,
throttled progress while downloading, and failed with the mirrored
OGPlayerError. Returns a subscription — call remove() to stop.
A snapshot of every download the SDK knows about, in insertion order.
Pauses the download with this media URL.
Pauses every download.
Deletes the downloaded media AND releases/erases its stored license.
For DRM'd downloads on Android, pass the item (same drm config used
for OGDownloads.add) so the Widevine release request to the
license server can authenticate — without it, token-authorized
deployments leak that device's server-side offline slot until it
expires. A tokenProvider is invoked once (renewal: true) before the
call crosses the bridge. iOS ignores item: FairPlay persistent keys
are erased locally, no server round-trip exists.
Optionalitem: OGMediaItemRe-fetches the persistent license for a downloaded DRM item — call when
OfflineLicenseInfo.isExpired (or playback fails with 4006
DRM_OFFLINE_LICENSE_EXPIRED) and the device is online. The item must
carry the same drm config used for the download; a tokenProvider is
invoked once with renewal: true before the request crosses the bridge.
Resumes a paused/failed download with this media URL.
Resumes every paused download.
Offline downloads — the imperative module mirroring
OGDownloads/OGDownloadManageron the native SDKs. Downloads are keyed by media URL; playing a downloaded URL through<OGPlayerView>picks up the local copy automatically (clear content AND DRM content with its stored persistent license) — no player-side code change. VOD only:add()of a live item is rejected natively.DRM note (v1): downloads support DRM with static license headers. If the item carries a
drm.tokenProvider, it is called ONCE in this wrapper — before the request crosses to native — and the returned headers are merged into the license headers used to fetch the persistent license during the download. Renewal-capable token flows fetch a fresh token per OGDownloads.renewLicense call, which goes through the wrapper the same way (renewal: true).