Package com.jwplayer.pub.api.events
Class BufferChangeEvent
- java.lang.Object
-
- com.jwplayer.pub.api.events.Event
-
- com.jwplayer.pub.api.events.BufferChangeEvent
-
public class BufferChangeEvent extends Event
Fired when the amount of media buffered changes, only values for MP4 and HLS streams are accurate, all others are estimated.
-
-
Constructor Summary
Constructors Constructor Description BufferChangeEvent(JWPlayer player, int bufferPercent, double position, double duration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getBufferPercent()
double
getDuration()
double
getPosition()
-
-
-
Constructor Detail
-
BufferChangeEvent
public BufferChangeEvent(@NonNull JWPlayer player, int bufferPercent, double position, double duration)
-
-
Method Detail
-
getBufferPercent
public int getBufferPercent()
- Returns:
- Percentage between 0 and 100 of the current media that is buffered.
-
getPosition
public double getPosition()
- Returns:
- Current position of the media file (in milliseconds).
-
getDuration
public double getDuration()
- Returns:
- Current media's duration (in milliseconds).
-
-