-
- All Implemented Interfaces:
public final class ContentProtection.ProtectedAssetHolds the result of opening a PublicationAsset with a ContentProtection.
-
-
Field Summary
Fields Modifier and Type Field Description private final PublicationAssetassetprivate final Fetcherfetcherprivate final Function1<Publication.Builder, Unit>onCreatePublication
-
Constructor Summary
Constructors Constructor Description ContentProtection.ProtectedAsset(PublicationAsset asset, Fetcher fetcher, Function1<Publication.Builder, Unit> onCreatePublication)
-
Method Summary
Modifier and Type Method Description final PublicationAssetgetAsset()Protected asset which will be provided to the parsers. final FetchergetFetcher()Primary leaf fetcher to be used by parsers. final Function1<Publication.Builder, Unit>getOnCreatePublication()Called on every parsed Publication.Builder. -
-
Constructor Detail
-
ContentProtection.ProtectedAsset
ContentProtection.ProtectedAsset(PublicationAsset asset, Fetcher fetcher, Function1<Publication.Builder, Unit> onCreatePublication)
-
-
Method Detail
-
getAsset
final PublicationAsset getAsset()
Protected asset which will be provided to the parsers. In most cases, this will be the asset provided to ContentProtection::open(), but a Content Protection might modify it in some cases:
If the original asset has a media type that can't be recognized by parsers, the Content Protection must return an asset with the matching unprotected media type.
If the Content Protection technology needs to redirect the Streamer to a different file. For example, this could be used to decrypt a publication to a temporary secure location.
-
getFetcher
final Fetcher getFetcher()
Primary leaf fetcher to be used by parsers. The Content Protection can unlock resources by modifying the Fetcher provided to ContentProtection::open(), for example by:
Wrapping the given fetcher in a TransformingFetcher with a decryption Resource.Transformer function.
Discarding the provided fetcher altogether and creating a new one to handle access restrictions. For example, by creating an HTTPFetcher which will inject a Bearer Token in requests.
-
getOnCreatePublication
final Function1<Publication.Builder, Unit> getOnCreatePublication()
Called on every parsed Publication.Builder. It can be used to modify the
Manifest, the root Fetcher or the list of service factories of a Publication.
-
-
-
-