Class HybridAdTrackRendererPlugin

java.lang.Object
com.castlabs.android.hybridads.HybridAdTrackRendererPlugin
All Implemented Interfaces:
TrackRendererPlugin

public class HybridAdTrackRendererPlugin extends Object implements TrackRendererPlugin
A TrackRendererPlugin that enables hybrid ads.
  • 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

      @NonNull public TrackRendererPlugin.TrackRendererBuilder create()
      Specified by:
      create in interface TrackRendererPlugin
    • 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

      public void setContext(Context context, FrameLayout frameLayout)
      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.