Class POBMediaFile

  • All Implemented Interfaces:
    com.pubmatic.sdk.video.xmlserialiser.POBXMLNodeListener

    
    public class POBMediaFile
     implements POBXMLNodeListener
                        

    Class represents a single Media file in VAST.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
      POBMediaFile()
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      void build(@NonNull() POBNodeBuilder builder) POBXMLParser calls this method to build model class object with node builder
      String getDelivery() Either "progressive" for progressive download protocols (such as HTTP) or "streaming" for streaming protocols.
      String getType() MIME type for the file container.
      int getBitrate() Specifies the average bitrate for the media file
      int getWidth() The native width of the video file, in pixels.
      int getHeight() The native height of the video file, in pixels.
      boolean getScalable() A Boolean value that indicates whether the media file is meant to scale to larger dimensions.
      boolean getMaintainAspectRatio() A Boolean value that indicates whether aspect ratio for media file dimensions should be maintained when scaled to new dimensions.
      String getMediaFileURL() Media file url
      String getFileSize() Optional field that helps eliminate the need to calculate the size based on bitrate and duration Units - Bytes
      String toString()
      • Methods inherited from class java.lang.Object

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

      • POBMediaFile

        POBMediaFile()
    • Method Detail

      • build

         void build(@NonNull() POBNodeBuilder builder)

        POBXMLParser calls this method to build model class object with node builder

        Parameters:
        builder - Instance of POBNodeBuilder, to be used for building the model class object
      • getDelivery

        @Nullable() String getDelivery()

        Either "progressive" for progressive download protocols (such as HTTP) or "streaming" for streaming protocols.

        Returns:

        delivery type

      • getType

        @Nullable() String getType()

        MIME type for the file container.

        Popular MIME types include, but are not limited to "video/mp4" for MP4, "audio/mpeg" and "audio/aac" for audio ads.

        Returns:

        MIME type

      • getBitrate

         int getBitrate()

        Specifies the average bitrate for the media file

        Returns:

        average bitrate for the media file

      • getWidth

         int getWidth()

        The native width of the video file, in pixels. (0 for audio ads)

        Returns:

        width of video file

      • getHeight

         int getHeight()

        The native height of the video file, in pixels. (0 for audio ads)

        Returns:

        height of video file

      • getScalable

         boolean getScalable()

        A Boolean value that indicates whether the media file is meant to scale to larger dimensions.

        Returns:

        scalable boolean value

      • getMaintainAspectRatio

         boolean getMaintainAspectRatio()

        A Boolean value that indicates whether aspect ratio for media file dimensions should be maintained when scaled to new dimensions.

        Returns:

        maintainAspectRatio boolean value

      • getFileSize

        @Nullable() String getFileSize()

        Optional field that helps eliminate the need to calculate the size based on bitrate and duration Units - Bytes

        Returns:

        file size