### Initialize BrightcoveTextureVideoView Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/player/view/BrightcoveTextureVideoView Performs initial setup for the BrightcoveTextureVideoView with the provided context. ```Java protected void init(android.content.Context context) ``` -------------------------------- ### FreeWheelController Setup and Configuration Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/freewheel/controller/FreeWheelController Demonstrates how to initialize and configure the FreeWheelController for ad playback. ```APIDOC ## FreeWheelController Setup ### Description This section details the sample setup and configuration for the `FreeWheelController`. ### Method N/A (Example Code) ### Endpoint N/A (Example Code) ### Parameters N/A (Example Code) ### Request Example ```java freeWheelController = new FreeWheelController(this, bcVideoView, eventEmitter); //configure your own IAdManager or supply connection information freeWheelController.setAdURL("http://demo.v.fwmrm.net/"); freeWheelController.setAdNetworkId(90750); freeWheelController.setProfile("fw_tutorial_android"); freeWheelController.setSiteSectionId("fw_tutorial_android"); freeWheelController.enable(); ``` ### Response #### Success Response (200) N/A (Example Code) #### Response Example N/A (Example Code) ``` -------------------------------- ### BrightcovePlayerActivity.onCreate() Method - Java Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/player/appcompat/BrightcovePlayerActivity Called when the activity is first created. This method is where you can perform initial setup of the activity, including inflating the layout. ```java protected void onCreate(android.os.Bundle savedInstanceState) ``` -------------------------------- ### Get AdBreak absolute start position Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/ssai/ad/AdBreak Retrieves the absolute start position of the AdBreak in milliseconds. This method is crucial for timing ad playback accurately. ```java public long getAbsoluteStartPosition() ``` -------------------------------- ### Get AdBreak duration Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/ssai/ad/AdBreak Calculates and returns the total duration of the AdBreak in milliseconds. This is derived from the start and end positions. ```java public long getDuration() ``` -------------------------------- ### Get Video Height - BrightcoveTextureVideoView Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/player/view/BrightcoveTextureVideoView Gets the current height of the video being played. ```Java public int getVideoHeight() ``` -------------------------------- ### Instantiate and Setup ThumbnailComponent Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/player/mediacontroller/ThumbnailComponent Demonstrates how to create an instance of ThumbnailComponent and initialize its preview thumbnail scrubbing functionality. This is the primary code for integrating the thumbnail preview feature. ```java ThumbnailComponent thumbnailComponent = new ThumbnailComponent(brightcoveVideoView); thumbnailComponent.setupPreviewThumbnailController(); ... ``` -------------------------------- ### Get Video Width - BrightcoveTextureVideoView Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/player/view/BrightcoveTextureVideoView Gets the current width of the video being played. ```Java public int getVideoWidth() ``` -------------------------------- ### FreeWheelController Method for Context Setup (Java) Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/freewheel/controller/FreeWheelController The `setupContext` method is used to create a new AdContext, which is necessary for enabling ad playback, particularly when replaying a video. ```Java public void setupContext() ``` -------------------------------- ### RenderThread Class Documentation Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/player/video360/RenderThread Documentation for the RenderThread class, which handles the setup and management of 360 video rendering. ```APIDOC ## Class: RenderThread ### Description RenderThread waits for the SphericalVideoPlayer's SurfaceTexture to be available then sets up a GL rendering context, creates an external texture for the video decoder to output to, asks for vsync updates from the Choreographer, attaches a frame available listener the video decode SurfaceTexture, then begins video playback. Drag events from the main thread will be forwarded to the RenderThread's message queue so that it may update the view state. SphericalSceneRenderer draws the 360 video scene each frame using the latest latched video texture frame. ### Class Hierarchy `java.lang.Object` -> `java.lang.Thread` -> `android.os.HandlerThread` -> `com.brightcove.player.video360.RenderThread` ### Implemented Interfaces `java.lang.Runnable` ### Nested Class Summary - `java.lang.Thread.State` - `java.lang.Thread.UncaughtExceptionHandler` ### Field Summary - `static float FOVY` - `static int MSG_FRAME_AVAILABLE` - `static int MSG_ON_SCROLL` - `static int MSG_SET_POSITION` - `static int MSG_SURFACE_AVAILABLE` - `static int MSG_SURFACE_CHANGED` - `static int MSG_SURFACE_DESTROYED` - `static int MSG_VSYNC` - `static float Z_FAR` - `static float Z_NEAR` ### Constructor Summary - `RenderThread(RenderView renderView)`: Constructs a new 360 video renderer. ### Method Summary - `android.view.Surface getVideoDecodeSurface()`: Creates a new `Surface` that will be used to render the 360 video. - `boolean isVrMode()`: Checks whether the renderer is currently configured to render the video in Google VR mode. - `void notifySurfaceAvailable(java.lang.Object surface, int width, int height)`: Notifies the video render thread that the surface is available. - `void notifySurfaceChanged(android.view.Surface surface, int width, int height)`: Notifies the video render thread that the surface has changed. - `void notifySurfaceDestroyed()`: Notifies the video render thread that the surface has been destroyed. - `void setOnFrameAvailableListener(android.graphics.SurfaceTexture.OnFrameAvailableListener onFrameAvailableListener)` - `void setVrMode(boolean vrMode)`: Sets whether the renderer should render the video in Google VR mode. - `void start()`: Starts the render thread to run asynchronously. ### Field Detail - #### MSG_SURFACE_AVAILABLE `public static final int MSG_SURFACE_AVAILABLE` - #### MSG_SURFACE_CHANGED `public static final int MSG_SURFACE_CHANGED` - #### MSG_SURFACE_DESTROYED `public static final int MSG_SURFACE_DESTROYED` - #### MSG_FRAME_AVAILABLE `public static final int MSG_FRAME_AVAILABLE` - #### MSG_VSYNC `public static final int MSG_VSYNC` - #### MSG_ON_SCROLL `public static final int MSG_ON_SCROLL` - #### MSG_SET_POSITION `public static final int MSG_SET_POSITION` - #### FOVY `public static final float FOVY` ``` -------------------------------- ### Get Identity Condition Methods Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/player/analytics/AbstractAnalyticsEvent Implements methods to retrieve logical conditions for identifying an entity. This includes a method to get a condition based on a provided key and one to get a general identity condition. ```java public io.requery.query.LogicalCondition,?> getIdentityCondition() // Gets a LogicalCondition that can be used to match this entity by it's unique identifier. ``` ```java public io.requery.query.LogicalCondition,?> getIdentityCondition(java.lang.Long key) // Gets a LogicalCondition that can be used to match an entity by it's unique identifier. // Parameters: key - the unique identifier of the entity. // Returns: the logical condition. ``` -------------------------------- ### Video Constructor Examples Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/player/model/Video Demonstrates the constructors for the `Video` class, showing how to initialize a `Video` object with properties, source collections, and cue points. These constructors are crucial for creating and populating `Video` instances. ```java Video(java.util.Map properties) Video(java.util.Map properties, java.util.Set sourceCollectionSet) Video(java.util.Map properties, java.util.Set sourceCollectionSet, java.util.List cuePoints) ``` -------------------------------- ### Get Measured Video Height - BrightcoveTextureVideoView Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/player/view/BrightcoveTextureVideoView Gets the height of the video as measured by the RenderView on the screen. ```Java public int getMeasuredVideoHeight() ``` -------------------------------- ### BrightcovePlayer Activity Documentation Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/player/view/package-summary Documentation for the BrightcovePlayer activity, providing basic lifecycle and full-screen support. ```APIDOC ## BrightcovePlayer ### Description An Activity with basic life cycle and full screen support. ### Class BrightcovePlayer ### Parameters None ### Request Example None ### Response None ``` -------------------------------- ### BrightcoveMediaController Initialization Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/player/mediacontroller/BrightcoveMediaController Method for initializing the BrightcoveMediaController instance. ```APIDOC ## init ### Description Initialize the BrightcoveMediaController instance. ### Method protected void ### Endpoint N/A (Method within a class) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **videoView** (BaseVideoView) - The given Brightcove video view object. - **layout** (int) - The given layout resource identifier. ### Request Example ```java // Example usage (typically called internally during initialization) // mediaController.init(baseVideoView, R.layout.default_controls); ``` ### Response #### Success Response (void) This method does not return a value. #### Response Example N/A ``` -------------------------------- ### Get Measured Video Width - BrightcoveTextureVideoView Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/player/view/BrightcoveTextureVideoView Gets the width of the video as measured by the RenderView on the screen. ```Java public int getMeasuredVideoWidth() ``` -------------------------------- ### GET /uri Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/player/network/HttpService Performs an HTTP GET request and parses the response body as a JSONObject. ```APIDOC ## GET /uri ### Description Performs an HTTP GET request assuming that the response body will contain a valid JSON document. The JSON document is parsed and returned as a JSONObject. ### Method GET ### Endpoint /uri ### Parameters #### Query Parameters - **uri** (java.net.URI) - Required - The request URI - **headers** (java.util.Map) - Required - The request headers ### Request Example ```json { "uri": "example.com/api/data", "headers": { "Authorization": "Bearer YOUR_TOKEN" } } ``` ### Response #### Success Response (200) - **JSONObject** - A JSONObject created by parsing the HTTP response, or null if the response is empty #### Response Example ```json { "key": "value" } ``` ### Throws - `java.io.IOException` - `org.json.JSONException` ``` -------------------------------- ### LifecycleUtil Lifecycle Method Detail - activityOnStart Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/player/util/LifecycleUtil Detailed documentation for the `activityOnStart` method within LifecycleUtil, indicating when an Activity becomes visible to the user. ```java public void activityOnStart() ``` -------------------------------- ### Get Video Projection Format Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/player/model/Video Gets the video's projection format. Defaults to Video.ProjectionFormat.NORMAL. ```java @NonNull public Video.ProjectionFormat getProjectionFormat() ``` -------------------------------- ### ThumbnailComponent setupPreviewThumbnailController Method Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/player/mediacontroller/ThumbnailComponent Explains the setupPreviewThumbnailController method, which finalizes the component's setup for preview thumbnail scrubbing. This method must be called on the UI thread as it creates view components. ```java public void setupPreviewThumbnailController() { // ... method implementation ... } ``` -------------------------------- ### On Ad Started Callback Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/ima/GoogleIMAVideoAdPlayer Callback method invoked when an ad begins playback. It receives the `AdAsset` that has started. Specified by `AdPlayer.Listener`. ```java public void onAdStarted(@NonNull AdAsset ad) ``` -------------------------------- ### ThumbnailComponent - setupPreviewThumbnailController Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/player/mediacontroller/ThumbnailComponent Finishes setting up the component to enable Preview Thumbnail scrubbing. This method creates and adds a new BrightcoveMediaController with Preview Thumbnail support to the Video View and must be called from the UI thread. ```APIDOC ## void setupPreviewThumbnailController() ### Description Finish setting up the component to support Preview Thumbnail scrubbing. As part of the setup, a new `BrightcoveMediaController` instance with Preview Thumbnail support is created and is automatically added to the Video View. Because this method creates View components, it MUST be called from the UI thread. ### Method POST ### Endpoint N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example ```java thumbnailComponent.setupPreviewThumbnailController(); ``` ### Response #### Success Response (200) N/A #### Response Example N/A ``` -------------------------------- ### Renderer Configuration Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/player/model/package-summary Documentation for configuration settings related to the media renderer. ```APIDOC ## Classes ### `RendererConfig` **Description**: This class contains configuration values used on a Renderer Builder. ### `RendererConfig.Builder` **Description**: Builder for `RendererConfig`. ``` -------------------------------- ### RenderThread Start Method Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/player/video360/RenderThread Starts the RenderThread to run asynchronously. This method initiates the background rendering process. ```java public void start() Starts the render thread to run asynchronously. ``` -------------------------------- ### Get Thumbnail URI Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/player/model/Video Gets the thumbnail image source. It prioritizes HTTPS sources from Video.Fields.THUMBNAIL_SOURCES. If unavailable, it falls back to Video.Fields.THUMBNAIL. ```java @Nullable public java.net.URI getThumbnail() ``` -------------------------------- ### MediaPresentationDescriptionLoadable Constructor Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/player/offline/MediaPresentationDescriptionLoadable Initializes a new MediaPresentationDescriptionLoadable instance. This constructor requires an MPD parser, the URL of the manifest to download, and the directory where the manifest should be saved. All parameters are marked as non-null. ```java public MediaPresentationDescriptionLoadable(@NonNull com.google.android.exoplayer2.source.dash.manifest.DashManifestParser mpdParser, @NonNull java.lang.String manifestUrl, @NonNull java.io.File downloadDirectory) ``` -------------------------------- ### Get Total Length Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/ssai/timeline/TimelineManager Gets the total length of the media, including content and ads, in milliseconds. This provides the overall duration of the playback session. ```java public long getTotalLength() ``` -------------------------------- ### BaseStore Constructor and Database Setup Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/player/store/BaseStore Constructs a new instance of BaseStore. This constructor requires the application context, entity model, database name, and schema version. It's used to initialize the database store. ```java public BaseStore(@NonNull android.content.Context context, io.requery.meta.EntityModel model, @NonNull java.lang.String name, int version) ``` -------------------------------- ### Configuration and Bitrate Settings Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/player/offline/MediaDownloadable Methods for setting configuration bundles and video bitrate caps. ```APIDOC ## Configuration and Bitrate Settings ### Description Allows setting configuration bundles and controlling the video bitrate for downloads. ### Methods - `setConfigurationBundle(android.os.Bundle bundle)`: Sets a configuration bundle for the download. * **Parameters**: - `bundle` (android.os.Bundle) - The configuration bundle to set. - `setVideoBitrate(int videoBitrate)`: Sets the video bitrate cap to determine which rendition will be downloaded. * **Parameters**: - `videoBitrate` (int) - The maximum video bitrate allowed for downloads. ``` -------------------------------- ### Get Download ID Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/player/model/Video Gets the globally unique identifier for the local copy of this video, if one exists. Returns null if there is no local copy. ```java @Nullable public java.util.UUID getDownloadId() ``` -------------------------------- ### FreeWheelController Constructor Summary Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/freewheel/controller/FreeWheelController Details the available constructors for initializing the FreeWheelController. ```APIDOC ## FreeWheelController Constructor Summary ### Description This section details the constructors available for creating an instance of the `FreeWheelController`. ### Method N/A (Constructors) ### Endpoint N/A (Constructors) ### Parameters N/A (Constructors) ### Request Example N/A (Constructors) ### Response #### Success Response (200) N/A (Constructors) #### Response Example N/A (Constructors) ## Constructor Detail ### `FreeWheelController` - **Parameters**: - `activity` (android.app.Activity) - Required - `frameLayout` (android.widget.FrameLayout) - Required - `emitter` (EventEmitter) - Required ### `FreeWheelController` - **Parameters**: - `activity` (android.app.Activity) - Required - `frameLayout` (android.widget.FrameLayout) - Required - `emitter` (EventEmitter) - Required - `manager` (tv.freewheel.ad.interfaces.IAdManager) - Required ### `FreeWheelController` (Deprecated) - **Parameters**: - `activity` (android.app.Activity) - Required - `surfaceView` (android.view.SurfaceView) - Required - `emitter` (EventEmitter) - Required ### `FreeWheelController` (Deprecated) - **Parameters**: - `activity` (android.app.Activity) - Required - `surfaceView` (android.view.SurfaceView) - Required - `emitter` (EventEmitter) - Required - `manager` (tv.freewheel.ad.interfaces.IAdManager) - Required ``` -------------------------------- ### Get Thumbnail Sources Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/player/model/Video Gets the list of available thumbnail image sources from the Video.Fields.THUMBNAIL_SOURCES property. Returns an empty list if none are available. ```java @NonNull public java.util.Set getThumbnailSources() ``` -------------------------------- ### BrightcoveSeekBarController Constructors Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/player/mediacontroller/BrightcoveSeekBarController Details on how to instantiate the BrightcoveSeekBarController. ```APIDOC ## BrightcoveSeekBarController Constructor ### Description Builds the seek bar controller. ### Method CONSTRUCTOR ### Endpoint N/A ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```java BrightcoveSeekBarController controller = new BrightcoveSeekBarController(seekBar, videoView); ``` ### Response #### Success Response (200) N/A #### Response Example N/A ``` -------------------------------- ### Get Poster Sources Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/player/model/Video Gets the list of available poster image sources from the Video.Fields.POSTER_SOURCES property. Returns an empty list if none are available. ```java @NonNull public java.util.Set getPosterSources() ``` -------------------------------- ### Get Poster Image URI Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/player/model/Video Gets the poster image source. It prioritizes HTTPS sources from Video.Fields.POSTER_SOURCES. If unavailable, it falls back to Video.Fields.STILL_IMAGE_URI. ```java @Nullable public java.net.URI getPosterImage() ``` -------------------------------- ### BrightcoveControlBar Constructors Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/player/mediacontroller/BrightcoveControlBar Provides information on the different ways to instantiate a BrightcoveControlBar. ```APIDOC ## BrightcoveControlBar Constructors ### Description Constructors for initializing the BrightcoveControlBar. ### Method CONSTRUCTORS ### Endpoint N/A ### Parameters None ### Request Example None ### Response None ### Constructor Summary Constructors and their descriptions: - `BrightcoveControlBar(android.content.Context context)`: Constructor. - `BrightcoveControlBar(android.content.Context context, android.util.AttributeSet attrs)`: Constructor. - `BrightcoveControlBar(android.content.Context context, android.util.AttributeSet attrs, int defStyle)`: Constructor. ``` -------------------------------- ### BaseStore Constructor Detail (1/2) Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/player/store/BaseStore Provides details for the first BaseStore constructor. It initializes a new instance with the application context, entity model, and schema version. ```java protected BaseStore(@NonNull android.content.Context context, @NonNull io.requery.meta.EntityModel model, int version) ``` -------------------------------- ### HttpService GET Request API Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/player/network/HttpService Provides methods for performing HTTP GET requests, including support for different response types and custom headers. ```APIDOC ## GET Request Methods ### Description Performs HTTP GET requests with various response handling capabilities. ### Method GET ### Endpoint N/A (These are client-side methods) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```java // Example for doGetRequest(URI uri) URI url = new URI("http://example.com/api/data"); String response = httpService.doGetRequest(url); // Example for doGetRequest(URI uri, Map headers) Map headers = new HashMap<>(); headers.put("Authorization", "Bearer YOUR_TOKEN"); String responseWithHeaders = httpService.doGetRequest(url, headers); // Example for doImageGetRequest(URI uri) Bitmap image = httpService.doImageGetRequest(url); // Example for doImageGetRequest(URI uri, int maxWidth, int maxHeight) Bitmap scaledImage = httpService.doImageGetRequest(url, 200, 150); // Example for doJSONGetRequest(URI uri) JSONObject jsonResponse = httpService.doJSONGetRequest(url); ``` ### Response #### Success Response (200) - **String** - The response body for general GET requests. - **Bitmap** - The decoded image response for image GET requests. - **JSONObject** - The parsed JSON response for JSON GET requests. #### Response Example ```json // For doGetRequest and doJSONGetRequest { "message": "Success" } // For doImageGetRequest (Bitmap response not representable in JSON) ``` ``` -------------------------------- ### BrightcoveMediaController Constructors Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/player/mediacontroller/BrightcoveMediaController Constructors for initializing the BrightcoveMediaController. ```APIDOC ## BrightcoveMediaController(BaseVideoView videoView) ### Description Builds a default media controller for a given video view. It will default to using the default layout supplied by Brightcove. ### Method public ### Endpoint N/A (Constructor) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **videoView** (BaseVideoView) - The Brightcove video view object which will be attached to this media controller. ### Request Example ```java // Example usage (assuming 'baseVideoView' is an instance of BaseVideoView) // BrightcoveMediaController mediaController = new BrightcoveMediaController(baseVideoView); ``` ### Response #### Success Response (BrightcoveMediaController) An instance of BrightcoveMediaController. #### Response Example N/A ``` ```APIDOC ## BrightcoveMediaController(BaseVideoView videoView, int layout) ### Description Builds a media controller for a given video view and layout. ### Method public ### Endpoint N/A (Constructor) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **videoView** (BaseVideoView) - The given Brightcove video view object. - **layout** (int) - The given layout resource identifier. ### Request Example ```java // Example usage (assuming 'baseVideoView' is an instance of BaseVideoView and 'R.layout.custom_controls' is a valid layout resource) // BrightcoveMediaController mediaController = new BrightcoveMediaController(baseVideoView, R.layout.custom_controls); ``` ### Response #### Success Response (BrightcoveMediaController) An instance of BrightcoveMediaController. #### Response Example N/A ``` -------------------------------- ### Get OfflineStoreManager Instance - Java Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/player/edge/OfflineStoreManager Gets a reference to the single, globally accessible instance of the OfflineStoreManager. This method requires an Android application context to initialize. ```java public static OfflineStoreManager getInstance(@NonNull android.content.Context context) ``` -------------------------------- ### Ticker Interface - start Method (with long position) Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/ssai/timeline/ticker/Ticker Starts the ticker with a specified absolute position value. This is a default method in the Ticker interface. ```java default void start(long position) ``` -------------------------------- ### BaseStore Constructor Detail (2/2) Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/player/store/BaseStore Provides details for the second BaseStore constructor. It initializes a new instance with the application context, entity model, database name, and schema version. ```java protected BaseStore(@NonNull android.content.Context context, @NonNull io.requery.meta.EntityModel model, java.lang.String name, int version) ``` -------------------------------- ### BrightcoveExoPlayerVideoView Constructors Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/player/view/BrightcoveExoPlayerVideoView Provides the different ways to instantiate a BrightcoveExoPlayerVideoView. These constructors accept a Context, and optionally an AttributeSet and a default style, allowing for flexible initialization in various Android environments. ```java public BrightcoveExoPlayerVideoView(android.content.Context context) ``` ```java public BrightcoveExoPlayerVideoView(android.content.Context context, android.util.AttributeSet attributeSet) ``` ```java public BrightcoveExoPlayerVideoView(android.content.Context context, android.util.AttributeSet attributeSet, int defStyle) ``` -------------------------------- ### Ticker Interface - start Method (with Position Enum) Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/ssai/timeline/ticker/Ticker Starts the ticker with a specified Ticker.Position enum value. This method is part of the Ticker interface for controlling playback. ```java void start(@NonNull Ticker.Position position) ``` -------------------------------- ### PulseComponent Implementation Example Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/pulse/PulseComponent Example of how to implement and use the PulseComponent to display ads from the Pulse ad service. It includes setting up a listener for ad events and handling click-through actions. ```java @ListensFor(events={"willChangeVideo","progress","pause","didPause","completed","play","didPlay","seekTo","adBreakStarted","adBreakCompleted"}) @Emits(events={"adError","adBreakCompleted","willResumeContent","play"}) public class PulseComponent extends AbstractComponent ``` ```java mPulseComponent = new PulseComponent("YourPulseHostUrl", getEventEmitter(), brightcoveVideoView); mPulseComponent.setListener(new PulseComponent.Listener() { @Override public PulseSession onCreatePulseSession(@NonNull String pulseHost, @NonNull Video video, @NonNull ContentMetadata contentMetadata, @NonNull RequestSettings requestSettings) { Pulse.setPulseHost(pulseHost, null, null); return Pulse.createSession(contentMetadata, requestSettings); } @Override public void onOpenClickthrough(@NonNull PulseVideoAd pulseVideoAd) { Intent intent = new Intent(Intent.ACTION_VIEW).setData(Uri.parse(pulseVideoAd.getClickthroughURL().toString())); startActivity(intent); pulseVideoAd.adClickThroughTriggered(); } }); ``` -------------------------------- ### ExoAdPlayer Creation Methods Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/player/ads/ExoAdPlayer These methods are used to create instances of ExoAdPlayer, allowing for different configurations based on the provided view and settings. ```APIDOC ## Methods for Creating ExoAdPlayer ### `create` ```java public static ExoAdPlayer create(@NonNull BaseVideoView baseVideoView) ``` Creates an ExoAdPlayer and adds a PlayerView in the BaseVideoView. Note: This method must be called from the UI thread. **Parameters:** * `baseVideoView` (BaseVideoView) - where the Ad will be rendered. **Returns:** * `ExoAdPlayer` - a new instance of an ExoAdPlayer. --- ```java public static ExoAdPlayer create(@NonNull BaseVideoView baseVideoView, @Nullable AdPlayer.AdPlayerSettings adPlayerSettings) ``` Creates an ExoAdPlayer and adds a PlayerView in the BaseVideoView. Note: This method must be called from the UI thread. **Parameters:** * `baseVideoView` (BaseVideoView) - where the Ad will be rendered. * `adPlayerSettings` (AdPlayer.AdPlayerSettings) - configuration object for the ad player **Returns:** * `ExoAdPlayer` - a new instance of an ExoAdPlayer. --- ```java public static ExoAdPlayer create(@NonNull ViewGroup viewGroup, @NonNull EventEmitter eventEmitter, @Nullable AdPlayer.AdPlayerSettings adPlayerSettings) ``` Creates an ExoAdPlayer and adds a PlayerView in the provided `ViewGroup`. Note: This method must be called from the UI thread. **Parameters:** * `viewGroup` (ViewGroup) - where the Ad will be rendered. * `eventEmitter` (EventEmitter) - the event emitter * `adPlayerSettings` (AdPlayer.AdPlayerSettings) - configuration object for the ad player **Returns:** * `ExoAdPlayer` - a new instance of an ExoAdPlayer. ``` -------------------------------- ### Perform JSON GET Request - Java Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/player/network/HttpService Executes an HTTP GET request expecting a JSON response. The response body is parsed into a JSONObject. This method can throw IOExceptions or JSONExceptions. ```java public org.json.JSONObject doJSONGetRequest(java.net.URI uri) throws java.io.IOException, org.json.JSONException ``` -------------------------------- ### Perform HTTP GET Request (Java) Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/player/network/HttpService Executes an HTTP GET request to the specified URI. Overloaded versions allow for including custom headers. The response is returned as a String. ```java public java.lang.String doGetRequest(java.net.URI uri) public java.lang.String doGetRequest(java.net.URI uri, java.util.Map headers) ``` -------------------------------- ### FreeWheelController Initialization Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/freewheel/controller/FreeWheelController Constructors for initializing the FreeWheelController. ```APIDOC ## FreeWheelController Constructors ### Description Initializes a new instance of the FreeWheelController. ### Method - FreeWheelController(activity, surfaceView, emitter) - FreeWheelController(activity, surfaceView, emitter, manager) ### Parameters #### FreeWheelController(activity, surfaceView, emitter) - **activity** (android.app.Activity) - The Android activity context. - **surfaceView** (android.view.SurfaceView) - The surface view for video playback. - **emitter** (EventEmitter) - The event emitter for communication. #### FreeWheelController(activity, surfaceView, emitter, manager) - **activity** (android.app.Activity) - The Android activity context. - **surfaceView** (android.view.SurfaceView) - The surface view for video playback. - **emitter** (EventEmitter) - The event emitter for communication. - **manager** (tv.freewheel.ad.interfaces.IAdManager) - The ad manager instance. ``` -------------------------------- ### BrightcovePlayerActivity.onStart() Method - Java Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/player/appcompat/BrightcovePlayerActivity Called when the activity is becoming visible to the user. This is a good place to begin animations or other actions that require the user to see the UI. ```java protected void onStart() ``` -------------------------------- ### Java Method: getAbsoluteStartPosition Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/ssai/ad/Ad Retrieves the absolute start position of the ad. This method is part of the Ad interface and returns a long value representing the start time in milliseconds. ```java long getAbsoluteStartPosition() Returns: the absoluteStartPosition of the ad. ``` -------------------------------- ### Get and Set Surface for Rendering - Android Java Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/player/view/BrightcoveTextureView Provides methods to get the Surface object associated with the texture view for rendering and to set a Surface for rendering. These are crucial for video playback operations. ```java public android.view.Surface getSurface() Specified by: getSurface in interface RenderView ``` ```java public void setSurface(android.view.Surface surface) Specified by: setSurface in interface RenderView ``` -------------------------------- ### ThumbnailComponent - Constructor Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/player/mediacontroller/ThumbnailComponent Initializes a new instance of the ThumbnailComponent with the provided BaseVideoView. ```APIDOC ## ThumbnailComponent Constructor ### Description Creates a new ThumbnailComponent instance with the `BaseVideoView`. ### Method CONSTRUCTOR ### Endpoint N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example ```java ThumbnailComponent thumbnailComponent = new ThumbnailComponent(baseVideoView); ``` ### Response N/A #### Success Response (200) N/A #### Response Example N/A ``` -------------------------------- ### getIdentityCondition() Method - Get Default Match Condition Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/player/store/IdentifiableEntity Gets a LogicalCondition that can be used to match this entity by its unique identifier without providing a specific key. This is useful for constructing general query conditions. ```java io.requery.query.LogicalCondition,?> getIdentityCondition() Gets a `LogicalCondition` that can be used to match this entity by it's unique identifier. Returns: the logical condition. ``` -------------------------------- ### Constructor Summary Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/player/model/Video Details of constructors available for creating Video objects, with variations for properties, source collections, and cue points. ```APIDOC ## Constructor Summary | Constructor and Description | |---| | `Video(java.util.Map properties)` | | `Video(java.util.Map properties, java.util.Set sourceCollectionSet)` - Initializes a new Video with a predefined metadata properties collection and a predefined Set of SourceCollection objects. | | `Video(java.util.Map properties, java.util.Set sourceCollectionSet, java.util.List cuePoints)` - Initializes a new Video with a predefined metadata properties collection, a predefined Set of SourceCollection objects, and a list of cue points. | ``` -------------------------------- ### Perform HTTP Image GET Request (Java) Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/player/network/HttpService Performs an HTTP GET request expecting a bitmap image file in the response. Supports specifying maximum dimensions for the retrieved image. ```java public android.graphics.Bitmap doImageGetRequest(java.net.URI uri) public android.graphics.Bitmap doImageGetRequest(java.net.URI uri, int maxWidth, int maxHeight) ``` -------------------------------- ### LifecycleUtil Lifecycle Method Detail - fragmentOnStart Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/player/util/LifecycleUtil Detailed documentation for the `fragmentOnStart` method within LifecycleUtil, indicating when a Fragment becomes visible to the user. ```java public void fragmentOnStart() ``` -------------------------------- ### ThumbnailView Constructors Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/player/mediacontroller/ThumbnailView Details on how to instantiate a ThumbnailView with different parameters. ```APIDOC ## ThumbnailView Constructors ### Constructor Detail #### ThumbnailView ``` public ThumbnailView(@NonNull android.content.Context context) ``` Instantiate a ThumbnailView view Parameters: `context` - the Android context #### ThumbnailView ``` public ThumbnailView(@NonNull android.content.Context context, @Nullable android.util.AttributeSet attrs) ``` Instantiate a ThumbnailView view Parameters: `context` - the Android context `attrs` - The attributes of the XML tag that is inflating the view. This value may be null. #### ThumbnailView ``` public ThumbnailView(@NonNull android.content.Context context, @Nullable android.util.AttributeSet attrs, int defStyleAttr) ``` Instantiate a ThumbnailView view Parameters: `context` - the Android context `attrs` - The attributes of the XML tag that is inflating the view. This value may be null. `defStyleAttr` - An attribute in the current theme that contains a reference to a style resource that supplies default values for the view. Can be 0 to not look for defaults. ``` -------------------------------- ### Perform Image GET Request with Dimensions - Java Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/player/network/HttpService Performs an HTTP GET request for an image and scales it to specified maximum dimensions. The decoded response is returned as a Bitmap. It handles potential IOExceptions. ```java public android.graphics.Bitmap doImageGetRequest(java.net.URI uri, int maxWidth, int maxHeight) throws java.io.IOException ``` -------------------------------- ### Constructor Detail Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/player/offline/MediaDownloadable Details of the MediaDownloadable constructor. ```APIDOC ## Constructor Detail ### MediaDownloadable - `public MediaDownloadable(@NonNull android.content.Context context, @NonNull Video video, @Nullable MediaDownloadable.DownloadEventListener downloadEventListener, @Nullable RequestConfig requestConfig)` * **Parameters**: - `context` (android.content.Context) - The application context. - `video` (Video) - The video object. - `downloadEventListener` (MediaDownloadable.DownloadEventListener) - Listener for download events. - `requestConfig` (RequestConfig) - Configuration for the download request. ``` -------------------------------- ### Perform HTTP GET Request with Headers - Java Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/player/network/HttpService Executes an HTTP GET request to the specified URI with custom headers and returns the response body as a String. It handles potential IOExceptions during the request. ```java public java.lang.String doGetRequest(java.net.URI uri, java.util.Map headers) throws java.io.IOException ``` -------------------------------- ### Perform HTTP GET Request - Java Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/player/network/HttpService Executes an HTTP GET request to the specified URI and returns the response body as a String. This method can throw an IOException if a network error occurs during the request. ```java public java.lang.String doGetRequest(java.net.URI uri) throws java.io.IOException ``` -------------------------------- ### Cue Points and Metadata Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/player/model/package-summary Documentation for classes related to cue points and general metadata objects. ```APIDOC ## Classes ### `CuePoint` **Description**: Represents the data of a single cue point. **Enums**: `CuePointType`, `PositionType` ### `MetadataObject` **Description**: Provides a common metadata collection for any data model objects using a generic, dynamic set of metadata properties. ### `SourceAwareMetadataObject` **Description**: A metadata object aware of its associated source. ``` -------------------------------- ### BrightcoveExoPlayerVideoView Methods Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/player/view/BrightcoveExoPlayerVideoView Lists the instance methods available for the BrightcoveExoPlayerVideoView class. ```APIDOC ## BrightcoveExoPlayerVideoView Methods ### Description Instance methods for controlling and interacting with the BrightcoveExoPlayerVideoView. ### Method Summary Lists concrete instance methods. | Modifier and Type | Method and Description | |---|---| | [Method Signature] | [Description of the method's functionality] | *Note: The provided text only contains a placeholder for method documentation and does not list specific methods. Please refer to the official SDK documentation for a complete list of methods.* ``` -------------------------------- ### Brightcove Android SDK: Seek Bar Dragging Start Constant Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/player/event/EventType Defines the constant for starting the seek bar dragging operation. This constant is used to initiate the seek bar dragging process. ```java public static final java.lang.String SEEKBAR_DRAGGING_START ``` -------------------------------- ### LifecycleUtil Lifecycle Method Detail - onCreate Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/player/util/LifecycleUtil Detailed documentation for the `onCreate` method within LifecycleUtil, explaining its purpose during the Activity's creation process. ```java public void onCreate(android.os.Bundle savedInstanceState, android.app.Activity activity) ``` -------------------------------- ### Perform Image GET Request - Java Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/player/network/HttpService Fetches an image via an HTTP GET request to the specified URI. The response content is decoded into an Android Bitmap object. An IOException may occur if the request fails. ```java public android.graphics.Bitmap doImageGetRequest(java.net.URI uri) throws java.io.IOException ``` -------------------------------- ### BrightcovePluginManager Methods Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/player/management/BrightcovePluginManager Documentation for various methods within the BrightcovePluginManager class, including initialization, crashlytics logging, and retrieving plugin information. ```APIDOC ## BrightcovePluginManager Methods ### initializeListeners #### Description Initializes the listeners for the plugin manager. #### Method protected void #### Endpoint N/A ### checkForCrashlytics #### Description Checks for crashlytics-related functionalities. #### Method protected void #### Endpoint N/A ### generateCrashlyticsMethods #### Description Generates methods related to crashlytics. #### Method protected void #### Endpoint N/A ### crashlyticsLog #### Description Logs a message for crashlytics. #### Parameters * **message** (java.lang.String) - Required - The message to log. #### Method public void #### Endpoint N/A ### getCommitIdentifier #### Description Deprecated. Please use `BuildConfig.COMMIT_ID` instead. Returns the SHA checksum of the changes recorded in the (Git) repository. #### Returns * **java.lang.String** - the commit identifier. #### Method public java.lang.String #### Endpoint N/A ### getReleaseIdentifier #### Description Deprecated. Please use `BuildConfig.RELEASE_ID` instead. Returns the build version of the SDK. #### Returns * **java.lang.String** - the build version. #### Method public java.lang.String #### Endpoint N/A ### getPluginsInUse #### Description Retrieves a list of plugins currently in use. #### Returns * **java.util.List** - A list of plugin names. #### Method public java.util.List #### Endpoint N/A ``` -------------------------------- ### Perform HTTP JSON GET Request (Java) Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/player/network/HttpService Executes an HTTP GET request, assuming the response body is a valid JSON document. It can optionally include custom headers. The parsed JSON is returned as a JSONObject. ```java public org.json.JSONObject doJSONGetRequest(java.net.URI uri) public org.json.JSONObject doJSONGetRequest(java.net.URI uri, java.util.Map headers) ``` -------------------------------- ### BrightcoveDashManifestParser Constructor Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/player/dash/BrightcoveDashManifestParser Initializes a new instance of the BrightcoveDashManifestParser class. ```APIDOC ## BrightcoveDashManifestParser ### Description Initializes a new instance of the BrightcoveDashManifestParser class. ### Method public ### Endpoint N/A ### Parameters None ### Request Example ```json {} ``` ### Response #### Success Response (200) N/A #### Response Example ```json {} ``` ``` -------------------------------- ### Get Visibility State - Java Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/player/mediacontroller/buttons/SeekButtonController Gets the current visibility state of the seek button. This method, overriding AbstractButtonController, returns the visibility status (View.GONE, View.INVISIBLE, or View.VISIBLE) based on video type and DVR capabilities. ```java public int getVisibilityState() ``` -------------------------------- ### BrightcoveTextureVideoView Constructors Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/player/view/BrightcoveTextureVideoView Provides information on how to instantiate the BrightcoveTextureVideoView with different constructor overloads. ```APIDOC ## BrightcoveTextureVideoView Constructors ### Description Constructors for initializing the `BrightcoveTextureVideoView`. ### Method `constructor` ### Endpoint N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example N/A ### Response #### Success Response (200) N/A #### Response Example N/A ### Constructors - `BrightcoveTextureVideoView(android.content.Context context)`: Constructor with a context. - `BrightcoveTextureVideoView(android.content.Context context, android.util.AttributeSet attributeSet)`: Constructor with context and attribute set. - `BrightcoveTextureVideoView(android.content.Context context, android.util.AttributeSet attributeSet, int defStyle)`: Constructor with context, attribute set, and default style. ``` -------------------------------- ### Perform JSON GET Request (Incomplete Signature) - Java Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/player/network/HttpService This appears to be an incomplete signature for performing an HTTP GET request expecting a JSON response. It likely intends to parse the response body into a JSONObject, similar to the other doJSONGetRequest method. ```java public org.json.JSONObject doJSONGetRequest(java.net.URI uri, ``` -------------------------------- ### Get Current Ad Information Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/ima/GoogleIMAComponent Methods to retrieve information about the current ad playback state. This includes getting the current ad index, the list of current ad requests, and the video ad player or ad display container. ```java public int getCurrentAdIndex() ``` ```java @NonNull public java.util.List getCurrentAdsRequests() ``` ```java @Nullable public GoogleIMAVideoAdPlayer getVideoAdPlayer() ``` ```java @Nullable public com.google.ads.interactivemedia.v3.api.AdDisplayContainer getAdDisplayContainer() ``` -------------------------------- ### HttpService and HttpRequestConfig API Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/player/network/package-summary Documentation for the HttpService class and HttpRequestConfig for handling HTTP requests and configurations. ```APIDOC ## Class HttpService ### Description HttpService provides the basic tools to construct URLs properly, and issue HTTP requests, especially those that yield a JSON response. ## Class HttpRequestConfig ### Description An immutable configuration class whose values are used as part of an HTTP request, either as query parameters or as headers. ### Class HttpRequestConfig.Builder ### Description The HttpRequestConfig Builder. ``` -------------------------------- ### Player Components and Utilities Source: https://docs.brightcove.com/android-sdk/javadoc/overview-tree Documentation for various player components, managers, and related utilities in the Brightcove Android SDK. ```APIDOC ## Player Components and Utilities ### Description This section outlines core player components, management classes, and helper classes for player functionality. ### Classes - **com.brightcove.player.pictureinpicture.PictureInPictureManager**: Manages Picture-in-Picture mode for the player. - **com.brightcove.player.network.PlayerBandwidthMeter**: Measures network bandwidth for the player. - **com.brightcove.player.model.Playlist.Fields**: Defines fields for playlists. - **com.brightcove.player.mediacontroller.animator.PreviewAnimator**: Animates preview elements. - **com.brightcove.player.mediacontroller.animator.PreviewAnimatorImpl**: Implementation of the PreviewAnimator. - **com.brightcove.player.captioning.PreviewThumbnailFormat**: Defines the format for preview thumbnails. - **com.brightcove.player.Sdk**: Represents the Brightcove SDK entry point. - **com.brightcove.player.mediacontroller.ScreenSizeThumbnailFormatSelector**: Selects thumbnail formats based on screen size. - **com.brightcove.player.model.RendererConfig**: Configuration for renderers. - **com.brightcove.player.model.RendererConfig.Builder**: Builder for RendererConfig. - **com.brightcove.player.video360.RotationMonitor**: Monitors rotation for 360-degree video. - **com.brightcove.player.event.RegisteringEventEmitter**: An event emitter that allows registering event listeners. ``` -------------------------------- ### AdPodListener - onAdPodStarted Method (Java) Source: https://docs.brightcove.com/android-sdk/javadoc/com/brightcove/ssai/ad/AdPodListener Callback method invoked when an ad pod has started. This method receives the AdPod object representing the started ad pod. Implementations can use this to initiate actions related to ad playback. ```java void onAdPodStarted(AdPod adPod) ```