diff --git a/README.md b/README.md index ed0d85c0..1777fa61 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,8 @@ The Issues tab is now closed. To report any problem or provide feedback, please * [Basic Cast Sample App with Brightcove Cast Receiver](https://github.com/BrightcoveOS/android-player-samples/tree/master/brightcove-exoplayer/BasicCastBrightcoveReceiverSampleApp): This adds Google Chromecast support to the Brightcove Native Player SDK for Android, and demonstrates integration with the upated Brightcove Cast Receiver app v2.0. Please refer to the Release Notes in the v6.16.0 release of the Brightcove Native Player SDK for Android for more information. +* [Bumper Sample App](https://github.com/BrightcoveOS/android-player-samples/tree/master/brightcove-exoplayer/BumperSampleApp): This app shows how to setup the Brightcove ExoPlayer to play using a bumper video. + * [FreeWheel Sample App](https://github.com/BrightcoveOS/android-player-samples/tree/master/brightcove-exoplayer/FreeWheelSampleApp): This app shows how to use the Brightcove ExoPlayer with FreeWheel ads. * [FreeWheel Widevine Modular Sample App](https://github.com/BrightcoveOS/android-player-samples/tree/master/brightcove-exoplayer/FreeWheelWidevineModularSampleApp): This app shows how to use the Brightcove ExoPlayer with FreeWheel ads and Widevine Modular content. @@ -41,6 +43,8 @@ Note that in order to enable the FreeWheel sample apps, you must independently o * [Basic SSAI Sample App](https://github.com/BrightcoveOS/android-player-samples/tree/master/brightcove-exoplayer/BasicSsaiSampleApp): This app shows how to configure an app to use the Brightcove Native Player for Android SSAI Plugin to play a video. +* [Basic SSAI PAL Sample App](https://github.com/BrightcoveOS/android-player-samples/tree/master/brightcove-exoplayer/BasicSSAIPALSampleApp): This app shows how to configure an app to use the Brightcove Native Player for Android SSAI Plugin to play a video and the PAL SDK from Google for Ad tracking. + * [ID3 Tags Sample App](https://github.com/BrightcoveOS/android-player-samples/tree/master/brightcove-exoplayer/ID3SampleApp): This app shows how to use the Brightcove ExoPlayer with ID3 tags. * [HLS Live Sample App](https://github.com/BrightcoveOS/android-player-samples/tree/master/brightcove-exoplayer/LiveSampleApp): This app shows how to use the Brightcove ExoPlayer with HLS Live and Live DVR content. Please note that a Live/DVR URL is not supplied with this sample app, and must be supplied by the developer. @@ -57,6 +61,11 @@ Note that in order to enable the FreeWheel sample apps, you must independently o * [Audio Only Sample App](https://github.com/KEAMCRF/android-player-samples/tree/AudioOnlySample/brightcove-exoplayer-kotlin/AudioOnlySampleApp): This app shows how to setup the Brightcove ExoPlayer with audio-only assets. +* [Basic SSAI PAL Sample App](https://github.com/BrightcoveOS/android-player-samples/tree/master/brightcove-exoplayer-kotlin/BasicSSAIPALSampleApp): This app shows how to configure an app to use the Brightcove Native Player for Android SSAI Plugin to play a video and the PAL SDK from Google for Ad tracking. + +* [Bumper Sample App](https://github.com/BrightcoveOS/android-player-samples/tree/master/brightcove-exoplayer-kotlin/BumperSampleApp): This app shows how to setup the Brightcove ExoPlayer to play using a bumper video. + + ## Installing the sample apps Currently, all of the sample app projects must be installed together as a bundle. Individual sample app projects also have specific dependencies. For those specific dependencies, see the individual project descriptions above for details. diff --git a/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/.gitignore b/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/.gitignore new file mode 100644 index 00000000..796b96d1 --- /dev/null +++ b/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/.gitignore @@ -0,0 +1 @@ +/build diff --git a/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/build.gradle b/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/build.gradle new file mode 100644 index 00000000..aa8e4e69 --- /dev/null +++ b/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/build.gradle @@ -0,0 +1,44 @@ +plugins { + id 'com.android.application' + id 'org.jetbrains.kotlin.android' +} + +android { + namespace 'com.brightcove.ssai.pal.sample' + compileSdk ANDROID_COMPILE_SDK_VERSION + + defaultConfig { + applicationId "com.brightcove.ssai.pal.sample" + minSdk ANDROID_MIN_SDK_VERSION + targetSdk ANDROID_TARGET_SDK_VERSION + versionCode 1 + versionName "1.0" + + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + } + + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 + } + kotlinOptions { + jvmTarget = JavaVersion.VERSION_11.toString() + } + buildFeatures { + viewBinding true + } +} + +dependencies { + implementation "com.brightcove.player:android-appcompat-plugin:${anpVersion}" + implementation "androidx.constraintlayout:constraintlayout:${ANDROIDX_CONSTRAINT_LAYOUT}" + implementation "androidx.appcompat:appcompat:${ANDROIDX_APPCOMPAT}" + implementation "com.google.android.material:material:${ANDROID_MATERIAL}" + implementation "com.google.android.gms:play-services-pal:${GOOGLE_IMA_PAL_VERSION}" +} diff --git a/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/proguard-rules.pro b/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/proguard-rules.pro new file mode 100644 index 00000000..f1b42451 --- /dev/null +++ b/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile diff --git a/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/AndroidManifest.xml b/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/AndroidManifest.xml new file mode 100644 index 00000000..20f1baa0 --- /dev/null +++ b/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/AndroidManifest.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + diff --git a/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/java/com/brightcove/ssai/pal/sample/BasicSsaiPALSampleAppActivity.kt b/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/java/com/brightcove/ssai/pal/sample/BasicSsaiPALSampleAppActivity.kt new file mode 100644 index 00000000..1852d8c9 --- /dev/null +++ b/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/java/com/brightcove/ssai/pal/sample/BasicSsaiPALSampleAppActivity.kt @@ -0,0 +1,225 @@ +package com.brightcove.ssai.pal.sample + +import android.os.Bundle +import android.util.Log +import com.brightcove.player.Sdk +import com.brightcove.player.appcompat.BrightcovePlayerActivity +import com.brightcove.player.edge.Catalog +import com.brightcove.player.edge.VideoListener +import com.brightcove.player.event.Event +import com.brightcove.player.event.EventType +import com.brightcove.player.model.Video +import com.brightcove.player.network.HttpRequestConfig +import com.brightcove.ssai.SSAIComponent +import com.brightcove.ssai.event.SSAIEventType +import com.brightcove.ssai.omid.AdEventType +import com.brightcove.ssai.omid.OpenMeasurementTracker +import com.brightcove.ssai.pal.sample.databinding.ActivityBasicSsaiPalSampleBinding +import com.google.ads.interactivemedia.pal.ConsentSettings +import com.google.ads.interactivemedia.pal.NonceLoader +import com.google.ads.interactivemedia.pal.NonceManager +import com.google.ads.interactivemedia.pal.NonceRequest +import com.iab.omid.library.brightcove.adsession.FriendlyObstructionPurpose + + +class BasicSsaiPALSampleAppActivity : BrightcovePlayerActivity() { + + private var plugin: SSAIComponent? = null + private var tracker: OpenMeasurementTracker? = null + + private var nonceLoader: NonceLoader? = null + private var nonceManager: NonceManager? = null + private var consentSettings: ConsentSettings? = null + private var catalog: Catalog? = null + + private lateinit var binding: ActivityBasicSsaiPalSampleBinding + + override fun onCreate(savedInstanceState: Bundle?) { + // When extending the BrightcovePlayer, we must assign brightcoveVideoView before + // entering the superclass. This allows for some stock video player lifecycle + // management. + binding = ActivityBasicSsaiPalSampleBinding.inflate(layoutInflater) + setContentView(binding.root) + baseVideoView = binding.brightcoveVideoView + super.onCreate(savedInstanceState) + + val eventEmitter = baseVideoView.eventEmitter + + //PAL + // The default value for allowStorage() is false, but can be + // changed once the appropriate consent has been gathered. The + // getConsentToStorage() method is a placeholder for the publisher's own + // method of obtaining user consent, either by integrating with a CMP or + // based on other methods the publisher chooses to handle storage consent. + //boolean isConsentToStorage = getConsentToStorage(); + consentSettings = ConsentSettings.builder().allowStorage(false).build() + + // It is important to instantiate the NonceLoader as early as possible to + // allow it to initialize and preload data for a faster experience when + // loading the NonceManager. A new NonceLoader will need to be instantiated + //if the ConsentSettings change for the user. + + nonceLoader = NonceLoader( this, consentSettings!!) + + generateNonceForAdRequest() + + eventEmitter.on(EventType.PLAY) { sendPlaybackStart() } + + eventEmitter.on(EventType.COMPLETED) { sendPlaybackEnd() } + + eventEmitter.on(SSAIEventType.AD_CLICKED) { sendAdClick() } + + catalog = Catalog.Builder(eventEmitter, getString(R.string.sdk_demo_account)) + .setBaseURL(Catalog.DEFAULT_EDGE_BASE_URL) + .setPolicy(getString(R.string.sdk_demo_policy_key)) + .build() + + // Setup the error event handler for the SSAI plugin. + registerErrorEventHandler() + setupOpenMeasurement() + plugin = SSAIComponent(this, baseVideoView) + + // Set the companion ad container. + plugin?.addCompanionContainer(binding.adFrame) + } + + private fun generateNonceForAdRequest() { + val supportedApiFrameWorksSet: MutableSet = HashSet() + // The values 2, 7, and 9 correspond to player support for + // VPAID 2.0, OMID 1.0, and SIMID 1.1. + supportedApiFrameWorksSet.add(2) + supportedApiFrameWorksSet.add(7) + supportedApiFrameWorksSet.add(9) + + val nonceRequest = NonceRequest.builder() + .descriptionURL("https://example.com/content1") + .iconsSupported(true) + .omidPartnerVersion("6.2.1") + .omidPartnerName("Example Publisher") + .playerType("ExamplePlayerType") + .playerVersion("1.0.0") + .ppid("testPpid") + .sessionId("Sample SID") + .supportedApiFrameworks(supportedApiFrameWorksSet) + .videoPlayerHeight(480) + .videoPlayerWidth(640) + .willAdAutoPlay(true) + .willAdPlayMuted(true) + .build() + + nonceLoader?.loadNonceManager(nonceRequest)?.addOnSuccessListener { manager -> + nonceManager = manager + val nonceString = manager?.nonce + plugin?.setNonce(nonceString) + Log.d("PALSample", "Generated nonce: $nonceString") + // Set the HttpRequestConfig with the Ad Config Id configured in + // your https://studio.brightcove.com account. + val httpRequestConfig = HttpRequestConfig.Builder() + .addQueryParameter( + HttpRequestConfig.KEY_AD_CONFIG_ID, + AD_CONFIG_ID_QUERY_PARAM_VALUE + ) + .build() + + catalog?.findVideoByID( + getString(R.string.sdk_demo_video_id), + httpRequestConfig, + object : VideoListener() { + override fun onVideo(video: Video) { + // The Video Sources will have a VMAP url which will be processed by the SSAI plugin, + // If there is not a VMAP url, or if there are any requesting or parsing error, + // an EventType.ERROR event will be emitted. + plugin?.processVideo(video) + } + }) + }?.addOnFailureListener { error -> + Log.e("PALSample", "Nonce generation failed: " + error.message) + } + } + + private fun sendAdClick() { + if (nonceManager != null) { + nonceManager?.sendAdClick() + Log.d(TAG,"PAL sendAdClick() called" + ) + } + } + + private fun sendPlaybackStart() { + if (nonceManager != null) { + nonceManager?.sendPlaybackStart() + Log.d(TAG,"PAL sendPlaybackStart() called" + ) + } + } + + private fun sendPlaybackEnd() { + if (nonceManager != null) { + nonceManager?.sendPlaybackEnd() + Log.d(TAG,"PAL sendPlaybackEnd() called" + ) + } + } + + override fun onDestroy() { + super.onDestroy() + if (tracker != null && isFinishing) { + tracker?.stop() + } + if (nonceLoader != null) { + nonceLoader!!.release() + } + } + + private fun setupOpenMeasurement() { + binding.omToggle.setOnCheckedChangeListener { _, isChecked: Boolean -> + if (isChecked) { + tracker?.start() + } else { + tracker?.stop() + } + } + + // Initialize the OpenMeasurementTracker + tracker = OpenMeasurementTracker.Factory(PARTNER_NAME, PARTNER_VERSION, baseVideoView).create() + + // NOTE: The ad used in the sample does not have an `AdVerification` element and will not + // send tracking events. You may verify OpenMeasurement via the following listener: + tracker?.addListener(object : OpenMeasurementTracker.Listener { + override fun onEvent(adEventType: AdEventType) { + Log.d(TAG, "onEvent() called with: adEventType = [$adEventType]") + } + + override fun onStartTracking() { + Log.d(TAG, "onStartTracking() called") + } + + override fun onStoppedTracking() { + Log.d(TAG, "onStoppedTracking() called") + } + }) + + // Example to register a view that should be considered as a friendly obstruction + tracker?.addFriendlyObstruction(binding.adFrame, FriendlyObstructionPurpose.OTHER, "Ad frame") + + // Start the tracker, if enabled. + if (binding.omToggle.isChecked) { + tracker?.start() + } + } + + private fun registerErrorEventHandler() { + // Handle the case where the ad data URL has not been supplied to the plugin. + val eventEmitter = baseVideoView.eventEmitter + eventEmitter.on(EventType.ERROR) { event: Event -> + Log.e(TAG, event.type) + } + } + + companion object { + private const val TAG = "MainActivity" + private const val AD_CONFIG_ID_QUERY_PARAM_VALUE = "ba5e4879-77f0-424b-8c98-706ae5ad7eec" + private const val PARTNER_NAME = "dummyVendor" + private val PARTNER_VERSION = Sdk.getVersionName() + } +} diff --git a/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/drawable-hdpi/ic_launcher.png b/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/drawable-hdpi/ic_launcher.png new file mode 100644 index 00000000..0201441b Binary files /dev/null and b/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/drawable-hdpi/ic_launcher.png differ diff --git a/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/drawable-mdpi/ic_launcher.png b/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/drawable-mdpi/ic_launcher.png new file mode 100644 index 00000000..26721fd4 Binary files /dev/null and b/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/drawable-mdpi/ic_launcher.png differ diff --git a/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/drawable-v24/ic_launcher_foreground.xml b/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/drawable-v24/ic_launcher_foreground.xml new file mode 100644 index 00000000..7706ab9e --- /dev/null +++ b/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/drawable-v24/ic_launcher_foreground.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + diff --git a/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/drawable-xhdpi/ic_launcher.png b/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/drawable-xhdpi/ic_launcher.png new file mode 100644 index 00000000..e6c33269 Binary files /dev/null and b/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/drawable-xhdpi/ic_launcher.png differ diff --git a/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/drawable-xxhdpi/ic_launcher.png b/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/drawable-xxhdpi/ic_launcher.png new file mode 100644 index 00000000..0d412f56 Binary files /dev/null and b/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/drawable-xxhdpi/ic_launcher.png differ diff --git a/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/layout/activity_basic_ssai_pal_sample.xml b/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/layout/activity_basic_ssai_pal_sample.xml new file mode 100644 index 00000000..664dda02 --- /dev/null +++ b/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/layout/activity_basic_ssai_pal_sample.xml @@ -0,0 +1,34 @@ + + + + + + + + + diff --git a/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/mipmap-anydpi-v26/ic_launcher.xml new file mode 100644 index 00000000..80b730f3 --- /dev/null +++ b/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml new file mode 100644 index 00000000..80b730f3 --- /dev/null +++ b/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/mipmap-hdpi/ic_launcher.png b/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 00000000..0201441b Binary files /dev/null and b/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/mipmap-hdpi/ic_launcher_foreground.png b/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/mipmap-hdpi/ic_launcher_foreground.png new file mode 100644 index 00000000..88371390 Binary files /dev/null and b/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/mipmap-hdpi/ic_launcher_foreground.png differ diff --git a/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/mipmap-hdpi/ic_launcher_round.png b/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/mipmap-hdpi/ic_launcher_round.png new file mode 100644 index 00000000..1c8bf84c Binary files /dev/null and b/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/mipmap-hdpi/ic_launcher_round.png differ diff --git a/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/mipmap-mdpi/ic_launcher.png b/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 00000000..26721fd4 Binary files /dev/null and b/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/mipmap-mdpi/ic_launcher_foreground.png b/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/mipmap-mdpi/ic_launcher_foreground.png new file mode 100644 index 00000000..6244da88 Binary files /dev/null and b/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/mipmap-mdpi/ic_launcher_foreground.png differ diff --git a/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/mipmap-mdpi/ic_launcher_round.png b/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/mipmap-mdpi/ic_launcher_round.png new file mode 100644 index 00000000..ed5cb6e4 Binary files /dev/null and b/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/mipmap-mdpi/ic_launcher_round.png differ diff --git a/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/mipmap-xhdpi/ic_launcher.png b/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 00000000..e6c33269 Binary files /dev/null and b/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png b/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png new file mode 100644 index 00000000..3e0dbeaa Binary files /dev/null and b/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png differ diff --git a/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/mipmap-xhdpi/ic_launcher_round.png new file mode 100644 index 00000000..7e759e36 Binary files /dev/null and b/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ diff --git a/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/mipmap-xxhdpi/ic_launcher.png b/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 00000000..0d412f56 Binary files /dev/null and b/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png b/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png new file mode 100644 index 00000000..d9d35705 Binary files /dev/null and b/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png differ diff --git a/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/mipmap-xxhdpi/ic_launcher_round.png new file mode 100644 index 00000000..cbab8ab9 Binary files /dev/null and b/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ diff --git a/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 00000000..4fdd094d Binary files /dev/null and b/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png b/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png new file mode 100644 index 00000000..3819f5a4 Binary files /dev/null and b/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png differ diff --git a/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png new file mode 100644 index 00000000..7a534d0f Binary files /dev/null and b/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ diff --git a/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/values-night/themes.xml b/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/values-night/themes.xml new file mode 100644 index 00000000..240ab536 --- /dev/null +++ b/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/values-night/themes.xml @@ -0,0 +1,7 @@ + + + + diff --git a/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/values/colors.xml b/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/values/colors.xml new file mode 100644 index 00000000..98614761 --- /dev/null +++ b/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/values/colors.xml @@ -0,0 +1,7 @@ + + + #03028d + #06eae5 + #FF000000 + #FFFFFFFF + diff --git a/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/values/ic_launcher_background.xml b/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/values/ic_launcher_background.xml new file mode 100644 index 00000000..d828e670 --- /dev/null +++ b/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/values/ic_launcher_background.xml @@ -0,0 +1,4 @@ + + + #06EAE4 + diff --git a/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/values/strings.xml b/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/values/strings.xml new file mode 100644 index 00000000..afce5fef --- /dev/null +++ b/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/values/strings.xml @@ -0,0 +1,13 @@ + + BasicSsaiSampleApp + + + 5420904993001 + + + BCpkADawqM3DwCTPGyMMiG0loem8lXox3utO1lFEP1i-_l1MpjRSVXMTSsa2ToslC129_W6YzwJpXbpbIVRFwf35qYM0pxo2HJK-_SotgmgrkmJTQ-024GkXIelVSY8LOHZzRBtcBU57M6Is + + + 6031901107001 + Open Measurement + diff --git a/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/values/themes.xml b/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/values/themes.xml new file mode 100644 index 00000000..5905909e --- /dev/null +++ b/brightcove-exoplayer-kotlin/BasicSsaiPALSampleApp/src/main/res/values/themes.xml @@ -0,0 +1,7 @@ + + + + diff --git a/brightcove-exoplayer-kotlin/BumperSampleApp/build.gradle b/brightcove-exoplayer-kotlin/BumperSampleApp/build.gradle new file mode 100644 index 00000000..1a0973c9 --- /dev/null +++ b/brightcove-exoplayer-kotlin/BumperSampleApp/build.gradle @@ -0,0 +1,42 @@ +plugins { + id 'com.android.application' + id 'org.jetbrains.kotlin.android' +} + +android { + compileSdk ANDROID_COMPILE_SDK_VERSION + + defaultConfig { + applicationId "com.brightcove.bumper.sample" + minSdk ANDROID_MIN_SDK_VERSION + targetSdk ANDROID_TARGET_SDK_VERSION + versionCode 1 + versionName "1.0" + multiDexEnabled true + } + + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 + } + kotlinOptions { + jvmTarget = JavaVersion.VERSION_11.toString() + } + buildFeatures { + viewBinding true + } +} + +dependencies { + implementation "com.brightcove.player:android-appcompat-plugin:${anpVersion}" + implementation "com.brightcove.player:exoplayer2:${anpVersion}" + implementation "androidx.constraintlayout:constraintlayout:${ANDROIDX_CONSTRAINT_LAYOUT}" + implementation "androidx.appcompat:appcompat:${ANDROIDX_APPCOMPAT}" + implementation "com.google.android.material:material:${ANDROID_MATERIAL}" +} diff --git a/brightcove-exoplayer-kotlin/BumperSampleApp/proguard-rules.pro b/brightcove-exoplayer-kotlin/BumperSampleApp/proguard-rules.pro new file mode 100644 index 00000000..481bb434 --- /dev/null +++ b/brightcove-exoplayer-kotlin/BumperSampleApp/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/AndroidManifest.xml b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/AndroidManifest.xml new file mode 100644 index 00000000..38c6385e --- /dev/null +++ b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/AndroidManifest.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/java/com/brightcove/bumper/sample/BumperSampleActivity.kt b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/java/com/brightcove/bumper/sample/BumperSampleActivity.kt new file mode 100644 index 00000000..df466ff8 --- /dev/null +++ b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/java/com/brightcove/bumper/sample/BumperSampleActivity.kt @@ -0,0 +1,76 @@ +package com.brightcove.bumper.sample + +import android.os.Bundle +import android.util.Log +import com.brightcove.bumper.sample.databinding.ActivityBumperSampleAppBinding +import com.brightcove.player.bumper.BumperComponent +import com.brightcove.player.edge.Catalog +import com.brightcove.player.edge.VideoListener +import com.brightcove.player.event.EventEmitter +import com.brightcove.player.model.Video +import com.brightcove.player.view.BrightcovePlayer + +class BumperSampleActivity : BrightcovePlayer() { + + private lateinit var binding: ActivityBumperSampleAppBinding + + private var bumperComponent: BumperComponent? = null + + private val useSetBumperID = true + + override fun onCreate(savedInstanceState: Bundle?) { + + // When extending the BrightcovePlayer, we must assign brightcoveVideoView before + // entering the superclass. This allows for some stock video player lifecycle + // management. + binding = ActivityBumperSampleAppBinding.inflate(layoutInflater) + setContentView(binding.root) + brightcoveVideoView = binding.brightcoveVideoView + super.onCreate(savedInstanceState) + + + // Get the event emitter from the SDK and create a catalog request to fetch a video from the + // Brightcove Edge service, given a video id, an account id and a policy key. + val eventEmitter: EventEmitter = brightcoveVideoView.eventEmitter + val account = getString(R.string.sdk_demo_account) + + val catalog = Catalog.Builder(eventEmitter, account) + .setBaseURL(Catalog.DEFAULT_EDGE_BASE_URL) + .setPolicy(getString(R.string.sdk_demo_policy)) + .build() + + + //Building the instance of the bumper component, providing the existing videoView and catalog. + bumperComponent = BumperComponent.Builder(brightcoveVideoView, catalog).build() + + //Initializing the bumper. + bumperComponent?.init() + + catalog.findVideoByID(getString(R.string.sdk_demo_videoId), object : VideoListener() { + // Add the video found to the queue with add(). + override fun onVideo(video: Video) { + // Showcasing both options to set the bumper id manually or obtaining it from the + // video object properties + if (useSetBumperID) { + //Manually Setting our own bumper ID + bumperComponent?.setVideoBumperID(getString(R.string.sdk_demo_bumper_videoId)) + } else { + //Obtaining the bumper id from the video custom fields + val customFields = + video.properties[Video.Fields.CUSTOM_FIELDS] as Map<*, *>? + if ((customFields != null && customFields.isNotEmpty()) && + (customFields.containsKey("bumper_id")) + ) { + bumperComponent?.setVideoBumperID(customFields["bumper_id"] as String?) + } + } + Log.v(TAG, "onVideo: video = $video") + //Adding the video + brightcoveVideoView.add(video) + //Autostart Playback + brightcoveVideoView.start() + } + }) + + } +} \ No newline at end of file diff --git a/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/drawable-hdpi/ic_launcher.png b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/drawable-hdpi/ic_launcher.png new file mode 100644 index 00000000..0201441b Binary files /dev/null and b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/drawable-hdpi/ic_launcher.png differ diff --git a/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/drawable-mdpi/ic_launcher.png b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/drawable-mdpi/ic_launcher.png new file mode 100644 index 00000000..26721fd4 Binary files /dev/null and b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/drawable-mdpi/ic_launcher.png differ diff --git a/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/drawable-v24/ic_launcher_foreground.xml b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/drawable-v24/ic_launcher_foreground.xml new file mode 100644 index 00000000..2b068d11 --- /dev/null +++ b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/drawable-v24/ic_launcher_foreground.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/drawable-xhdpi/ic_launcher.png b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/drawable-xhdpi/ic_launcher.png new file mode 100644 index 00000000..e6c33269 Binary files /dev/null and b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/drawable-xhdpi/ic_launcher.png differ diff --git a/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/drawable-xhdpi/tv_banner.png b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/drawable-xhdpi/tv_banner.png new file mode 100644 index 00000000..87ddfdeb Binary files /dev/null and b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/drawable-xhdpi/tv_banner.png differ diff --git a/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/drawable-xxhdpi/ic_launcher.png b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/drawable-xxhdpi/ic_launcher.png new file mode 100644 index 00000000..0d412f56 Binary files /dev/null and b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/drawable-xxhdpi/ic_launcher.png differ diff --git a/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/drawable/ic_github_white_24dp.xml b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/drawable/ic_github_white_24dp.xml new file mode 100644 index 00000000..fa01ad70 --- /dev/null +++ b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/drawable/ic_github_white_24dp.xml @@ -0,0 +1,9 @@ + + + \ No newline at end of file diff --git a/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/layout/activity_bumper_sample_app.xml b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/layout/activity_bumper_sample_app.xml new file mode 100644 index 00000000..2a6394f1 --- /dev/null +++ b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/layout/activity_bumper_sample_app.xml @@ -0,0 +1,18 @@ + + + + + + \ No newline at end of file diff --git a/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/mipmap-anydpi-v26/ic_launcher.xml new file mode 100644 index 00000000..036d09bc --- /dev/null +++ b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml new file mode 100644 index 00000000..036d09bc --- /dev/null +++ b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/mipmap-hdpi/ic_launcher.png b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 00000000..0201441b Binary files /dev/null and b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/mipmap-hdpi/ic_launcher_foreground.png b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/mipmap-hdpi/ic_launcher_foreground.png new file mode 100644 index 00000000..88371390 Binary files /dev/null and b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/mipmap-hdpi/ic_launcher_foreground.png differ diff --git a/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/mipmap-hdpi/ic_launcher_round.png b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/mipmap-hdpi/ic_launcher_round.png new file mode 100644 index 00000000..1c8bf84c Binary files /dev/null and b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/mipmap-hdpi/ic_launcher_round.png differ diff --git a/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/mipmap-mdpi/ic_launcher.png b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 00000000..26721fd4 Binary files /dev/null and b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/mipmap-mdpi/ic_launcher_foreground.png b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/mipmap-mdpi/ic_launcher_foreground.png new file mode 100644 index 00000000..6244da88 Binary files /dev/null and b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/mipmap-mdpi/ic_launcher_foreground.png differ diff --git a/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/mipmap-mdpi/ic_launcher_round.png b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/mipmap-mdpi/ic_launcher_round.png new file mode 100644 index 00000000..ed5cb6e4 Binary files /dev/null and b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/mipmap-mdpi/ic_launcher_round.png differ diff --git a/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/mipmap-xhdpi/ic_launcher.png b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 00000000..e6c33269 Binary files /dev/null and b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png new file mode 100644 index 00000000..3e0dbeaa Binary files /dev/null and b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png differ diff --git a/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/mipmap-xhdpi/ic_launcher_round.png new file mode 100644 index 00000000..7e759e36 Binary files /dev/null and b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ diff --git a/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/mipmap-xxhdpi/ic_launcher.png b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 00000000..0d412f56 Binary files /dev/null and b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png new file mode 100644 index 00000000..d9d35705 Binary files /dev/null and b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png differ diff --git a/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/mipmap-xxhdpi/ic_launcher_round.png new file mode 100644 index 00000000..cbab8ab9 Binary files /dev/null and b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ diff --git a/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 00000000..4fdd094d Binary files /dev/null and b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png new file mode 100644 index 00000000..3819f5a4 Binary files /dev/null and b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png differ diff --git a/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png new file mode 100644 index 00000000..7a534d0f Binary files /dev/null and b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ diff --git a/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/raw/loading.json b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/raw/loading.json new file mode 100644 index 00000000..37db72e8 --- /dev/null +++ b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/raw/loading.json @@ -0,0 +1 @@ +{"v":"5.7.6","fr":30,"ip":0,"op":60,"w":24,"h":24,"nm":"Loader top","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Path 9957","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":180,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":0,"s":[7.224,11.633,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":28,"s":[7.224,9.133,0],"to":[0,0,0],"ti":[0,0,0]},{"t":59,"s":[7.224,11.633,0]}],"ix":2,"l":2},"a":{"a":0,"k":[0.546,1.228,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0.301,0],[0,-0.301],[0,0],[-0.301,0],[0,0.301],[0,0]],"o":[[-0.301,0],[0,0],[0,0.301],[0.301,0],[0,0],[0,-0.301]],"v":[[0.546,0],[0,0.546],[0,1.91],[0.546,2.456],[1.091,1.91],[1.091,0.546]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"op","nm":"Offset Paths 1","a":{"a":0,"k":1.5,"ix":1},"lj":1,"ml":{"a":0,"k":4,"ix":3},"ix":3,"mn":"ADBE Vector Filter - Offset","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path 9957 Stroke","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0.301,0],[0,-0.301],[0,0],[-0.301,0],[0,0.301],[0,0]],"o":[[-0.301,0],[0,0],[0,0.301],[0.301,0],[0,0],[0,-0.301]],"v":[[0.546,0],[0,0.546],[0,1.91],[0.546,2.456],[1.091,1.91],[1.091,0.546]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.458823529412,0.78431372549,0.682352941176,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path 9957 Fill","np":2,"cix":2,"bm":0,"ix":2,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":60,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"Path 9956","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":180,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":0,"s":[8.816,11.633,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":28,"s":[8.816,12.883,0],"to":[0,0,0],"ti":[0,0,0]},{"t":59,"s":[8.816,11.633,0]}],"ix":2,"l":2},"a":{"a":0,"k":[0.546,3.275,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0.301,0],[0,-0.301],[0,0],[-0.302,0],[0,0.301],[0,0]],"o":[[-0.302,0],[0,0],[0,0.301],[0.301,0],[0,0],[0,-0.301]],"v":[[0.546,0],[0,0.546],[0,6.004],[0.546,6.55],[1.091,6.004],[1.091,0.546]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"op","nm":"Offset Paths 1","a":{"a":0,"k":1.5,"ix":1},"lj":1,"ml":{"a":0,"k":4,"ix":3},"ix":3,"mn":"ADBE Vector Filter - Offset","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path 9956 Stroke","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0.301,0],[0,-0.301],[0,0],[-0.302,0],[0,0.301],[0,0]],"o":[[-0.302,0],[0,0],[0,0.301],[0.301,0],[0,0],[0,-0.301]],"v":[[0.546,0],[0,0.546],[0,6.004],[0.546,6.55],[1.091,6.004],[1.091,0.546]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.458823529412,0.78431372549,0.682352941176,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path 9956 Fill","np":2,"cix":2,"bm":0,"ix":2,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":60,"st":0,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"Path 9955","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":180,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":0,"s":[10.408,12.377,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":28,"s":[10.408,11.127,0],"to":[0,0,0],"ti":[0,0,0]},{"t":59,"s":[10.408,12.377,0]}],"ix":2,"l":2},"a":{"a":0,"k":[0.546,5.731,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0.302,0],[0,-0.325],[0,0],[-0.301,0],[0,0.325],[0,0]],"o":[[-0.301,0],[0,0],[0,0.325],[0.302,0],[0,0],[0,-0.325]],"v":[[0.546,0],[0,0.588],[0,10.875],[0.546,11.463],[1.091,10.875],[1.091,0.588]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"op","nm":"Offset Paths 1","a":{"a":0,"k":1.5,"ix":1},"lj":1,"ml":{"a":0,"k":4,"ix":3},"ix":3,"mn":"ADBE Vector Filter - Offset","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path 9955 Stroke","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0.302,0],[0,-0.325],[0,0],[-0.301,0],[0,0.325],[0,0]],"o":[[-0.301,0],[0,0],[0,0.325],[0.302,0],[0,0],[0,-0.325]],"v":[[0.546,0],[0,0.588],[0,10.875],[0.546,11.463],[1.091,10.875],[1.091,0.588]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.458823529412,0.78431372549,0.682352941176,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path 9955 Fill","np":2,"cix":2,"bm":0,"ix":2,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":60,"st":0,"bm":0},{"ddd":0,"ind":4,"ty":4,"nm":"Path 9954","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":180,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":0,"s":[12,12.128,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":28,"s":[12,14.628,0],"to":[0,0,0],"ti":[0,0,0]},{"t":59,"s":[12,12.128,0]}],"ix":2,"l":2},"a":{"a":0,"k":[0.546,3.957,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0.301,0],[0,-0.302],[0,0],[-0.301,0],[0,0.301],[0,0]],"o":[[-0.301,0],[0,0],[0,0.301],[0.301,0],[0,0],[0,-0.302]],"v":[[0.546,0],[0,0.546],[0,7.368],[0.546,7.914],[1.091,7.368],[1.091,0.546]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"op","nm":"Offset Paths 1","a":{"a":0,"k":1.5,"ix":1},"lj":1,"ml":{"a":0,"k":4,"ix":3},"ix":3,"mn":"ADBE Vector Filter - Offset","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path 9954 Stroke","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0.301,0],[0,-0.302],[0,0],[-0.301,0],[0,0.301],[0,0]],"o":[[-0.301,0],[0,0],[0,0.301],[0.301,0],[0,0],[0,-0.302]],"v":[[0.546,0],[0,0.546],[0,7.368],[0.546,7.914],[1.091,7.368],[1.091,0.546]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.458823529412,0.78431372549,0.682352941176,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path 9954 Fill","np":2,"cix":2,"bm":0,"ix":2,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":60,"st":0,"bm":0},{"ddd":0,"ind":5,"ty":4,"nm":"Path 9953","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":180,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":0,"s":[13.592,11.633,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":28,"s":[13.592,10.383,0],"to":[0,0,0],"ti":[0,0,0]},{"t":59,"s":[13.592,11.633,0]}],"ix":2,"l":2},"a":{"a":0,"k":[0.546,2.592,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0.301,0],[0,-0.301],[0,0],[-0.301,0],[0,0.301],[0,0]],"o":[[-0.301,0],[0,0],[0,0.301],[0.301,0],[0,0],[0,-0.301]],"v":[[0.546,0],[0,0.546],[0,4.639],[0.546,5.185],[1.092,4.639],[1.092,0.546]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"op","nm":"Offset Paths 1","a":{"a":0,"k":1.5,"ix":1},"lj":1,"ml":{"a":0,"k":4,"ix":3},"ix":3,"mn":"ADBE Vector Filter - Offset","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path 9953 Stroke","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0.301,0],[0,-0.301],[0,0],[-0.301,0],[0,0.301],[0,0]],"o":[[-0.301,0],[0,0],[0,0.301],[0.301,0],[0,0],[0,-0.301]],"v":[[0.546,0],[0,0.546],[0,4.639],[0.546,5.185],[1.092,4.639],[1.092,0.546]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.458823529412,0.78431372549,0.682352941176,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path 9953 Fill","np":2,"cix":2,"bm":0,"ix":2,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":60,"st":0,"bm":0},{"ddd":0,"ind":6,"ty":4,"nm":"Path 9952","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":180,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":0,"s":[15.184,11.633,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":28,"s":[15.184,12.883,0],"to":[0,0,0],"ti":[0,0,0]},{"t":59,"s":[15.184,11.633,0]}],"ix":2,"l":2},"a":{"a":0,"k":[0.546,3.275,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0.301,0],[0,-0.301],[0,0],[-0.301,0],[0,0.301],[0,0]],"o":[[-0.301,0],[0,0],[0,0.301],[0.301,0],[0,0],[0,-0.301]],"v":[[0.546,0],[0,0.546],[0,6.004],[0.546,6.55],[1.091,6.004],[1.091,0.546]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"op","nm":"Offset Paths 1","a":{"a":0,"k":1.5,"ix":1},"lj":1,"ml":{"a":0,"k":4,"ix":3},"ix":3,"mn":"ADBE Vector Filter - Offset","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path 9952 Stroke","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0.301,0],[0,-0.301],[0,0],[-0.301,0],[0,0.301],[0,0]],"o":[[-0.301,0],[0,0],[0,0.301],[0.301,0],[0,0],[0,-0.301]],"v":[[0.546,0],[0,0.546],[0,6.004],[0.546,6.55],[1.091,6.004],[1.091,0.546]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.458823529412,0.78431372549,0.682352941176,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path 9952 Fill","np":2,"cix":2,"bm":0,"ix":2,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":60,"st":0,"bm":0},{"ddd":0,"ind":7,"ty":4,"nm":"Path 9951","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":180,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":0,"s":[16.776,11.633,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":28,"s":[16.776,10.383,0],"to":[0,0,0],"ti":[0,0,0]},{"t":59,"s":[16.776,11.633,0]}],"ix":2,"l":2},"a":{"a":0,"k":[0.546,1.91,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0.301,0],[0,-0.302],[0,0],[-0.301,0],[0,0.301],[0,0]],"o":[[-0.301,0],[0,0],[0,0.301],[0.301,0],[0,0],[0,-0.301]],"v":[[0.546,0],[0,0.546],[0,3.274],[0.546,3.82],[1.091,3.274],[1.091,0.546]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"op","nm":"Offset Paths 1","a":{"a":0,"k":1.5,"ix":1},"lj":1,"ml":{"a":0,"k":4,"ix":3},"ix":3,"mn":"ADBE Vector Filter - Offset","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path 9951 Stroke","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0.301,0],[0,-0.302],[0,0],[-0.301,0],[0,0.301],[0,0]],"o":[[-0.301,0],[0,0],[0,0.301],[0.301,0],[0,0],[0,-0.301]],"v":[[0.546,0],[0,0.546],[0,3.274],[0.546,3.82],[1.091,3.274],[1.091,0.546]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.458823529412,0.78431372549,0.682352941176,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Path 9951 Fill","np":2,"cix":2,"bm":0,"ix":2,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":60,"st":0,"bm":0},{"ddd":0,"ind":8,"ty":4,"nm":"Ellipse 416","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[12,12,0],"ix":2,"l":2},"a":{"a":0,"k":[0,0,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[20,20],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"a":0,"k":[0.458823529412,0.78431372549,0.682352941176,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":1.5,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"op","nm":"Offset Paths 1","a":{"a":0,"k":-0.75,"ix":1},"lj":1,"ml":{"a":0,"k":4,"ix":3},"ix":3,"mn":"ADBE Vector Filter - Offset","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Ellipse 416 Stroke","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[20,20],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Ellipse 416 Fill","np":2,"cix":2,"bm":0,"ix":2,"mn":"ADBE Vector Group","hd":false},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":0,"s":[2]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":28,"s":[100]},{"t":59,"s":[100]}],"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":0,"s":[0]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":28,"s":[0]},{"t":59,"s":[100]}],"ix":2},"o":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":0,"s":[-184]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":28,"s":[170]},{"t":59,"s":[507]}],"ix":3},"m":1,"ix":3,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false}],"ip":0,"op":1800,"st":0,"bm":0},{"ddd":0,"ind":9,"ty":4,"nm":"Ellipse 415","sr":1,"ks":{"o":{"a":0,"k":25,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[12,12,0],"ix":2,"l":2},"a":{"a":0,"k":[0,0,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[20,20],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":1.5,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"op","nm":"Offset Paths 1","a":{"a":0,"k":-0.75,"ix":1},"lj":1,"ml":{"a":0,"k":4,"ix":3},"ix":3,"mn":"ADBE Vector Filter - Offset","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Ellipse 415 Stroke","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[20,20],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Ellipse 415 Fill","np":2,"cix":2,"bm":0,"ix":2,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":60,"st":0,"bm":0}],"markers":[]} \ No newline at end of file diff --git a/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/values-land/dimens.xml b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/values-land/dimens.xml new file mode 100644 index 00000000..22d7f004 --- /dev/null +++ b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/values-land/dimens.xml @@ -0,0 +1,3 @@ + + 48dp + \ No newline at end of file diff --git a/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/values-night/themes.xml b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/values-night/themes.xml new file mode 100644 index 00000000..ced19e34 --- /dev/null +++ b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/values-night/themes.xml @@ -0,0 +1,6 @@ + + + + + diff --git a/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/values-w1240dp/dimens.xml b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/values-w1240dp/dimens.xml new file mode 100644 index 00000000..d73f4a35 --- /dev/null +++ b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/values-w1240dp/dimens.xml @@ -0,0 +1,3 @@ + + 200dp + \ No newline at end of file diff --git a/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/values-w600dp/dimens.xml b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/values-w600dp/dimens.xml new file mode 100644 index 00000000..22d7f004 --- /dev/null +++ b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/values-w600dp/dimens.xml @@ -0,0 +1,3 @@ + + 48dp + \ No newline at end of file diff --git a/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/values/colors.xml b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/values/colors.xml new file mode 100644 index 00000000..b27d1fc2 --- /dev/null +++ b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/values/colors.xml @@ -0,0 +1,7 @@ + + + #03028d + #06eae5 + #FF000000 + #FFFFFFFF + \ No newline at end of file diff --git a/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/values/dimens.xml b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/values/dimens.xml new file mode 100644 index 00000000..125df871 --- /dev/null +++ b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/values/dimens.xml @@ -0,0 +1,3 @@ + + 16dp + \ No newline at end of file diff --git a/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/values/ic_launcher_background.xml b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/values/ic_launcher_background.xml new file mode 100644 index 00000000..71efde7e --- /dev/null +++ b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/values/ic_launcher_background.xml @@ -0,0 +1,4 @@ + + + #06EAE4 + \ No newline at end of file diff --git a/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/values/strings.xml b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/values/strings.xml new file mode 100644 index 00000000..08ffc316 --- /dev/null +++ b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/values/strings.xml @@ -0,0 +1,18 @@ + + + + Bumper Sample App + + + 5420904993001 + + + BCpkADawqM1RJu5c_I13hBUAi4c8QNWO5QN2yrd_OgDjTCVsbILeGDxbYy6xhZESTFi68MiSUHzMbQbuLV3q-gvZkJFpym1qYbEwogOqKCXK622KNLPF92tX8AY9a1cVVYCgxSPN12pPAuIM + + + 5421538244001 + + + 6359004103112 + + \ No newline at end of file diff --git a/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/values/themes.xml b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/values/themes.xml new file mode 100644 index 00000000..52aabfa3 --- /dev/null +++ b/brightcove-exoplayer-kotlin/BumperSampleApp/src/main/res/values/themes.xml @@ -0,0 +1,6 @@ + + + + + diff --git a/brightcove-exoplayer/BasicSSAIPALSampleApp/.gitignore b/brightcove-exoplayer/BasicSSAIPALSampleApp/.gitignore new file mode 100644 index 00000000..796b96d1 --- /dev/null +++ b/brightcove-exoplayer/BasicSSAIPALSampleApp/.gitignore @@ -0,0 +1 @@ +/build diff --git a/brightcove-exoplayer/BasicSSAIPALSampleApp/build.gradle b/brightcove-exoplayer/BasicSSAIPALSampleApp/build.gradle new file mode 100644 index 00000000..eabff532 --- /dev/null +++ b/brightcove-exoplayer/BasicSSAIPALSampleApp/build.gradle @@ -0,0 +1,27 @@ +apply plugin: 'com.android.application' + +android { + compileSdkVersion ANDROID_COMPILE_SDK_VERSION + + defaultConfig { + applicationId "com.brightcove.player.samples.ssai.basic" + targetSdkVersion ANDROID_TARGET_SDK_VERSION + versionCode 1 + versionName "1.0" + } + + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + } + } + +} + +dependencies { + implementation fileTree(dir: 'libs', include: ['*.jar']) + implementation "com.brightcove.player:android-appcompat-plugin:${anpVersion}" + implementation "androidx.appcompat:appcompat:${ANDROIDX_APPCOMPAT}" + implementation "com.google.android.gms:play-services-pal:${GOOGLE_IMA_PAL_VERSION}" +} diff --git a/brightcove-exoplayer/BasicSSAIPALSampleApp/proguard-rules.pro b/brightcove-exoplayer/BasicSSAIPALSampleApp/proguard-rules.pro new file mode 100644 index 00000000..f1b42451 --- /dev/null +++ b/brightcove-exoplayer/BasicSSAIPALSampleApp/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile diff --git a/brightcove-exoplayer/BasicSSAIPALSampleApp/src/main/AndroidManifest.xml b/brightcove-exoplayer/BasicSSAIPALSampleApp/src/main/AndroidManifest.xml new file mode 100644 index 00000000..7981da4b --- /dev/null +++ b/brightcove-exoplayer/BasicSSAIPALSampleApp/src/main/AndroidManifest.xml @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/brightcove-exoplayer/BasicSSAIPALSampleApp/src/main/java/com/brightcove/player/samples/ssai/pal/MainActivity.java b/brightcove-exoplayer/BasicSSAIPALSampleApp/src/main/java/com/brightcove/player/samples/ssai/pal/MainActivity.java new file mode 100644 index 00000000..b18837b6 --- /dev/null +++ b/brightcove-exoplayer/BasicSSAIPALSampleApp/src/main/java/com/brightcove/player/samples/ssai/pal/MainActivity.java @@ -0,0 +1,246 @@ +package com.brightcove.player.samples.ssai.pal; + +import android.annotation.SuppressLint; +import android.os.Bundle; +import android.util.Log; +import android.view.MotionEvent; +import android.view.View; +import android.view.ViewGroup; +import android.widget.Toast; + +import androidx.appcompat.widget.SwitchCompat; + +import com.brightcove.player.Sdk; +import com.brightcove.player.appcompat.BrightcovePlayerActivity; +import com.brightcove.player.edge.Catalog; +import com.brightcove.player.edge.VideoListener; +import com.brightcove.player.event.Event; +import com.brightcove.player.event.EventEmitter; +import com.brightcove.player.event.EventListener; +import com.brightcove.player.event.EventType; +import com.brightcove.player.model.Video; +import com.brightcove.player.network.HttpRequestConfig; +import com.brightcove.player.samples.ssai.pal.R; +import com.brightcove.ssai.SSAIComponent; +import com.brightcove.ssai.event.SSAIEventType; +import com.brightcove.ssai.omid.AdEventType; +import com.brightcove.ssai.omid.OpenMeasurementTracker; +import com.google.ads.interactivemedia.pal.ConsentSettings; +import com.google.ads.interactivemedia.pal.NonceLoader; +import com.google.ads.interactivemedia.pal.NonceManager; +import com.google.ads.interactivemedia.pal.NonceRequest; +import com.google.android.gms.tasks.OnFailureListener; +import com.google.android.gms.tasks.OnSuccessListener; +import com.iab.omid.library.brightcove.adsession.FriendlyObstructionPurpose; + +import java.util.HashSet; +import java.util.Set; + +public class MainActivity extends BrightcovePlayerActivity { + + private static final String TAG = "MainActivity"; + private static final String AD_CONFIG_ID_QUERY_PARAM_VALUE = "ba5e4879-77f0-424b-8c98-706ae5ad7eec"; + private static final String PARTNER_NAME = "dummyVendor"; + private static final String PARTNER_VERSION = Sdk.getVersionName(); + + private SSAIComponent ssaiPlugin; + private OpenMeasurementTracker omTracker; + + private NonceLoader nonceLoader; + private NonceManager nonceManager; + private ConsentSettings consentSettings; + + private Catalog catalog; + + @Override + protected void onCreate(Bundle savedInstanceState) { + // When extending the BrightcovePlayer, we must assign brightcoveVideoView before + // entering the superclass. This allows for some stock video player lifecycle + // management. + setContentView(R.layout.ssai_activity_main); + baseVideoView = findViewById(R.id.brightcove_video_view); + super.onCreate(savedInstanceState); + + // The default value for allowStorage() is false, but can be + // changed once the appropriate consent has been gathered. The + // getConsentToStorage() method is a placeholder for the publisher's own + // method of obtaining user consent, either by integrating with a CMP or + // based on other methods the publisher chooses to handle storage consent. + //boolean isConsentToStorage = getConsentToStorage(); + consentSettings = ConsentSettings.builder() + .allowStorage(false) + .build(); + // It is important to instantiate the NonceLoader as early as possible to + // allow it to initialize and preload data for a faster experience when + // loading the NonceManager. A new NonceLoader will need to be instantiated + //if the ConsentSettings change for the user. + nonceLoader = new NonceLoader(this, consentSettings); + + //PAL + generateNonceForAdRequest(); + + final EventEmitter eventEmitter = baseVideoView.getEventEmitter(); + + catalog = new Catalog.Builder(eventEmitter, getString(R.string.sdk_demo_account)) + .setBaseURL(Catalog.DEFAULT_EDGE_BASE_URL) + .setPolicy(getString(R.string.sdk_demo_policy_key)) + .build(); + + // Setup the error event handler for the SSAI plugin. + registerErrorEventHandler(); + + setupOpenMeasurement(); + ssaiPlugin = new SSAIComponent(this, baseVideoView); + View view = findViewById(R.id.ad_frame); + if (view instanceof ViewGroup) { + // Set the companion ad container, + ssaiPlugin.addCompanionContainer((ViewGroup) view); + } + + baseVideoView.getEventEmitter().on(EventType.PLAY, event -> sendPlaybackStart()); + + baseVideoView.getEventEmitter().on(EventType.COMPLETED, event -> sendPlaybackEnd()); + + baseVideoView.getEventEmitter().on(SSAIEventType.AD_CLICKED, event -> sendAdClick()); + + } + + @Override + protected void onDestroy() { + super.onDestroy(); + if (omTracker != null && isFinishing()) { + omTracker.stop(); + } + if (nonceLoader != null) { + nonceLoader.release(); + } + } + + + public void generateNonceForAdRequest() { + Set supportedApiFrameWorksSet = new HashSet(); + // The values 2, 7, and 9 correspond to player support for VPAID 2.0, + // OMID 1.0, and SIMID 1.1. + supportedApiFrameWorksSet.add(2); + supportedApiFrameWorksSet.add(7); + supportedApiFrameWorksSet.add(9); + + NonceRequest nonceRequest = NonceRequest.builder() + .descriptionURL("https://example.com/content1") + .iconsSupported(true) + .omidPartnerVersion("6.2.1") + .omidPartnerName("Example Publisher") + .playerType("ExamplePlayerType") + .playerVersion("1.0.0") + .ppid("testPpid") + .sessionId("Sample SID") + .supportedApiFrameworks(supportedApiFrameWorksSet) + .videoPlayerHeight(480) + .videoPlayerWidth(640) + .willAdAutoPlay(true) + .willAdPlayMuted(true) + .build(); + NonceCallbackImpl callback = new NonceCallbackImpl(); + nonceLoader + .loadNonceManager(nonceRequest) + .addOnSuccessListener(callback) + .addOnFailureListener(callback); + } + + private class NonceCallbackImpl implements OnSuccessListener, OnFailureListener { + @Override + public void onSuccess(NonceManager manager) { + nonceManager = manager; + String nonceString = manager.getNonce(); + ssaiPlugin.setNonce(nonceString); + Log.d("PALSample", "Generated nonce: " + nonceString); + // Set the HttpRequestConfig with the Ad Config Id configured in + // your https://studio.brightcove.com account. + HttpRequestConfig httpRequestConfig = new HttpRequestConfig.Builder() + .addQueryParameter(HttpRequestConfig.KEY_AD_CONFIG_ID, AD_CONFIG_ID_QUERY_PARAM_VALUE) + .build(); + + catalog.findVideoByID(getString(R.string.sdk_demo_video_id), httpRequestConfig, new VideoListener() { + @Override + public void onVideo(Video video) { + // The Video Sources will have a VMAP url which will be processed by the SSAI plugin, + // If there is not a VMAP url, or if there are any requesting or parsing error, + // an EventType.ERROR event will be emitted. + ssaiPlugin.processVideo(video); + } + }); + } + + @Override + public void onFailure(Exception error) { + Log.e("PALSample", "Nonce generation failed: " + error.getMessage()); + } + } + + public void sendAdClick() { + if (nonceManager != null) { + nonceManager.sendAdClick(); + Log.d(TAG, "PAL sendAdClick() called"); + } + } + + public void sendPlaybackStart() { + if (nonceManager != null) { + nonceManager.sendPlaybackStart(); + Log.d(TAG, "PAL sendPlaybackStart() called"); + } + } + + public void sendPlaybackEnd() { + if (nonceManager != null) { + nonceManager.sendPlaybackEnd(); + Log.d(TAG, "PAL sendPlaybackEnd() called"); + } + } + + private void setupOpenMeasurement() { + SwitchCompat toggleButton = findViewById(R.id.om_toggle); + toggleButton.setOnCheckedChangeListener((buttonView, isChecked) -> { + if (isChecked) { + omTracker.start(); + } else { + omTracker.stop(); + } + }); + // Initialize the OpenMeasurementTracker + omTracker = new OpenMeasurementTracker.Factory( + PARTNER_NAME, PARTNER_VERSION, baseVideoView + ).create(); + // NOTE: The ad used in the sample does not have an `AdVerification` element and will not + // send tracking events. You may verify OpenMeasurement via the following listener: + omTracker.addListener(new OpenMeasurementTracker.Listener() { + @Override + public void onEvent(AdEventType adEventType) { + Log.d(TAG, "onEvent() called with: adEventType = [" + adEventType + "]"); + } + + @Override + public void onStartTracking() { + Log.d(TAG, "onStartTracking() called"); + } + + @Override + public void onStoppedTracking() { + Log.d(TAG, "onStoppedTracking() called"); + } + }); + // Example to register a view that should be considered as a friendly obstruction + View adFrame = findViewById(R.id.ad_frame); + omTracker.addFriendlyObstruction(adFrame, FriendlyObstructionPurpose.OTHER, "Ad frame"); + // Start the tracker, if enabled. + if (toggleButton.isChecked()) { + omTracker.start(); + } + } + + private void registerErrorEventHandler() { + // Handle the case where the ad data URL has not been supplied to the plugin. + EventEmitter eventEmitter = baseVideoView.getEventEmitter(); + eventEmitter.on(EventType.ERROR, event -> Log.e(TAG, event.getType())); + } +} diff --git a/brightcove-exoplayer/BasicSSAIPALSampleApp/src/main/res/drawable-hdpi/ic_launcher.png b/brightcove-exoplayer/BasicSSAIPALSampleApp/src/main/res/drawable-hdpi/ic_launcher.png new file mode 100644 index 00000000..0201441b Binary files /dev/null and b/brightcove-exoplayer/BasicSSAIPALSampleApp/src/main/res/drawable-hdpi/ic_launcher.png differ diff --git a/brightcove-exoplayer/BasicSSAIPALSampleApp/src/main/res/drawable-mdpi/ic_launcher.png b/brightcove-exoplayer/BasicSSAIPALSampleApp/src/main/res/drawable-mdpi/ic_launcher.png new file mode 100644 index 00000000..26721fd4 Binary files /dev/null and b/brightcove-exoplayer/BasicSSAIPALSampleApp/src/main/res/drawable-mdpi/ic_launcher.png differ diff --git a/brightcove-exoplayer/BasicSSAIPALSampleApp/src/main/res/drawable-xhdpi/ic_launcher.png b/brightcove-exoplayer/BasicSSAIPALSampleApp/src/main/res/drawable-xhdpi/ic_launcher.png new file mode 100644 index 00000000..e6c33269 Binary files /dev/null and b/brightcove-exoplayer/BasicSSAIPALSampleApp/src/main/res/drawable-xhdpi/ic_launcher.png differ diff --git a/brightcove-exoplayer/BasicSSAIPALSampleApp/src/main/res/drawable-xhdpi/tv_banner.png b/brightcove-exoplayer/BasicSSAIPALSampleApp/src/main/res/drawable-xhdpi/tv_banner.png new file mode 100644 index 00000000..87ddfdeb Binary files /dev/null and b/brightcove-exoplayer/BasicSSAIPALSampleApp/src/main/res/drawable-xhdpi/tv_banner.png differ diff --git a/brightcove-exoplayer/BasicSSAIPALSampleApp/src/main/res/drawable-xxhdpi/ic_launcher.png b/brightcove-exoplayer/BasicSSAIPALSampleApp/src/main/res/drawable-xxhdpi/ic_launcher.png new file mode 100644 index 00000000..0d412f56 Binary files /dev/null and b/brightcove-exoplayer/BasicSSAIPALSampleApp/src/main/res/drawable-xxhdpi/ic_launcher.png differ diff --git a/brightcove-exoplayer/BasicSSAIPALSampleApp/src/main/res/layout/ssai_activity_main.xml b/brightcove-exoplayer/BasicSSAIPALSampleApp/src/main/res/layout/ssai_activity_main.xml new file mode 100644 index 00000000..d95825be --- /dev/null +++ b/brightcove-exoplayer/BasicSSAIPALSampleApp/src/main/res/layout/ssai_activity_main.xml @@ -0,0 +1,34 @@ + + + + + + + + + \ No newline at end of file diff --git a/brightcove-exoplayer/BasicSSAIPALSampleApp/src/main/res/values/colors.xml b/brightcove-exoplayer/BasicSSAIPALSampleApp/src/main/res/values/colors.xml new file mode 100644 index 00000000..d21184e1 --- /dev/null +++ b/brightcove-exoplayer/BasicSSAIPALSampleApp/src/main/res/values/colors.xml @@ -0,0 +1,6 @@ + + + #2c2e80 + #161742 + #5fc6ce + diff --git a/brightcove-exoplayer/BasicSSAIPALSampleApp/src/main/res/values/strings.xml b/brightcove-exoplayer/BasicSSAIPALSampleApp/src/main/res/values/strings.xml new file mode 100644 index 00000000..c4c5d388 --- /dev/null +++ b/brightcove-exoplayer/BasicSSAIPALSampleApp/src/main/res/values/strings.xml @@ -0,0 +1,15 @@ + + + BasicSsaiSampleApp + + + 5420904993001 + + + BCpkADawqM3DwCTPGyMMiG0loem8lXox3utO1lFEP1i-_l1MpjRSVXMTSsa2ToslC129_W6YzwJpXbpbIVRFwf35qYM0pxo2HJK-_SotgmgrkmJTQ-024GkXIelVSY8LOHZzRBtcBU57M6Is + + + 6031901107001 + Open Measurement + + diff --git a/brightcove-exoplayer/BasicSSAIPALSampleApp/src/main/res/values/styles.xml b/brightcove-exoplayer/BasicSSAIPALSampleApp/src/main/res/values/styles.xml new file mode 100644 index 00000000..5885930d --- /dev/null +++ b/brightcove-exoplayer/BasicSSAIPALSampleApp/src/main/res/values/styles.xml @@ -0,0 +1,11 @@ + + + + + + diff --git a/brightcove-exoplayer/BasicSSAIPALSampleApp/src/main/res/xml/network_security_config.xml b/brightcove-exoplayer/BasicSSAIPALSampleApp/src/main/res/xml/network_security_config.xml new file mode 100644 index 00000000..09d559b5 --- /dev/null +++ b/brightcove-exoplayer/BasicSSAIPALSampleApp/src/main/res/xml/network_security_config.xml @@ -0,0 +1,21 @@ + + + + + + + + + + c.brightcove.com + f1.media.brightcove.com + solutions.brightcove.com + appsci.vidmark.local + devimages.apple.com.edgekey.net + fwmrm.net + edgedl.me.gvt1.com + rdmedia.bbc.co.uk + boltdns.net + akamaihd.net + + diff --git a/brightcove-exoplayer/BumperSampleApp/src/main/res/values/strings.xml b/brightcove-exoplayer/BumperSampleApp/src/main/res/values/strings.xml index 77a590a1..052f31a9 100644 --- a/brightcove-exoplayer/BumperSampleApp/src/main/res/values/strings.xml +++ b/brightcove-exoplayer/BumperSampleApp/src/main/res/values/strings.xml @@ -4,15 +4,15 @@ Bumper Sample App - 4800266849001 + 5420904993001 - BCpkADawqM3n0ImwKortQqSZCgJMcyVbb8lJVwt0z16UD0a_h8MpEYcHyKbM8CGOPxBRp0nfSVdfokXBrUu3Sso7Nujv3dnLo0JxC_lNXCl88O7NJ0PR0z2AprnJ_Lwnq7nTcy1GBUrQPr5e + BCpkADawqM1RJu5c_I13hBUAi4c8QNWO5QN2yrd_OgDjTCVsbILeGDxbYy6xhZESTFi68MiSUHzMbQbuLV3q-gvZkJFpym1qYbEwogOqKCXK622KNLPF92tX8AY9a1cVVYCgxSPN12pPAuIM - 1715882712036765088 + 5421538244001 - 1752206670195252559 + 6359004103112 diff --git a/build.gradle b/build.gradle index a1b183bc..9ab1b344 100644 --- a/build.gradle +++ b/build.gradle @@ -12,7 +12,7 @@ buildscript { dependencies { classpath 'com.android.tools.build:gradle:7.1.3' classpath 'com.stanfy.spoon:spoon-gradle-plugin:1.2.2' - classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.20' + classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.0' } } @@ -122,7 +122,7 @@ configure(subprojects.findAll {it.name.endsWith('SampleApp')}) { } } - if (project.name.contains('Ssai')) { + if (project.name.contains('Ssai') || project.name.contains('SSAI')) { dependencies { implementation "com.brightcove.player:android-ssai-plugin:${anpVersion}" implementation "com.brightcove.player:exoplayer2:${anpVersion}" diff --git a/constants.gradle b/constants.gradle index cc9e366b..fe8ed984 100644 --- a/constants.gradle +++ b/constants.gradle @@ -3,6 +3,7 @@ project.ext { ANDROID_TARGET_SDK_VERSION = 34 ANDROID_COMPILE_SDK_VERSION = 34 ANDROID_BUILD_TOOLS_VERSION = '30.0.3' + ANDROID_MATERIAL = '1.6.1' ANDROIDX_APPCOMPAT = '1.4.0' ANDROIDX_CONSTRAINT_LAYOUT = '2.1.2' @@ -14,6 +15,7 @@ project.ext { PLAY_SERVICES_VERSION = '19.2.0' GOOGLE_IMA_SDK_VERSION = '3.27.1' + GOOGLE_IMA_PAL_VERSION = '20.2.0' APPCOMPAT_V7_VERSION = '28.0.0' SUPPORT_V4_VERSION = '28.0.0' PICASSO_VERSION = '2.71828' diff --git a/gradle.properties b/gradle.properties index 4787caf8..618fc47e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,5 +4,5 @@ # Native Player version. android.enableJetifier=true android.useAndroidX=true -anpVersion=9.0.0 +anpVersion=9.1.0 org.gradle.jvmargs=-Xmx6g -XX:+UseParallelGC -XX:MaxMetaspaceSize=4g diff --git a/settings.gradle b/settings.gradle index 2e37c5bb..fa39752a 100644 --- a/settings.gradle +++ b/settings.gradle @@ -18,8 +18,11 @@ include ':brightcove-exoplayer:BasicIMAVASTSampleApp' include ':brightcove-exoplayer:ThumbnailScrubberSampleApp' include ':brightcove-exoplayer:AudioOnlySampleApp' include ':brightcove-exoplayer:BumperSampleApp' +include ':brightcove-exoplayer:BasicSSAIPALSampleApp' include ':brightcove-exoplayer-kotlin:AudioOnlySampleApp' +include ':brightcove-exoplayer-kotlin:BasicSsaiPALSampleApp' +include ':brightcove-exoplayer-kotlin:BumperSampleApp' // For building Brightcove Player Controls specific sample apps, which are located under the 'brightcove-player-controls' directory. include ':brightcove-player-controls:CustomizedControlsSampleApp'