File tree Expand file tree Collapse file tree 4 files changed +64
-3
lines changed
src/main/java/com/heyanle/eplayer_core Expand file tree Collapse file tree 4 files changed +64
-3
lines changed Original file line number Diff line number Diff line change 1+ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
2+
13plugins {
24 id(" com.android.library" )
35 id(" org.jetbrains.kotlin.android" )
6+ id(" maven-publish" )
47}
58
9+ group = " com.heyanle"
10+ version = " 1.0-SNAPSHOT"
11+
612android {
713 compileSdk = 33
814
15+ publishing {
16+ singleVariant(" release" ) {
17+ withSourcesJar()
18+ }
19+ }
20+
921 defaultConfig {
1022 minSdk = 21
1123 targetSdk = 33
@@ -31,8 +43,25 @@ android {
3143 }
3244}
3345
46+ tasks.withType<KotlinCompile > {
47+ kotlinOptions.jvmTarget = " 1.8"
48+ }
49+
3450dependencies {
3551 implementation(" androidx.core:core-ktx:1.9.0" )
3652 implementation(" androidx.appcompat:appcompat:1.5.1" )
3753 implementation(" androidx.media:media:1.6.0" )
54+ }
55+
56+ afterEvaluate {
57+ publishing {
58+ publications {
59+ create(" maven_public" , MavenPublication ::class ) {
60+ groupId = " com.heyanle"
61+ artifactId = " eplayer-core"
62+ version = " 1.0"
63+ from(components.getByName(" release" ))
64+ }
65+ }
66+ }
3867}
Original file line number Diff line number Diff line change @@ -14,7 +14,6 @@ object EasyPlayerManager {
1414 var playerEngineFactory: IPlayerEngineFactory ? = null
1515 var renderFactory: IRenderFactory ? = null
1616
17- var enablePlayOnMobileNetwork: Boolean = true
1817 var enableOrientation: Boolean = true
1918 var enableAudioFocus: Boolean = true
2019
Original file line number Diff line number Diff line change @@ -164,7 +164,6 @@ open class BaseEasyPlayerView:
164164 || isInStartAbortState()
165165 ) {
166166 startFirst()
167- startInPlaybackState()
168167 } else if (isInPlaybackState()) {
169168 startInPlaybackState()
170169 }
@@ -475,7 +474,11 @@ open class BaseEasyPlayerView:
475474 mCurrentPosition = progressManager.getProgress(url)
476475 }
477476 startPrepare()
478-
477+ requestFocusIfNeed()
478+ val environment = requireEnvironment()
479+ dispatchPlayStateChange(EasyPlayStatus .STATE_PLAYING )
480+ renderContainer.keepScreenOn = true
481+ environment.playerEngine.start()
479482 return true
480483 }
481484
Original file line number Diff line number Diff line change 1+ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
2+
13plugins {
24 id(" com.android.library" )
35 id(" org.jetbrains.kotlin.android" )
6+ id(" maven-publish" )
47}
58
9+ group = " com.heyanle"
10+ version = " 1.0-SNAPSHOT"
11+
612android {
713 compileSdk = 33
814
15+ publishing {
16+ singleVariant(" release" ) {
17+ withSourcesJar()
18+ }
19+ }
20+
921 defaultConfig {
1022 minSdk = 21
1123 targetSdk = 33
@@ -31,6 +43,11 @@ android {
3143 }
3244}
3345
46+
47+ tasks.withType<KotlinCompile > {
48+ kotlinOptions.jvmTarget = " 1.8"
49+ }
50+
3451dependencies {
3552
3653 api(project(" :eplayer-core" ))
@@ -39,4 +56,17 @@ dependencies {
3956 api(" com.google.android.exoplayer:extension-rtmp:2.18.1" )
4057
4158
59+ }
60+
61+ afterEvaluate {
62+ publishing {
63+ publications {
64+ create(" maven_public" , MavenPublication ::class ) {
65+ groupId = " com.heyanle"
66+ artifactId = " eplayer-exo"
67+ version = " 1.0"
68+ from(components.getByName(" release" ))
69+ }
70+ }
71+ }
4272}
You can’t perform that action at this time.
0 commit comments