Package com.naver.ads.video.player
Class VideoTimeBar
-
- All Implemented Interfaces:
-
android.graphics.drawable.Drawable.Callback,android.view.KeyEvent.Callback,android.view.accessibility.AccessibilityEventSource,com.naver.ads.video.player.Updatable
public final class VideoTimeBar extends View implements Updatable
A time bar of video ad that shows a current position, buffered position, duration
-
-
Field Summary
Fields Modifier and Type Field Description public final static FloatDEFAULT_BAR_HEIGHT_DPpublic final static FloatDEFAULT_CORNER_RADIUS_DP
-
Constructor Summary
Constructors Constructor Description VideoTimeBar(Context context, AttributeSet attrs, Integer defStyleAttr)VideoTimeBar(Context context, AttributeSet attrs)VideoTimeBar(Context context)
-
Method Summary
Modifier and Type Method Description final UnitsetPlayedColor(Integer playedColor)Sets the color for the portion of the time bar representing media before the playback position. final UnitsetBufferedColor(Integer bufferedColor)Sets the color for the portion of the time bar after the current played position up to the current buffered position. final UnitsetUnplayedColor(Integer unplayedColor)Sets the color for the portion of the time bar after the current played position. final UnitsetCornerRadius(Integer cornerRadius)Sets the corner radius to be applied to the played,buffered, andunplayedbars.UnitonMeasure(Integer widthMeasureSpec, Integer heightMeasureSpec)UnitonLayout(Boolean changed, Integer left, Integer top, Integer right, Integer bottom)UnitonDraw(Canvas canvas)Unitupdate(VideoAdState state, VideoProgressUpdate progressUpdate, Boolean muted)Propagates state and progressUpdate to the UiElementViews managed by UiElementViewGroupManager. -
-
Constructor Detail
-
VideoTimeBar
VideoTimeBar(Context context, AttributeSet attrs, Integer defStyleAttr)
-
VideoTimeBar
VideoTimeBar(Context context, AttributeSet attrs)
-
VideoTimeBar
VideoTimeBar(Context context)
-
-
Method Detail
-
setPlayedColor
final Unit setPlayedColor(Integer playedColor)
Sets the color for the portion of the time bar representing media before the playback position.
- Parameters:
playedColor- The color for the portion of the time bar representing media before the playback position.
-
setBufferedColor
final Unit setBufferedColor(Integer bufferedColor)
Sets the color for the portion of the time bar after the current played position up to the current buffered position.
- Parameters:
bufferedColor- The color for the portion of the time bar after the current played position up to the current buffered position.
-
setUnplayedColor
final Unit setUnplayedColor(Integer unplayedColor)
Sets the color for the portion of the time bar after the current played position.
- Parameters:
unplayedColor- The color for the portion of the time bar after the current played position.
-
setCornerRadius
final Unit setCornerRadius(Integer cornerRadius)
Sets the corner radius to be applied to the
played,buffered, andunplayedbars.- Parameters:
cornerRadius- the corner radius to be applied to theplayed,buffered, andunplayedbars.
-
update
Unit update(VideoAdState state, VideoProgressUpdate progressUpdate, Boolean muted)
Propagates state and progressUpdate to the UiElementViews managed by UiElementViewGroupManager.
- Parameters:
state- the state of video ad.progressUpdate- the VideoProgressUpdate describing playback progress of the current ad.muted- the mute state of the current audio stream.
-
-
-
-