public interface CachingControl extends Control
CachingControl
is an interface supported by Players
that are capable of reporting download progress.
Typically, this control is accessed through
the Controller.getControls
method.
A Controller
that supports this control will post
CachingControlEvents
often enough to support the implementation
of custom progress GUIs.Controller
,
ControllerListener
,
CachingControlEvent
,
Player
Modifier and Type | Field and Description |
---|---|
static long |
LENGTH_UNKNOWN
Use to indicate that the
CachingControl doesn't
know how long the content is. |
Modifier and Type | Method and Description |
---|---|
long |
getContentLength()
Get the total number of bytes in the media being downloaded.
|
long |
getContentProgress()
Get the total number of bytes of media data that have been downloaded so far.
|
Component |
getControlComponent()
Get a
Component that provides additional download control. |
Component |
getProgressBarComponent()
Get a
Component for displaying the download progress. |
boolean |
isDownloading()
Check whether or not media is being downloaded.
|
static final long LENGTH_UNKNOWN
CachingControl
doesn't
know how long the content is.The definition is: LENGTH_UNKNOWN == Long.MAX_VALUE
boolean isDownloading()
true
if media is being downloaded;
otherwise returns false
.
.long getContentLength()
LENGTH_UNKNOWN
if this information is not available.LENGTH_UNKNOWN
.long getContentProgress()
Component getProgressBarComponent()
Component
for displaying the download progress.Component getControlComponent()
Component
that provides additional download control.
Returns null
if only a progress bar is provided.getControlComponent
in interface Control
Copyright © 2013 CableLabs. All rights reserved.