init projects
This commit is contained in:
@@ -0,0 +1 @@
|
||||
build
|
||||
@@ -0,0 +1,20 @@
|
||||
plugins {
|
||||
alias(libs.plugins.convention.kmp)
|
||||
alias(libs.plugins.convention.android.lib)
|
||||
alias(libs.plugins.convention.compose)
|
||||
alias(libs.plugins.convention.serialization)
|
||||
alias(libs.plugins.convention.koin)
|
||||
}
|
||||
kotlin {
|
||||
sourceSets {
|
||||
commonMain.dependencies {
|
||||
implementation(project(":libs:base"))
|
||||
implementation(project(":libs:video-player"))
|
||||
}
|
||||
androidMain.dependencies {
|
||||
}
|
||||
}
|
||||
android {
|
||||
namespace = "ru.shadowsparky.experimentarium.shared"
|
||||
}
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
package ru.shadowsparky.experimentarium.shared
|
||||
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.LaunchedEffect
|
||||
import androidx.compose.ui.Modifier
|
||||
import ru.shadowsparky.koin
|
||||
import ru.shadowsparky.videoplayer.PlayerController
|
||||
import ru.shadowsparky.videoplayer.ui.VideoPlayer
|
||||
|
||||
private val controller = koin.get<PlayerController>()
|
||||
|
||||
@Composable
|
||||
fun TestPlayer() {
|
||||
VideoPlayer(controller, modifier = Modifier.fillMaxSize())
|
||||
LaunchedEffect(controller) {
|
||||
controller.load("https://samplelib.com/mp4/sample-5s.mp4")
|
||||
controller.play()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user