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

This commit is contained in:
Antoine Jaury committed 2026-07-07 22:05:18 +02:00
1 parent 1de2d43b3b
commit 8fb8ea24cf
9 files changed
+65 -58

No files matched your search

+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)
}