We use essential cookies for the website to function, as well as analytics cookies for analyzing and creating statistics of the website performance. To agree to the use of analytics cookies, click "Accept All". You can manage your preferences at any time by clicking "Cookie Settings" on the footer. More Information.

Only Essential Cookies
Accept All

Documents from this version have been archived, and will not continue to be maintained. Please use the latest version.

HMS Core ReferencesAds KitadsVideoOperatorOverview

VideoOperator

interface info
public interface VideoOperator
Video controller, which implements video control such as playing, pausing, and muting a video.

Nested Class Summary

TypeNameDesc
ClassVideoOperator.VideoLifecycleListenerVideo event callback listener.

Public Method Summary

ReturnMethod
floatgetAspectRatio()
Obtains the video aspect ratio.
VideoOperator.VideoLifecycleListenergetVideoLifecycleListener()
Obtains the video event listener.
booleanhasVideo()
Checks whether ad content contains a video.
booleanisCustomizeOperateEnabled()
Checks whether a custom video control is used for a video ad.
booleanisMuted()
Checks whether a video is muted.
voidmute(boolean mute)
Specifies whether to mute a video when a custom video control is used.
voidpause()
Pauses video playback when a custom video control is used.
voidplay()
Plays a video when a custom video control is used.
voidsetVideoLifecycleListener(VideoOperator.VideoLifecycleListener listener)
Sets a video event callback listener.
voidstop()
Stops video playback when a custom video control is used.

Public Methods

Method
public float getAspectRatio()
Obtains the video aspect ratio.

Return

typedesc
floatVideo aspect ratio. If the aspect ratio information is unavailable, 0 is returned.
Method
public VideoOperator.VideoLifecycleListener getVideoLifecycleListener()
Obtains the video event listener.

Return

typedesc
VideoOperator.VideoLifecycleListenerVideo event listener.
Method
public boolean hasVideo()
Checks whether ad content contains a video.

Return

typedesc
booleanIf the ad content contains a video, true is returned. Otherwise, false is returned.
Method
public boolean isCustomizeOperateEnabled()
Checks whether a custom video control is used for a video ad.

Return

typedesc
booleanIf a custom video control is used for a video ad, true is returned. Otherwise, false is returned.
Method
public boolean isMuted()
Checks whether a video is muted.

Return

typedesc
booleanIf a video is muted, true is returned. Otherwise, false is returned.
Method
public void mute(boolean mute)
Specifies whether to mute a video when a custom video control is used.

Parameters

Parameter nameParameter desc
muteIndicates whether to mute a video. The options are true (yes) and false (no).
Method
public void pause()
Pauses video playback when a custom video control is used.
Method
public void play()
Plays a video when a custom video control is used.
Method
public void setVideoLifecycleListener(VideoOperator.VideoLifecycleListener listener)
Sets a video event callback listener.

Parameters

Parameter nameParameter desc
listenerVideo event listener.
Method
public void stop()
Stops video playback when a custom video control is used.
This page may contain third-party content. For details, click here.
Search in References
Enter a keyword.