public protocol OfflineContentManagerTweaksApi

This API is used as an incubator for experimental features. Tweaks are not officially supported and are not guaranteed to be stable, i.e. their naming, functionality and API can change at any time within the tweaks or when being promoted to an official feature and moved into its final configuration namespace.

  • Migrates OfflineContentManager to use a new remote asset URL for downloads. Affects completed, ongoing and future downloads.

    A ContentUrlMigrationFinishedEvent will be emitted once the migration has finished or an OfflineErrorEvent in case of any error.

    Calling this method when content is not downloaded affects future downloads and results in ContentUrlMigrationFinishedEvent being emitted.

    Resuming download after migration will continue using the new remote asset URL. In case the download is in-progress at the time this method is called, it will be suspended. Suspension just happens if a remoteAssetUrl other than the currently downloading one is passed. Passing the same remoteAssetUrl as the one which is currently used, does not have any effect. Suspended downloads have to be resumed explicitly.

    Subsequent downloads will use the URL provided here.


    id parameter must be passed to OfflineManager.offlineContentManager in order to enable this feature. Using it without may result in unexpected behavior.



    func migrateDownload(
        remoteAssetUrl: URL,
        resourceIdentifierCallback: @escaping (_ identifier: String) -> String



    new remote asset URL for the download


    A callback used to provide an identifier for a resource located at a given URL. Resource in this case refers to all downloaded objects of the source, including e.g. the manifest or segments. The returned identifier has to be unique within the current source and must not change throughout the lifecycle of the downloaded content. This callback has to be provided to ensure resources stay available even if the URL of the asset and URLs within the manifest of the asset change.