Package com.castlabs.android.player
Class IPTVPlayerPlugin
- java.lang.Object
-
- com.castlabs.android.player.IPTVPlayerPlugin
-
- All Implemented Interfaces:
PlayerPlugin
public class IPTVPlayerPlugin extends Object implements PlayerPlugin
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.castlabs.android.player.PlayerPlugin
PlayerPlugin.DrmInitDataProvider<T extends com.google.android.exoplayer2.offline.FilterableManifest>
-
-
Constructor Summary
Constructors Constructor Description IPTVPlayerPlugin()IPTVPlayerPlugin(boolean playsClearWithExo)IPTVPlayerPlugin(com.google.android.exoplayer2.analytics.IptvAnalyticsListener.EventDispatcher dispatcher)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PlayerPlugin.DrmInitDataProvidercreateDrmInitDataProvider(ManifestModifier manifestModifier)com.google.android.exoplayer2.source.MediaSourcecreateMediaSource(PlayerConfig config, PlayerController playerController)Create the content media source based on the supplied path and thePlayerControllerList<TrackRendererPlugin.TrackRendererContainer>createRendererContainers(PlayerController playerController, DrmConfiguration drmConfiguration)Create the list of renderer containers based on the suppliedDrmConfigurationandPlayerControllercom.google.android.exoplayer2.RendererCapabilities[]getRendererCapabilities(Context context, DrmConfiguration drmConfiguration)Retrieve array of supported RendererCapabilities.booleanisFormatSupported(int format, DrmConfiguration configuration)voidremoveWVCASLicense(String lic)voidsetDiscontiniuityThreshold(long discontinuityThreshold)voidsetDispatcher(com.google.android.exoplayer2.analytics.IptvAnalyticsListener.EventDispatcher dispatcher)voidsetIgnoreDataTillVideoKeyframe(boolean ignoreDataTillVideoKeyframe)voidsetRtpQueueSizeInPackets(int rtpQueueSizeInPackets)
-
-
-
Method Detail
-
setDispatcher
public void setDispatcher(com.google.android.exoplayer2.analytics.IptvAnalyticsListener.EventDispatcher dispatcher)
-
setRtpQueueSizeInPackets
public void setRtpQueueSizeInPackets(int rtpQueueSizeInPackets)
-
setDiscontiniuityThreshold
public void setDiscontiniuityThreshold(long discontinuityThreshold)
-
setIgnoreDataTillVideoKeyframe
public void setIgnoreDataTillVideoKeyframe(boolean ignoreDataTillVideoKeyframe)
-
removeWVCASLicense
public void removeWVCASLicense(String lic)
-
isFormatSupported
public boolean isFormatSupported(int format, @Nullable DrmConfiguration configuration)- Specified by:
isFormatSupportedin interfacePlayerPlugin- 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 public com.google.android.exoplayer2.RendererCapabilities[] getRendererCapabilities(@NonNull Context context, @Nullable DrmConfiguration drmConfiguration)Description copied from interface:PlayerPluginRetrieve array of supported RendererCapabilities.- Specified by:
getRendererCapabilitiesin interfacePlayerPlugin- Parameters:
context- the contextdrmConfiguration- the drm configuration- Returns:
- RendererCapabilities array supported by the player plugin or null
-
createDrmInitDataProvider
@Nullable public PlayerPlugin.DrmInitDataProvider createDrmInitDataProvider(ManifestModifier manifestModifier)
- Specified by:
createDrmInitDataProviderin interfacePlayerPlugin
-
createMediaSource
@NonNull public com.google.android.exoplayer2.source.MediaSource createMediaSource(@NonNull PlayerConfig config, @NonNull PlayerController playerController)Description copied from interface:PlayerPluginCreate the content media source based on the supplied path and thePlayerController- Specified by:
createMediaSourcein interfacePlayerPlugin- Parameters:
config- ThePlayerConfigplayerController- ThePlayerControllerinstance- Returns:
- The media source
-
createRendererContainers
@NonNull public List<TrackRendererPlugin.TrackRendererContainer> createRendererContainers(@NonNull PlayerController playerController, @Nullable DrmConfiguration drmConfiguration) throws CastlabsPlayerException
Description copied from interface:PlayerPluginCreate the list of renderer containers based on the suppliedDrmConfigurationandPlayerController- Specified by:
createRendererContainersin interfacePlayerPlugin- Parameters:
playerController- ThePlayerControllerinstancedrmConfiguration- TheDrmConfiguration, might benull- Returns:
- The list of renderer containers
- Throws:
CastlabsPlayerException- when render containers can not be created or an error occurs
-
-