Package com.castlabs.android.player
Class BasePlayerModelBuilder
java.lang.Object
com.castlabs.android.player.BasePlayerModelBuilder
Helper class that takes care of the track renderer creation using the registered
TrackRendererPlugin plugins.- Since:
- 3.0.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateDrmLicenseManager(Context context, TrackRendererPlugin.Type type, DrmConfiguration drmConfiguration, ConfigurationProvider configurationProvider, SSLSocketFactory sslSocketFactory, DataSourceFactory dataSourceFactory, NetworkConfiguration networkConfiguration, List<RequestModifier> requestModifiers, List<ResponseModifier> responseModifiers) createRenderer(PlayerController playerController, DrmConfiguration drmConfiguration, TrackRendererPlugin.Type type) Creates aTrackRendererPlugin.TrackRendererContainerfor the given parameters.com.google.android.exoplayer2.RendererCapabilitiesgetRendererCapabilities(Context context, TrackRendererPlugin.Type type, DrmConfiguration drmConfiguration)
-
Constructor Details
-
BasePlayerModelBuilder
public BasePlayerModelBuilder()Default constructor.
-
-
Method Details
-
createDrmLicenseManager
@Nullable public DrmLicenseManager createDrmLicenseManager(@NonNull Context context, @NonNull TrackRendererPlugin.Type type, @Nullable DrmConfiguration drmConfiguration, @Nullable ConfigurationProvider configurationProvider, @Nullable SSLSocketFactory sslSocketFactory, @NonNull DataSourceFactory dataSourceFactory, @NonNull NetworkConfiguration networkConfiguration, @NonNull List<RequestModifier> requestModifiers, @NonNull List<ResponseModifier> responseModifiers) - Parameters:
context- The context.type- The track type.drmConfiguration- The DRM configuration.configurationProvider- The configuration providernullsslSocketFactory- The SSL socket factory ornulldataSourceFactory- The data source factorynetworkConfiguration- THe network configurationrequestModifiers- The list of request modifiersresponseModifiers- The list of response modifiers- Returns:
- The
DrmLicenseManagerornullif no suitable builder was found.
-
getRendererCapabilities
@Nullable public com.google.android.exoplayer2.RendererCapabilities getRendererCapabilities(@NonNull Context context, TrackRendererPlugin.Type type, @Nullable DrmConfiguration drmConfiguration) - Parameters:
context- The context.type- The track type.drmConfiguration- The DRM configuration.- Returns:
- The renderer capabilities or
nullif no suitable builder was found.
-
createRenderer
@NonNull public TrackRendererPlugin.TrackRendererContainer createRenderer(@NonNull PlayerController playerController, @Nullable DrmConfiguration drmConfiguration, TrackRendererPlugin.Type type) throws CastlabsPlayerException Creates aTrackRendererPlugin.TrackRendererContainerfor the given parameters.- Parameters:
playerController- The player controller.drmConfiguration- The DRM configuration.type- The track type.- Returns:
- The created track renderer container.
- Throws:
CastlabsPlayerException- If no suitable builder was found or an error occurred during creation.
-