Package com.brightcove.player.edge
Class GetVideoTask
- All Implemented Interfaces:
Component
-
Nested Class Summary
Nested classes/interfaces inherited from class android.os.AsyncTask
android.os.AsyncTask.Status
-
Field Summary
Modifier and TypeFieldDescriptionprotected String
static final String
protected String
static final String
protected EventEmitter
static final String
protected final HttpRequestConfig
protected HttpService
protected URI
Fields inherited from class android.os.AsyncTask
SERIAL_EXECUTOR, THREAD_POOL_EXECUTOR
-
Constructor Summary
ConstructorDescriptionGetVideoTask
(EventEmitter eventEmitter, String baseURL, HttpRequestConfig httpRequestConfig, String account) GetVideoTask
(EventEmitter eventEmitter, String baseURL, HttpRequestConfig httpRequestConfig, String account, String policy) GetVideoTask
(EventEmitter eventEmitter, String baseURL, Map<String, String> headers, String account, String policy) Deprecated.GetVideoTask
(EventEmitter eventEmitter, String baseURL, Map<String, String> headers, Map<String, String> queryParameters, String account, String policy) Deprecated.Please useGetVideoTask(EventEmitter, String, HttpRequestConfig, String, String)
instead. -
Method Summary
Modifier and TypeMethodDescriptionprotected URI
protected com.brightcove.player.edge.EdgeTaskResult<Video>
doInBackground
(URI... params) void
getById
(String videoId, VideoListener videoListener) void
getByReferenceId
(String referenceId, VideoListener videoListener) protected void
onPostExecute
(com.brightcove.player.edge.EdgeTaskResult<Video> result) protected Video
processData
(org.json.JSONObject data) Parses the JSON object to return the typed Object.Methods inherited from class android.os.AsyncTask
cancel, execute, execute, executeOnExecutor, get, get, getStatus, isCancelled, onCancelled, onCancelled, onPreExecute, onProgressUpdate, publishProgress
-
Field Details
-
ECONOMICS
- See Also:
-
AD_SUPPORTED
- See Also:
-
FREE
- See Also:
-
eventEmitter
-
baseURL
-
account
-
uri
-
httpService
-
errors
-
httpRequestConfig
-
-
Constructor Details
-
GetVideoTask
@Deprecated public GetVideoTask(@NonNull EventEmitter eventEmitter, @NonNull String baseURL, @Nullable Map<String, String> headers, @NonNull String account, @NonNull String policy) Deprecated.Please useGetVideoTask(EventEmitter, String, HttpRequestConfig, String, String)
instead. -
GetVideoTask
@Deprecated public GetVideoTask(@NonNull EventEmitter eventEmitter, @NonNull String baseURL, @Nullable Map<String, String> headers, @Nullable Map<String, String> queryParameters, @NonNull String account, @NonNull String policy) Deprecated.Please useGetVideoTask(EventEmitter, String, HttpRequestConfig, String, String)
instead. -
GetVideoTask
public GetVideoTask(@NonNull EventEmitter eventEmitter, @NonNull String baseURL, @NonNull HttpRequestConfig httpRequestConfig, @NonNull String account, @NonNull String policy) -
GetVideoTask
public GetVideoTask(@NonNull EventEmitter eventEmitter, @NonNull String baseURL, @NonNull HttpRequestConfig httpRequestConfig, @NonNull String account)
-
-
Method Details
-
getById
-
getByReferenceId
-
onPostExecute
-
processData
protected Video processData(@NonNull org.json.JSONObject data) throws org.json.JSONException, VideoParseException Parses the JSON object to return the typed Object. This method is called in theAsyncTask.doInBackground(URI...)
method.- Parameters:
data
- the Json object returned from the response- Returns:
- the typed object
- Throws:
org.json.JSONException
VideoParseException
-
doInBackground
-
createURI
Creates aURI
object with thebaseURL
passed in the constructor and appends the String params to the Url. For example: baseURL/param1/param2.../paramNIf the
HttpRequestConfig.getQueryParameters()
map is not empty, it will also append its values to the url. For example: baseUrl?key1=value1&key2=value2&...&keyN=valueN baseUrl/param1/param2.../paramN?key1=value1&key2=value2&...&keyN=valueN- Parameters:
params
- the params- Returns:
- the uri
- Throws:
URISyntaxException
- the uri syntax exception
-
GetVideoTask(EventEmitter, String, HttpRequestConfig, String, String)
instead.