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
FieldsModifier and TypeFieldDescriptionprotected Stringstatic final Stringprotected Stringstatic final Stringprotected EventEmitterstatic final Stringprotected final HttpRequestConfigprotected HttpServiceprotected URIFields inherited from class android.os.AsyncTask
SERIAL_EXECUTOR, THREAD_POOL_EXECUTOR -
Constructor Summary
ConstructorsConstructorDescriptionGetVideoTask(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 URIprotected com.brightcove.player.edge.EdgeTaskResult<Video>doInBackground(URI... params) voidgetById(String videoId, VideoListener videoListener) voidgetByReferenceId(String referenceId, VideoListener videoListener) protected voidonPostExecute(com.brightcove.player.edge.EdgeTaskResult<Video> result) protected VideoprocessData(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.JSONExceptionVideoParseException
-
doInBackground
-
createURI
Creates aURIobject with thebaseURLpassed 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.