Package com.castlabs.android.player
Interface PlayerPlugin
-
- All Known Implementing Classes:
AmLogicPlayerPlugin
,IPTVPlayerPlugin
public interface PlayerPlugin
A plugin interface that is used to initialize player instances for different content formats such as HLS, DASH, or SmoothStreaming. Instances of this plugin can be registered withPlayerSDK.register(PlayerPlugin)
.- Since:
- 3.0.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
PlayerPlugin.DrmInitDataProvider<T extends com.google.android.exoplayer2.offline.FilterableManifest>
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description PlayerPlugin.DrmInitDataProvider
createDrmInitDataProvider(ManifestModifier manifestModifier)
com.google.android.exoplayer2.source.MediaSource
createMediaSource(PlayerConfig config, PlayerController playerController)
Create the content media source based on the supplied path and thePlayerController
List<TrackRendererPlugin.TrackRendererContainer>
createRendererContainers(PlayerController playerController, DrmConfiguration drmConfiguration)
Create the list of renderer containers based on the suppliedDrmConfiguration
andPlayerController
com.google.android.exoplayer2.RendererCapabilities[]
getRendererCapabilities(Context context, DrmConfiguration drmConfiguration)
Retrieve array of supported RendererCapabilities.boolean
isFormatSupported(int format, DrmConfiguration configuration)
-
-
-
Method Detail
-
isFormatSupported
boolean isFormatSupported(int format, @Nullable DrmConfiguration configuration)
- Parameters:
format
- the content format (one ofSdkConsts.CONTENT_TYPE_UNKNOWN
,SdkConsts.CONTENT_TYPE_DASH
,SdkConsts.CONTENT_TYPE_HLS
,SdkConsts.CONTENT_TYPE_SMOOTHSTREAMING
, orSdkConsts.CONTENT_TYPE_MP4
)configuration
- the drm configuration- Returns:
- true if this plugin can create a player for the given content format and drm configuration
-
getRendererCapabilities
@Nullable com.google.android.exoplayer2.RendererCapabilities[] getRendererCapabilities(@NonNull Context context, @Nullable DrmConfiguration drmConfiguration)
Retrieve array of supported RendererCapabilities.- Parameters:
context
- the contextdrmConfiguration
- the drm configuration- Returns:
- RendererCapabilities array supported by the player plugin or null
-
createDrmInitDataProvider
@Nullable PlayerPlugin.DrmInitDataProvider createDrmInitDataProvider(ManifestModifier manifestModifier)
-
createMediaSource
@NonNull com.google.android.exoplayer2.source.MediaSource createMediaSource(@NonNull PlayerConfig config, @NonNull PlayerController playerController)
Create the content media source based on the supplied path and thePlayerController
- Parameters:
config
- ThePlayerConfig
playerController
- ThePlayerController
instance- Returns:
- The media source
-
createRendererContainers
@NonNull List<TrackRendererPlugin.TrackRendererContainer> createRendererContainers(@NonNull PlayerController playerController, @Nullable DrmConfiguration drmConfiguration) throws CastlabsPlayerException
Create the list of renderer containers based on the suppliedDrmConfiguration
andPlayerController
- Parameters:
playerController
- ThePlayerController
instancedrmConfiguration
- TheDrmConfiguration
, might benull
- Returns:
- The list of renderer containers
- Throws:
CastlabsPlayerException
- when render containers can not be created or an error occurs
-
-