Skip to content

MediaContent

The MediaContent class represents the media assets (e.g., video or image) associated with a native ad.

Methods

has_video_content / HasVideoContent

Returns true if the media content contains a video asset.

func has_video_content() -> bool
public bool HasVideoContent()

get_video_controller / GetVideoController

Returns the AdVideoController associated with this media content to control video playback and receive video events.

func get_video_controller() -> AdVideoController
public AdVideoController GetVideoController()

get_duration / GetDuration

Returns the duration of the video asset in seconds, or 0.0 if there is no video content.

func get_duration() -> float
public float GetDuration()

get_aspect_ratio / GetAspectRatio

Returns the aspect ratio (width/height) of the media content, or 0.0 if not available.

func get_aspect_ratio() -> float
public float GetAspectRatio()