| interface info |
| public interface VideoOperator |
| Video controller, which implements video control such as playing, pausing, and muting a video. |
| Type | Name | Desc |
| Class | VideoOperator.VideoLifecycleListener | Video event callback listener. |
| Return | Method |
| float | getAspectRatio() Obtains the video aspect ratio. |
| VideoOperator.VideoLifecycleListener | getVideoLifecycleListener() Obtains the video event listener. |
| boolean | hasVideo() Checks whether ad content contains a video. |
| boolean | isCustomizeOperateEnabled() Checks whether a custom video control is used for a video ad. |
| boolean | isMuted() Checks whether a video is muted. |
| void | mute(boolean mute) Specifies whether to mute a video when a custom video control is used. |
| void | pause() Pauses video playback when a custom video control is used. |
| void | play() Plays a video when a custom video control is used. |
| void | setVideoLifecycleListener(VideoOperator.VideoLifecycleListener listener) Sets a video event callback listener. |
| void | stop() Stops video playback when a custom video control is used. |
| Method |
| public float getAspectRatio() |
| Obtains the video aspect ratio. |
Return
| type | desc |
| float | Video aspect ratio. If the aspect ratio information is unavailable, 0 is returned. |
| Method |
| public VideoOperator.VideoLifecycleListener getVideoLifecycleListener() |
| Obtains the video event listener. |
Return
| type | desc |
| VideoOperator.VideoLifecycleListener | Video event listener. |
| Method |
| public boolean hasVideo() |
| Checks whether ad content contains a video. |
Return
| type | desc |
| boolean | If 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
| type | desc |
| boolean | If 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
| type | desc |
| boolean | If 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 name | Parameter desc |
| mute | Indicates 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 name | Parameter desc |
| listener | Video event listener. |
| Method |
| public void stop() |
| Stops video playback when a custom video control is used. |