new: implement web audio player with support for js and wasmJs platforms

This commit is contained in:
2026-06-16 17:55:49 +02:00
parent 1de2d43b3b
commit 8fb8ea24cf
9 changed files with 65 additions and 58 deletions
+9
View File
@@ -48,6 +48,15 @@ kotlin {
implementation(project.dependencies.platform(libs.koin.bom))
implementation(libs.koin.core)
}
// webMain is the js + wasmJs intermediate source set from the default hierarchy template.
webMain.dependencies {
// Browser audio (HTMLAudioElement, document) for js + wasmJs
implementation(libs.kotlinx.browser)
}
wasmJsMain {
// HTMLAudioElement interop on Wasm requires this opt-in.
languageSettings.optIn("kotlin.js.ExperimentalWasmJsInterop")
}
commonTest.dependencies {
implementation(libs.kotlin.test)
}