Skip to content

Commit 99b3b6f

Browse files
Merge branch 'master'
2 parents ca9efe7 + acb9abf commit 99b3b6f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+1324
-0
lines changed

.gitignore

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Gradle build files
2+
.gradle/
3+
build/
4+
**/build/
5+
6+
# Local configuration
7+
local.properties
8+
gradle.properties
9+
10+
# Log/OS files
11+
*.log
12+
*.tmp
13+
*.swp
14+
*.swo
15+
16+
# Android Studio
17+
.idea/
18+
*.iml
19+
*.ipr
20+
*.iws
21+
out/
22+
23+
# Generated by Android Studio
24+
captures/
25+
.externalNativeBuild/
26+
.cxx/
27+
navigation.json
28+
*.apk
29+
*.ap_
30+
*.aab
31+
32+
# Keystore files (don’t keep them in git)
33+
*.jks
34+
*.keystore
35+
36+
# IntelliJ
37+
.idea/caches
38+
.idea/libraries
39+
.idea/modules.xml
40+
.idea/workspace.xml
41+
.idea/navEditor.xml
42+
.idea/assetWizardSettings.xml
43+
44+
# NDK / CMake
45+
obj/
46+
*.so
47+
48+
# Proguard / Dex
49+
*.dex
50+
*.class
51+
*.jar
52+
*.war
53+
*.ear
54+
55+
# Crashlytics / Firebase
56+
crashlytics-build.properties
57+
fabric.properties
58+
59+
# Android test results
60+
outputs/
61+
reports/
62+
63+
# Misc
64+
.DS_Store
65+
Thumbs.db

app/.gitignore

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Gradle build files
2+
.gradle/
3+
build/
4+
**/build/
5+
6+
# Local configuration
7+
local.properties
8+
gradle.properties
9+
10+
# Log/OS files
11+
*.log
12+
*.tmp
13+
*.swp
14+
*.swo
15+
16+
# Android Studio
17+
.idea/
18+
*.iml
19+
*.ipr
20+
*.iws
21+
out/
22+
23+
# Generated by Android Studio
24+
captures/
25+
.externalNativeBuild/
26+
.cxx/
27+
navigation.json
28+
*.apk
29+
*.ap_
30+
*.aab
31+
32+
# Keystore files (don’t keep them in git)
33+
*.jks
34+
*.keystore
35+
36+
# IntelliJ
37+
.idea/caches
38+
.idea/libraries
39+
.idea/modules.xml
40+
.idea/workspace.xml
41+
.idea/navEditor.xml
42+
.idea/assetWizardSettings.xml
43+
44+
# NDK / CMake
45+
obj/
46+
*.so
47+
48+
# Proguard / Dex
49+
*.dex
50+
*.class
51+
*.jar
52+
*.war
53+
*.ear
54+
55+
# Crashlytics / Firebase
56+
crashlytics-build.properties
57+
fabric.properties
58+
59+
# Android test results
60+
outputs/
61+
reports/
62+
63+
# Misc
64+
.DS_Store
65+
Thumbs.db

app/build.gradle.kts

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
plugins {
2+
alias(libs.plugins.android.application)
3+
alias(libs.plugins.kotlin.android)
4+
}
5+
6+
android {
7+
namespace = "io.fastpix.data.brightcove.demo"
8+
compileSdk = 36
9+
10+
defaultConfig {
11+
applicationId = "io.fastpix.data.brightcove.demo"
12+
minSdk = 24
13+
targetSdk = 36
14+
versionCode = 1
15+
versionName = "1.0"
16+
17+
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
18+
}
19+
20+
dataBinding {
21+
enable = true
22+
}
23+
24+
buildTypes {
25+
release {
26+
isMinifyEnabled = false
27+
proguardFiles(
28+
getDefaultProguardFile("proguard-android-optimize.txt"),
29+
"proguard-rules.pro"
30+
)
31+
}
32+
}
33+
compileOptions {
34+
sourceCompatibility = JavaVersion.VERSION_11
35+
targetCompatibility = JavaVersion.VERSION_11
36+
}
37+
kotlinOptions {
38+
jvmTarget = "11"
39+
}
40+
}
41+
42+
dependencies {
43+
44+
implementation(libs.androidx.core.ktx)
45+
implementation(libs.androidx.appcompat)
46+
implementation(libs.material)
47+
implementation(libs.androidx.activity)
48+
implementation(libs.androidx.constraintlayout)
49+
testImplementation(libs.junit)
50+
androidTestImplementation(libs.androidx.junit)
51+
implementation(project(":brightcove"))
52+
implementation(libs.exoplayer2)
53+
}

app/proguard-rules.pro

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Add project specific ProGuard rules here.
2+
# You can control the set of applied configuration files using the
3+
# proguardFiles setting in build.gradle.
4+
#
5+
# For more details, see
6+
# http://developer.android.com/guide/developing/tools/proguard.html
7+
8+
# If your project uses WebView with JS, uncomment the following
9+
# and specify the fully qualified class name to the JavaScript interface
10+
# class:
11+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12+
# public *;
13+
#}
14+
15+
# Uncomment this to preserve the line number information for
16+
# debugging stack traces.
17+
#-keepattributes SourceFile,LineNumberTable
18+
19+
# If you keep the line number information, uncomment this to
20+
# hide the original source file name.
21+
#-renamesourcefileattribute SourceFile
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package io.fastpix.data.brightcove
2+
3+
import androidx.test.platform.app.InstrumentationRegistry
4+
import androidx.test.ext.junit.runners.AndroidJUnit4
5+
6+
import org.junit.Test
7+
import org.junit.runner.RunWith
8+
9+
import org.junit.Assert.*
10+
11+
/**
12+
* Instrumented test, which will execute on an Android device.
13+
*
14+
* See [testing documentation](http://d.android.com/tools/testing).
15+
*/
16+
@RunWith(AndroidJUnit4::class)
17+
class ExampleInstrumentedTest {
18+
@Test
19+
fun useAppContext() {
20+
// Context of the app under test.
21+
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
22+
assertEquals("io.fastpix.data.brightcove", appContext.packageName)
23+
}
24+
}

app/src/main/AndroidManifest.xml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:tools="http://schemas.android.com/tools">
4+
<uses-permission android:name="android.permission.INTERNET"/>
5+
6+
<application
7+
android:allowBackup="true"
8+
android:dataExtractionRules="@xml/data_extraction_rules"
9+
android:fullBackupContent="@xml/backup_rules"
10+
android:icon="@mipmap/ic_launcher"
11+
android:label="@string/app_name"
12+
android:roundIcon="@mipmap/ic_launcher_round"
13+
android:supportsRtl="true"
14+
android:theme="@style/Theme.Brightcove">
15+
<activity
16+
android:name=".MainActivity"
17+
android:exported="true">
18+
<intent-filter>
19+
<action android:name="android.intent.action.MAIN" />
20+
21+
<category android:name="android.intent.category.LAUNCHER" />
22+
</intent-filter>
23+
</activity>
24+
</application>
25+
26+
</manifest>
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
package io.fastpix.data.brightcove.demo
2+
3+
import android.os.Bundle
4+
import com.brightcove.player.model.DeliveryType
5+
import com.brightcove.player.model.Video
6+
import io.fastpix.data.brightcove.BrightcoveBase
7+
import io.fastpix.data.brightcove.FastPixConfig
8+
import io.fastpix.data.brightcove.demo.databinding.ActivityMainBinding
9+
10+
class MainActivity : BrightcoveBase() {
11+
12+
private lateinit var binding: ActivityMainBinding
13+
override fun onCreate(savedInstanceState: Bundle?) {
14+
15+
binding = ActivityMainBinding.inflate(layoutInflater)
16+
setContentView(binding.root)
17+
brightcoveVideoView = binding.brightcoveVideoView;
18+
super.onCreate(savedInstanceState)
19+
initializeAnalytics()
20+
21+
val videoUrl = "enter_your_stream_url"
22+
val video = Video.createVideo(
23+
videoUrl,
24+
DeliveryType.HLS // Mention your type of delivery here
25+
)
26+
27+
videoConfig.videoTitle = "Your Video Title"
28+
playerConfig.playerVersion = "Your Player Version"
29+
playerConfig.playerName = "Brightcove Player"
30+
customOptions.beaconDomain = "mention your beacon domain here"
31+
videoConfig.videoId = "Your Video Id"
32+
brightcoveVideoView.add(video)
33+
brightcoveVideoView.start()
34+
35+
}
36+
37+
override fun getFastPixConfig() = FastPixConfig("your_workspace_id")
38+
}

0 commit comments

Comments
 (0)