Package com.brightcove.player.offline
Class RequestConfig
java.lang.Object
com.brightcove.player.offline.RequestConfig
A configuration class whose values are passed over to the
DownloadManager
in each request made.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic @interface
List of values that can take the methodsetNotificationVisibility(int)
. -
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncopy()
Creates a shallow copy of the current config.Gets the request description.Gets the current base path that will be used to store the downloaded file(s).int
Returns the notification visibility.getTitle()
Gets the request title.int
Gets the video bitrate configured.boolean
Returns whether download over a bluetooth network is allowed.boolean
Returns whether download over a metered network is allowed.boolean
Returns whether download over a mobile network is allowed.boolean
Returns whether download over a mobile roaming network is allowed.boolean
Returns whether download over a WIFI network is allowed.setBluetoothDownloadAllowed
(boolean allowed) Sets whether download over bluetooth network is allowed.setDescription
(String description) Sets the request description.setDownloadPath
(File downloadPath) Sets the base path that must be used to the downloaded file(s).setMeteredDownloadAllowed
(boolean meteredDownloadAllowed) Sets whether download over metered is allowed.setMobileDownloadAllowed
(boolean allowed) Sets whether download over mobile network is allowed.setNotificationVisibility
(int notificationVisibility) Sets the notification visibility.setRoamingDownloadAllowed
(boolean roamingDownloadAllowed) Sets whether download over roaming is allowed.Sets the request title.setVideoBitrate
(int videoBitrate) Sets the video bitrate cap which will be used to determine what rendition will be downloaded.setWifiDownloadAllowed
(boolean allowed) Sets whether download over WIFI network is allowed.
-
Field Details
-
VISIBILITY_VISIBLE
public static final int VISIBILITY_VISIBLE- See Also:
-
VISIBILITY_VISIBLE_NOTIFY_COMPLETED
public static final int VISIBILITY_VISIBLE_NOTIFY_COMPLETED- See Also:
-
VISIBILITY_HIDDEN
public static final int VISIBILITY_HIDDEN- See Also:
-
VISIBILITY_VISIBLE_NOTIFY_ONLY_COMPLETION
public static final int VISIBILITY_VISIBLE_NOTIFY_ONLY_COMPLETION- See Also:
-
DEFAULT_VIDEO_BITRATE
public static final int DEFAULT_VIDEO_BITRATE- See Also:
-
-
Constructor Details
-
RequestConfig
public RequestConfig()
-
-
Method Details
-
getDownloadPath
Gets the current base path that will be used to store the downloaded file(s).- Returns:
- the download path.
-
setDownloadPath
Sets the base path that must be used to the downloaded file(s).
- Parameters:
downloadPath
- the download path.- Returns:
- this object
-
getTitle
Gets the request title.- Returns:
- the title
-
getDescription
Gets the request description.- Returns:
- the description
-
isMobileDownloadAllowed
public boolean isMobileDownloadAllowed()Returns whether download over a mobile network is allowed. By default is not allowed.- Returns:
- true if allowed
-
isWifiDownloadAllowed
public boolean isWifiDownloadAllowed()Returns whether download over a WIFI network is allowed. By default is not allowed.- Returns:
- true if allowed
-
isBluetoothDownloadAllowed
public boolean isBluetoothDownloadAllowed()Returns whether download over a bluetooth network is allowed. By default is not allowed.- Returns:
- true if allowed
-
isRoamingDownloadAllowed
public boolean isRoamingDownloadAllowed()Returns whether download over a mobile roaming network is allowed. By default is not allowed.- Returns:
- true if allowed
-
isMeteredDownloadAllowed
public boolean isMeteredDownloadAllowed()Returns whether download over a metered network is allowed. By default is not allowed.- Returns:
- true if allowed
-
getNotificationVisibility
public int getNotificationVisibility()Returns the notification visibility. It can have the following values:VISIBILITY_HIDDEN
,VISIBILITY_VISIBLE
,VISIBILITY_VISIBLE_NOTIFY_COMPLETED
andVISIBILITY_VISIBLE_NOTIFY_ONLY_COMPLETION
- Returns:
- the notification visibility
-
getVideoBitrate
public int getVideoBitrate()Gets the video bitrate configured.- Returns:
- the video bitrate
-
setTitle
Sets the request title.- Parameters:
title
- the title- Returns:
- this object
-
setDescription
Sets the request description.- Parameters:
description
- the description- Returns:
- this object
-
setMobileDownloadAllowed
Sets whether download over mobile network is allowed.- Parameters:
allowed
- whether mobile download network is allowed- Returns:
- this object
-
setWifiDownloadAllowed
Sets whether download over WIFI network is allowed.- Parameters:
allowed
- whether download WIFI network is allowed- Returns:
- this object
-
setBluetoothDownloadAllowed
Sets whether download over bluetooth network is allowed.- Parameters:
allowed
- whether download bluetooth network is allowed- Returns:
- this object
-
setRoamingDownloadAllowed
Sets whether download over roaming is allowed.- Parameters:
roamingDownloadAllowed
- whether roaming is allowed- Returns:
- this object
-
setMeteredDownloadAllowed
Sets whether download over metered is allowed.- Parameters:
meteredDownloadAllowed
- whether metered is allowed- Returns:
- this object
-
setVideoBitrate
Sets the video bitrate cap which will be used to determine what rendition will be downloaded. If there's no rendition lower than the video bitrate provided, the next higher will be picked.- Parameters:
videoBitrate
- the video bitrate- Returns:
- this object
-
setNotificationVisibility
Sets the notification visibility.- Parameters:
notificationVisibility
- the notification visibility- Returns:
- this object
-
copy
Creates a shallow copy of the current config.- Returns:
- a shallow copy of the current config.
-