Skip to content

Commit

Permalink
change: param debug of DanmakuVideoPlayer
Browse files Browse the repository at this point in the history
  • Loading branch information
muedsa committed Sep 19, 2024
1 parent 329c8db commit 36572f1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,19 @@ import com.kuaishou.akdanmaku.data.DanmakuItemData
import com.kuaishou.akdanmaku.render.SimpleRenderer
import com.kuaishou.akdanmaku.ui.DanmakuPlayer
import com.kuaishou.akdanmaku.ui.DanmakuView
import com.muedsa.uitl.AppUtil
import kotlin.random.Random

@SuppressLint("OpaqueUnitKey")
@OptIn(UnstableApi::class)
@Composable
fun DanmakuVideoPlayer(
debug: Boolean = false,
debug: Boolean = AppUtil.debuggable(LocalContext.current),
danmakuConfigSetting: DanmakuConfig.() -> Unit = {},
danmakuPlayerInit: DanmakuPlayer.() -> Unit = {},
videoPlayerBuilderSetting: ExoPlayer.Builder.() -> Unit = {},
videoPlayerInit: ExoPlayer.() -> Unit,
) {

val context = LocalContext.current

val playerControlTicker = remember { mutableIntStateOf(0) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import com.muedsa.compose.tv.useLocalToastMsgBoxController
import com.muedsa.compose.tv.widget.player.DanmakuVideoPlayer
import com.muedsa.compose.tv.widget.player.mergeDanmaku
import com.muedsa.model.LazyType
import com.muedsa.uitl.AppUtil
import com.muedsa.uitl.LogUtil
import kotlinx.coroutines.delay
import kotlin.math.max
Expand Down Expand Up @@ -124,7 +123,6 @@ fun PlaybackScreen(
val danmakuSetting = danmakuSettingLD.data!!

DanmakuVideoPlayer(
debug = if(activity != null) AppUtil.debuggable(activity.applicationContext) else false,
danmakuConfigSetting = {
textSizeScale = danmakuSetting.danmakuSizeScale / 100f
alpha = danmakuSetting.danmakuAlpha / 100f
Expand Down

0 comments on commit 36572f1

Please sign in to comment.