### Install and Build SSAI Sample App with Gradle
Source: https://github.com/brightcoveos/android-player-samples/blob/master/brightcove-exoplayer/BasicSsaiSampleApp/README.md
Command to clean, build, and install the BasicSsaiSampleApp to a connected Android device. Assumes the Gradle wrapper is available and the command is executed from the top-level sample app directory.
```bash
gradlew :BasicSsaiSampleApp:clean :BasicSsaiSampleApp:build :BasicSsaiSampleApp:installDebug
```
--------------------------------
### Play Button XML Example
Source: https://github.com/brightcoveos/android-player-samples/blob/master/brightcove-player-controls/CustomizedControlsSampleApp/README.md
This XML snippet shows how to define a play button within a BrightcoveControlBar. It uses a predefined ID '@id/play', applies the 'BorderlessButton' style, and sets initial visibility to 'gone'. The button's text is defined using a string resource.
```xml
```
--------------------------------
### BrightcoveControlBar Layout Example
Source: https://github.com/brightcoveos/android-player-samples/blob/master/brightcove-player-controls/CustomizedControlsSampleApp/README.md
This XML snippet demonstrates the basic structure of a BrightcoveControlBar layout. It includes necessary namespaces, attributes, and a style for proper integration with the Brightcove Native SDK for Android. The layout is set to match parent width and wrap content height, with padding and a background color.
```xml
...
```
--------------------------------
### BrightcoveSeekBar XML Example
Source: https://github.com/brightcoveos/android-player-samples/blob/master/brightcove-player-controls/CustomizedControlsSampleApp/README.md
This XML snippet illustrates the configuration of a BrightcoveSeekBar for the media controller. It includes the custom BrightcoveSeekBar tag with its ID, style, layout parameters, and specific attributes for marker color and width. The seek bar is configured to take available space with `layout_weight` and has its visibility set to 'gone' initially.
```xml
```
--------------------------------
### Stop Gradle Daemon Command
Source: https://github.com/brightcoveos/android-player-samples/blob/master/release-notes.txt
Command to stop the Gradle daemon after building sample apps. The daemon runs in the background and continues to consume resources after the build completes.
```bash
./gradlew --stop
```
--------------------------------
### Java: Custom Media Controller Initialization
Source: https://github.com/brightcoveos/android-player-samples/blob/master/brightcove-player-controls/CustomizedControlsSampleApp/README.md
Demonstrates how to initialize and set a custom media controller for the Brightcove Android Player. This involves creating an instance of BrightcoveMediaController with a custom layout and assigning it to the BrightcoveVideoView.
```java
BrightcoveMediaController mediaController = new BrightcoveMediaController(brightcoveVideoView, R.layout.my_media_controller);
brightcoveVideoView.setMediaController(mediaController);
```
--------------------------------
### SSAI Plugin Integration in Android Activity
Source: https://github.com/brightcoveos/android-player-samples/blob/master/brightcove-exoplayer/BasicSsaiSampleApp/README.md
Java code snippet demonstrating how to initialize the SSAI component, attach a companion ad container, and process an SSAI URL within an Android Activity's onCreate method. Requires the Brightcove video view and an SSAI URL.
```java
plugin = new SSAIComponent(this, brightcoveVideoView);
View view = findViewById(R.id.ad_frame);
if (view != null && view instanceof ViewGroup) {
plugin.addCompanionContainer((ViewGroup) view);
}
plugin.processVideo(ssaiAdDataUrl);
```
--------------------------------
### ID3 Metadata Change (Java/Kotlin)
Source: https://github.com/brightcoveos/android-player-samples/blob/master/release-notes.txt
Illustrates the change in the ID3 metadata callback signature in the ExoPlayerVideoDisplayComponent. Previously, it returned a map; now it returns a List. The TxxxMetadata type is no longer supported.
```java
/**
* Previous callback signature:
* void onId3Metadata(Map metadata);
*/
/**
* New callback signature:
* void onId3Metadata(List id3Frames);
*/
// Example of how to process the new callback:
@Override
public void onId3Metadata(List id3Frames) {
for (Id3Frame frame : id3Frames) {
if (frame instanceof TxxxInfoFrame) {
TxxxInfoFrame txxxFrame = (TxxxInfoFrame) frame;
Log.d(TAG, String.format("Txxx metadata: %s - %s", txxxFrame.getDescription(), txxxFrame.getValue()));
}
}
}
```
--------------------------------
### Override Brightcove Native Player Version (Gradle)
Source: https://github.com/brightcoveos/android-player-samples/blob/master/README.md
Allows overriding the default build behavior to use a specific version of the Brightcove Android Native Player. This is achieved by creating a `.gradle/gradle.properties` file in the user's home directory and setting the `anpVersion` property.
```properties
anpVersion=YOUR_DESIRED_VERSION
```
--------------------------------
### Android TV Leanback Launcher Intent Filter
Source: https://github.com/brightcoveos/android-player-samples/blob/master/release-notes.txt
An XML snippet for an Android Manifest's intent filter. This is required for an application to appear on the Android TV home screen, enabling Android TV support.
```xml
```
--------------------------------
### Define BrightcovePlayerOptions style for Android TV
Source: https://github.com/brightcoveos/android-player-samples/blob/master/brightcove-player-controls/StyledControlsSampleApp/README.md
This XML snippet demonstrates how to define a custom style for BrightcovePlayerOptions in an Android TV environment. It inherits default values from BrightcovePlayerOptionsDefault and allows for further customization.
```xml
```
--------------------------------
### Keep Brightcove SDK Classes
Source: https://github.com/brightcoveos/android-player-samples/blob/master/proguard-project.txt
This ProGuard rule ensures that all public classes and members within the `com.brightcove.player` package and its subpackages are kept during the shrinking and obfuscation process. This is crucial for the correct functioning of the Brightcove Android SDK.
```proguard
-keep public class com.brightcove.player.** {
public *;
}
-keepclassmembers public class com.brightcove.player.** {
public *;
}
-keepclasseswithmembers public class com.brightcove.player.** {
public *;
}
```
--------------------------------
### Suppress Warnings for Brightcove and Third-Party Libraries
Source: https://github.com/brightcoveos/android-player-samples/blob/master/proguard-project.txt
These ProGuard rules are used to suppress warnings for specific classes related to Android's closed captioning hidden APIs, as well as classes from Google, FreeWheel, Adobe, Square, Requery, and Android media. This prevents unnecessary warnings during the ProGuard processing for the Brightcove Android Player Samples.
```proguard
-dontwarn com.brightcove.player.display.VideoDisplayComponent
-dontwarn com.brightcove.player.view.BrightcoveClosedCaptioningSurfaceView
-dontwarn com.brightcove.player.view.BrightcoveClosedCaptioningSurfaceView$1
-dontwarn com.google.**
-dontwarn tv.freewheel.**
-dontwarn com.adobe.**
-dontwarn com.squareup.okhttp.**
-dontwarn io.requery.android.**
-dontwarn android.media.**
-dontwarn io.requery.android.QueryLoader
-dontwarn io.requery.android.QueryRecyclerAdapter
```
--------------------------------
### Style Brightcove Media Controller in Android XML
Source: https://github.com/brightcoveos/android-player-samples/blob/master/brightcove-player-controls/StyledControlsSampleApp/README.md
This snippet shows how to override default Brightcove media controller styles in `styles.xml` to customize its appearance and functionality. It inherits from `BrightcoveControlBarDefault` and modifies specific attributes like hiding buttons.
```xml
```
--------------------------------
### Android XML: Media Controller Spacer View
Source: https://github.com/brightcoveos/android-player-samples/blob/master/brightcove-player-controls/CustomizedControlsSampleApp/README.md
Defines a spacer view in XML for the Brightcove Android Player's media controller. This view is used to manage the layout space between controller buttons. It's typically set to gone by default and becomes visible based on video content availability.
```xml
```
--------------------------------
### Keep Google and Brightcove IAB Classes
Source: https://github.com/brightcoveos/android-player-samples/blob/master/proguard-project.txt
These ProGuard rules are designed to keep all members of classes within the `com.brightcove.iab` and `com.google` packages, including nested classes and interfaces. This is important for the integration with Google's advertising services (like AdMob) and Brightcove's Interactive Advertising Bureau functionalities.
```proguard
-keep class com.brightcove.iab.** { *; }
-keep class com.google.** { *; }
-keep interface com.google.** { *; }
-keep class com.google.ads.interactivemedia.** { *; }
-keep interface com.google.ads.interactivemedia.** { *; }
```
=== COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.