Skip to content

Commit

Permalink
v0.1.3 - keep screen awake while video is playing
Browse files Browse the repository at this point in the history
  • Loading branch information
dadencukillia committed Nov 13, 2024
1 parent 7916e16 commit eb1a349
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 14 deletions.
3 changes: 2 additions & 1 deletion app/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/build
/build
/release
2 changes: 1 addition & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ android {
minSdk = 28
targetSdk = 34
versionCode = 3
versionName = "0.1.2"
versionName = "0.1.3"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
Expand Down
9 changes: 0 additions & 9 deletions app/src/main/java/com/crocoby/animeplayerua/App.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,21 @@ package com.crocoby.animeplayerua

import android.annotation.SuppressLint
import android.content.Context
import android.util.Log
import androidx.compose.animation.EnterTransition
import androidx.compose.animation.ExitTransition
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.wrapContentHeight
import androidx.compose.material3.AlertDialog
import androidx.compose.material3.AlertDialogDefaults
import androidx.compose.material3.BasicAlertDialog
import androidx.compose.material3.Button
import androidx.compose.material3.Card
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Surface
import androidx.compose.material3.Text
import androidx.compose.material3.TextButton
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
Expand All @@ -34,11 +29,8 @@ import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import androidx.compose.ui.window.Dialog
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.compose.LifecycleEventEffect
import androidx.lifecycle.compose.LocalLifecycleOwner
import androidx.lifecycle.whenCreated
import androidx.navigation.NavHostController
import androidx.navigation.compose.NavHost
import androidx.navigation.compose.composable
Expand All @@ -52,7 +44,6 @@ import com.crocoby.animeplayerua.logic.AnimeDao
import com.crocoby.animeplayerua.logic.AppDatabase
import com.crocoby.animeplayerua.logic.LatestAppVersionAndDownloadUrl
import com.crocoby.animeplayerua.logic.parser
import com.crocoby.animeplayerua.logic.runParser
import kotlinx.coroutines.launch

var database: AnimeDao? = null
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.crocoby.animeplayerua

import android.os.Bundle
import android.util.Log
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import androidx.compose.ui.viewinterop.AndroidView
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.LifecycleEventObserver
import androidx.lifecycle.compose.LocalLifecycleOwner
import androidx.media3.common.C
import androidx.media3.common.MediaItem
import androidx.media3.common.util.UnstableApi
import androidx.media3.exoplayer.ExoPlayer
Expand Down Expand Up @@ -60,6 +61,7 @@ fun VideoPlayer(modifier: Modifier, url: String) {
ExoPlayer.Builder(context).build().apply {
setMediaItem(MediaItem.fromUri(url))
repeatMode = ExoPlayer.REPEAT_MODE_OFF
setWakeMode(C.WAKE_MODE_LOCAL)
playWhenReady = true
prepare()

Expand Down
4 changes: 2 additions & 2 deletions releaseVersion
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
0.1.2
https://github.com/dadencukillia/animeplayerua/releases/tag/v0.1.2
0.1.3
https://github.com/dadencukillia/animeplayerua/releases/tag/v0.1.3

0 comments on commit eb1a349

Please sign in to comment.