Package 

Interface TimelineBlock


  • 
    public interface TimelineBlock
    
                        

    A Timeline block represents linear and delimited part of a Timeline. It may represent content of a Video, or it can represent an Ad, such as preroll, midroll or postroll.

    • Method Summary

      Modifier and Type Method Description
      abstract long getDuration() Gets the duration of the block in milliseconds.
      abstract long getAbsoluteOffset() Gets the absolute Block offset in milliseconds, that is,the offset with respect to the total video length (content + ads).
      abstract long getRelativeOffset() Gets the relative Block offset in milliseconds, that is,the offset with respect to the content length only (no Ads).
      abstract boolean isAd() Specify if the block is an Ad.
      abstract AdPod getAdPod() If isAd returns true, use this method to get additional information about theAd Pod.
      boolean isDynamic() Returns whether the Timeline block is dynamic or not.
      void updateDuration(long duration) Updates the duration of this block.
      void updateAbsoluteOffset(long absoluteOffset) Updates the absolute offset of this block.
      void updateRelativeOffset(long relativeOffset) Updates the relative offset of this block.
      void updateAdPod(@NonNull() AdPod adPod) Updates the AdPod of this block.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getDuration

         abstract long getDuration()

        Gets the duration of the block in milliseconds.

      • getAbsoluteOffset

         abstract long getAbsoluteOffset()

        Gets the absolute Block offset in milliseconds, that is,the offset with respect to the total video length (content + ads).

      • getRelativeOffset

         abstract long getRelativeOffset()

        Gets the relative Block offset in milliseconds, that is,the offset with respect to the content length only (no Ads).

      • isAd

         abstract boolean isAd()

        Specify if the block is an Ad.

      • getAdPod

        @NonNull() abstract AdPod getAdPod()

        If isAd returns true, use this method to get additional information about theAd Pod.

      • isDynamic

         boolean isDynamic()

        Returns whether the Timeline block is dynamic or not.

        Note: The default implementation returns false.

      • updateDuration

         void updateDuration(long duration)

        Updates the duration of this block.This block must only be updated when isDynamic returns true.

        Note: The default implementation does nothing. It can be overridden to provide thedesired implementation.

        Parameters:
        duration - the new duration
      • updateAbsoluteOffset

         void updateAbsoluteOffset(long absoluteOffset)

        Updates the absolute offset of this block.This block must only be updated when isDynamic returns true.

        Note: The default implementation does nothing. It can be overridden to provide thedesired implementation.

        Parameters:
        absoluteOffset - the new absolute offset
      • updateRelativeOffset

         void updateRelativeOffset(long relativeOffset)

        Updates the relative offset of this block.This block must only be updated when isDynamic returns true.

        Note: The default implementation does nothing. It can be overridden to provide thedesired implementation.

        Parameters:
        relativeOffset - the new relative offset
      • updateAdPod

         void updateAdPod(@NonNull() AdPod adPod)

        Updates the AdPod of this block.This block must only be updated when isDynamic returns true.

        Note: The default implementation does nothing. It can be overridden to provide thedesired implementation.

        Parameters:
        adPod - the new AdPod