factory
Creates a DataSource.Factory that handles both local and network media URIs.
When a CDN is provided, HTTP/HTTPS requests are transformed through CDN.fileRequest for URL rewriting and header injection. Local URIs (file://, content://) pass through unchanged.
When a videoCache is provided, it wraps the resulting factory so bytes from any ExoPlayer-driven playback (video, audio, voice recordings) are served from disk on subsequent reads. The cache layer is the outermost wrapper, keyed by the dataSpec.uri with query parameters stripped, so cache lookups are unaffected by CDN URL rewriting and by rotating pre-signed query/signature values.
Parameters
The context used to create the base data source.
Optional custom CDN for transforming network requests.
Optional disk cache for ExoPlayer-driven playback (video and audio).