diff --git a/app/build.gradle b/app/build.gradle
index 11510ef..e0ac720 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -65,6 +65,6 @@ dependencies {
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
- def media3_version = "1.1.1"
- implementation "androidx.media3:media3-common:$media3_version"
+ implementation "androidx.media3:media3-common:1.1.1"
+ implementation "com.google.guava:guava:31.1-android"
}
\ No newline at end of file
diff --git a/app/src/main/java/io/kinescope/demo/subtitles/SubtitlesActivity.kt b/app/src/main/java/io/kinescope/demo/subtitles/SubtitlesActivity.kt
index 5198c3b..94308ec 100644
--- a/app/src/main/java/io/kinescope/demo/subtitles/SubtitlesActivity.kt
+++ b/app/src/main/java/io/kinescope/demo/subtitles/SubtitlesActivity.kt
@@ -8,9 +8,11 @@ import android.os.Bundle
import android.view.View
import android.view.WindowManager
import androidx.core.view.isVisible
+import androidx.media3.common.util.UnstableApi
import io.kinescope.sdk.player.KinescopeVideoPlayer
import io.kinescope.sdk.view.KinescopePlayerView
+@UnstableApi
class SubtitlesActivity : AppCompatActivity() {
private var isVideoFullscreen = false
@@ -21,9 +23,9 @@ class SubtitlesActivity : AppCompatActivity() {
kinescopePlayer = KinescopeVideoPlayer(this)
}
- lateinit var playerView:KinescopePlayerView
- lateinit var fullscreenPlayerView:KinescopePlayerView
- lateinit var kinescopePlayer :KinescopeVideoPlayer
+ private lateinit var playerView: KinescopePlayerView
+ private lateinit var fullscreenPlayerView: KinescopePlayerView
+ private lateinit var kinescopePlayer: KinescopeVideoPlayer
override fun onStart() {
@@ -34,11 +36,11 @@ class SubtitlesActivity : AppCompatActivity() {
playerView.setIsFullscreen(false)
fullscreenPlayerView.setIsFullscreen(true)
playerView.setPlayer(kinescopePlayer)
- playerView.onFullscreenButtonCallback = {toggleFullscreen()}
- fullscreenPlayerView.onFullscreenButtonCallback = {toggleFullscreen()}
+ playerView.onFullscreenButtonCallback = { toggleFullscreen() }
+ fullscreenPlayerView.onFullscreenButtonCallback = { toggleFullscreen() }
kinescopePlayer.loadVideo("eNWM8F6wbVTVa8fBeR66y6", onSuccess = {
- if(it != null) {
+ if (it != null) {
kinescopePlayer.play()
}
})
diff --git a/gradle.properties b/gradle.properties
index cd0519b..169c257 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -20,4 +20,5 @@ kotlin.code.style=official
# Enables namespacing of each library's R class so that its R class includes only the
# resources declared in the library itself and none from the library's dependencies,
# thereby reducing the size of the R class for that library
-android.nonTransitiveRClass=true
\ No newline at end of file
+android.nonTransitiveRClass=true
+android.disableResourceValidation=true
\ No newline at end of file
diff --git a/jitpack.yml b/jitpack.yml
index fe632d9..f3b23ae 100644
--- a/jitpack.yml
+++ b/jitpack.yml
@@ -6,5 +6,5 @@ install:
- FILE="-Dfile=kotlin-kinescope-player-release.aar"
- GROUP_ID="-DgroupId=com.github.kinescope"
- ARTIFACT_ID="-DartifactId=kotlin-kinescope-player"
- - VERSION="-Dversion=0.0.1"
+ - VERSION="-Dversion=0.0.2"
- mvn install:install-file $FILE $GROUP_ID $ARTIFACT_ID $VERSION -Dpackaging=aar -DgeneratePom=true
\ No newline at end of file
diff --git a/kotlin-kinescope-player-release.aar b/kotlin-kinescope-player-release.aar
index 7630f4f..9497223 100644
Binary files a/kotlin-kinescope-player-release.aar and b/kotlin-kinescope-player-release.aar differ
diff --git a/kotlin-kinescope-player/build.gradle b/kotlin-kinescope-player/build.gradle
index 097d03c..86c208d 100644
--- a/kotlin-kinescope-player/build.gradle
+++ b/kotlin-kinescope-player/build.gradle
@@ -1,3 +1,9 @@
+buildscript {
+ dependencies {
+ classpath 'com.github.kezong:fat-aar:1.3.8'
+ }
+}
+
plugins {
id 'com.android.library'
id 'org.jetbrains.kotlin.android'
@@ -6,6 +12,8 @@ plugins {
id "com.google.protobuf" version "0.8.17"
}
+apply plugin: 'com.kezong.fat-aar'
+
android {
compileSdk 33
@@ -16,18 +24,18 @@ android {
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
- versionName "0.0.1"
+ versionName "0.0.2"
}
buildTypes {
debug {
minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
+ shrinkResources false
buildConfigField("String", "VERSION_NAME", "\"${defaultConfig.versionName}\"")
}
release {
minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
+ shrinkResources false
buildConfigField("String", "VERSION_NAME", "\"${defaultConfig.versionName}\"")
}
}
@@ -63,26 +71,27 @@ configurations.all {
}
dependencies {
- implementation 'androidx.core:core-ktx:1.9.0'
- implementation 'androidx.appcompat:appcompat:1.6.1'
- implementation 'com.google.android.material:material:1.8.0'
- implementation 'com.squareup.okhttp3:okhttp:4.10.0'
- implementation 'com.squareup.retrofit2:retrofit:2.9.0'
- implementation 'com.squareup.okhttp3:logging-interceptor:4.9.3'
- implementation 'com.squareup.retrofit2:converter-moshi:2.9.0'
- implementation 'com.squareup.okio:okio:2.10.0'
- implementation 'com.squareup.moshi:moshi:1.14.0'
- implementation 'com.squareup.moshi:moshi-adapters:1.14.0'
- kapt 'com.squareup.moshi:moshi-kotlin-codegen:1.14.0'
- implementation 'me.saket.cascade:cascade:1.3.0'
- implementation 'com.squareup.retrofit2:converter-protobuf:2.9.0'
+ implementation fileTree(dir: 'libs', include: ['*.jar'])
+
+ implementation "androidx.core:core-ktx:1.9.0"
+ implementation "androidx.appcompat:appcompat:1.6.1"
+ implementation "com.google.android.material:material:1.9.0"
+ kapt "com.squareup.moshi:moshi-kotlin-codegen:1.14.0"
def media3Version = "1.1.1"
- implementation "androidx.media3:media3-exoplayer:$media3Version"
- implementation "androidx.media3:media3-exoplayer-dash:$media3Version"
- implementation "androidx.media3:media3-exoplayer-hls:$media3Version"
- implementation "androidx.media3:media3-ui:$media3Version"
+ embed "androidx.media3:media3-common:$media3Version"
+ embed "androidx.media3:media3-exoplayer:$media3Version"
+ embed "androidx.media3:media3-exoplayer-dash:$media3Version"
+ embed "androidx.media3:media3-exoplayer-hls:$media3Version"
+ embed "androidx.media3:media3-ui:$media3Version"
+ embed "androidx.media3:media3-decoder:$media3Version"
+ embed "androidx.media3:media3-extractor:$media3Version"
+ embed "androidx.media3:media3-datasource:$media3Version"
+ embed "androidx.media3:media3-container:$media3Version"
+ embed "androidx.media3:media3-database:$media3Version"
+ embed "androidx.media3:media3-session:$media3Version"
- implementation 'com.squareup.picasso:picasso:2.8'
- implementation "androidx.datastore:datastore-core:1.0.0"
+ implementation "com.github.bumptech.glide:glide:4.16.0"
+ implementation "com.squareup.retrofit2:retrofit:2.11.0"
+ implementation "com.squareup.okhttp3:logging-interceptor:4.12.0"
}
\ No newline at end of file
diff --git a/kotlin-kinescope-player/libs/converter-moshi-2.9.0.jar b/kotlin-kinescope-player/libs/converter-moshi-2.9.0.jar
new file mode 100644
index 0000000..a500610
Binary files /dev/null and b/kotlin-kinescope-player/libs/converter-moshi-2.9.0.jar differ
diff --git a/kotlin-kinescope-player/libs/converter-protobuf-2.9.0.jar b/kotlin-kinescope-player/libs/converter-protobuf-2.9.0.jar
new file mode 100644
index 0000000..cb1f634
Binary files /dev/null and b/kotlin-kinescope-player/libs/converter-protobuf-2.9.0.jar differ
diff --git a/kotlin-kinescope-player/libs/datastore-core-1.0.0.jar b/kotlin-kinescope-player/libs/datastore-core-1.0.0.jar
new file mode 100644
index 0000000..97a1c8b
Binary files /dev/null and b/kotlin-kinescope-player/libs/datastore-core-1.0.0.jar differ
diff --git a/kotlin-kinescope-player/libs/moshi-1.14.0.jar b/kotlin-kinescope-player/libs/moshi-1.14.0.jar
new file mode 100644
index 0000000..50f1cb1
Binary files /dev/null and b/kotlin-kinescope-player/libs/moshi-1.14.0.jar differ
diff --git a/kotlin-kinescope-player/libs/moshi-adapters-1.14.0.jar b/kotlin-kinescope-player/libs/moshi-adapters-1.14.0.jar
new file mode 100644
index 0000000..1b86228
Binary files /dev/null and b/kotlin-kinescope-player/libs/moshi-adapters-1.14.0.jar differ
diff --git a/kotlin-kinescope-player/libs/protobuf-java-3.25.3.jar b/kotlin-kinescope-player/libs/protobuf-java-3.25.3.jar
new file mode 100644
index 0000000..e45c5f1
Binary files /dev/null and b/kotlin-kinescope-player/libs/protobuf-java-3.25.3.jar differ
diff --git a/kotlin-kinescope-player/src/main/java/io/kinescope/sdk/menu/KinescopeOptionsBackStackMenu.kt b/kotlin-kinescope-player/src/main/java/io/kinescope/sdk/menu/KinescopeOptionsBackStackMenu.kt
deleted file mode 100644
index e9995ac..0000000
--- a/kotlin-kinescope-player/src/main/java/io/kinescope/sdk/menu/KinescopeOptionsBackStackMenu.kt
+++ /dev/null
@@ -1,77 +0,0 @@
-package io.kinescope.sdk.menu
-
-import android.content.Context
-import android.view.Gravity
-import android.view.Menu
-import android.view.View
-import androidx.appcompat.content.res.AppCompatResources
-import androidx.appcompat.view.menu.MenuBuilder
-import io.kinescope.sdk.R
-import io.kinescope.sdk.utils.dip
-import me.saket.cascade.CascadePopupWindow
-
-import java.util.*
-
-class KinescopeOptionsBackStackMenu(
- private val context: Context,
- private val anchor: View,
- private var gravity: Int = Gravity.NO_GRAVITY,
- private val fixedWidth: Int = context.dip(196),
- private val xoff: Int,
- private val yoff: Int,
-) {
- private val backstack = Stack