Package com.castlabs.android.hybridads
Class HybridAdTrackRendererPlugin
java.lang.Object
com.castlabs.android.hybridads.HybridAdTrackRendererPlugin
- All Implemented Interfaces:
TrackRendererPlugin
A TrackRendererPlugin that enables hybrid ads.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.castlabs.android.player.TrackRendererPlugin
TrackRendererPlugin.TrackRendererBuilder, TrackRendererPlugin.TrackRendererContainer, TrackRendererPlugin.Type -
Constructor Summary
ConstructorsConstructorDescriptionHybridAdTrackRendererPlugin(com.castlabs.android.tunerhal.aidl.IPlayerService tunerhalPlayerService, boolean doesVideoUseSharedMemory, boolean doesAudioUseSharedMemory, int videoSharedMemorySizeInBytes, int audioSharedMemorySizeInBytes) Creates a new HybridAdTrackRendererPlugin. -
Method Summary
Modifier and TypeMethodDescriptioncreate()voidsetAdPlayerInfo(com.castlabs.android.tunerhal.aidl.IPlayerService service, int instance, long splicePts, long adDuration) Sets the ad player information.voidsetContext(Context context, FrameLayout frameLayout) Sets the context and frame layout for the HybridAdView.voidtoggleToAdSurface(boolean toggle) Toggles to the ad surface.
-
Constructor Details
-
HybridAdTrackRendererPlugin
public HybridAdTrackRendererPlugin(com.castlabs.android.tunerhal.aidl.IPlayerService tunerhalPlayerService, boolean doesVideoUseSharedMemory, boolean doesAudioUseSharedMemory, int videoSharedMemorySizeInBytes, int audioSharedMemorySizeInBytes) Creates a new HybridAdTrackRendererPlugin.- Parameters:
tunerhalPlayerService- The IPlayerService instance.doesVideoUseSharedMemory- Whether video uses shared memory.doesAudioUseSharedMemory- Whether audio uses shared memory.videoSharedMemorySizeInBytes- The size of the video shared memory in bytes.audioSharedMemorySizeInBytes- The size of the audio shared memory in bytes.
-
-
Method Details
-
create
- Specified by:
createin interfaceTrackRendererPlugin
-
setAdPlayerInfo
public void setAdPlayerInfo(com.castlabs.android.tunerhal.aidl.IPlayerService service, int instance, long splicePts, long adDuration) Sets the ad player information.- Parameters:
service- The IPlayerService instance.instance- The player service instance.splicePts- The splice presentation timestamp.adDuration- The ad duration.
-
setContext
Sets the context and frame layout for the HybridAdView.- Parameters:
context- The context.frameLayout- The frame layout.
-
toggleToAdSurface
public void toggleToAdSurface(boolean toggle) Toggles to the ad surface.- Parameters:
toggle- True to toggle to the ad surface, false otherwise.
-