local Resources
A mapping of local resource IDs to local paywall resources.
Use this to serve paywall assets (images, videos, Lottie animations) from local files instead of fetching them over the network. When a paywall references a localResourceId, the SDK will look up the corresponding resource in this map.
Superwall.instance.localResources = mapOf(
"hero-video" to PaywallResource.FromUri(Uri.fromFile(File(context.filesDir, "onboarding.mp4"))),
"hero-image" to PaywallResource.FromResources(R.drawable.hero),
"bg-animation" to PaywallResource.FromResources(R.raw.lottie_bg),
)Content copied to clipboard
Paywall HTML usage: <video src="swlocal://hero-video" autoplay></video>