Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Status of WebAssembly support #9

Open
AndrazP opened this issue Jul 8, 2024 · 3 comments
Open

Status of WebAssembly support #9

AndrazP opened this issue Jul 8, 2024 · 3 comments

Comments

@AndrazP
Copy link

AndrazP commented Jul 8, 2024

Hi,

I stumbled on your project when looking for a library that supports audio playback on Kotlin WASM.
README mentions WASM support is in the early stage, but does it work?

I had issues running your project. After cloning the project I had to:

  1. Update target Java from 11 to 17
  2. Change library destination because I can't find the library published on Maven.:
implementation(project(":astroplayer-core"))
implementation(project(":astroplayer-ui"))

Now when trying to run: ./gradlew wasmJsRun I get the following error:

Module parse failed: Unexpected token (3840:156)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| 'kotlinx.coroutines.clearTimeout' : (handle) => { if (typeof clearTimeout !== 'undefined') clearTimeout(handle); },
| 'kotlinx.coroutines.setTimeout_$external_fun' : (p0, p1) => setTimeout(p0, p1),
'com.deathsdoor.astroplayer.core.createHowlProperties' : (source, volume, html5, loop, preload, autoplay, mute, rate) => { src : ["source"] ,volume : volume, html : html5,loop : loop, preload : preload, autoplay : autoplay, mute : mute , rate : rate },
| 'com.deathsdoor.astroplayer.core.Howl_$external_fun' : (p0) => new ref_aG93bGVy.default(p0),
| 'com.deathsdoor.astroplayer.core.release_$external_fun' : (_this, ) => _this.unload(),

Copy link

github-actions bot commented Jul 8, 2024

Hi @AndrazP! 👋

Thank you for opening your first issue in the astroplayer-kt repository! We appreciate your interest in contributing to the project. Our community and maintainers will review your issue soon.

In the meantime, please make sure to:

  • Describe the issue clearly and provide as much context as possible.
  • Include any relevant code snippets or screenshots that might help us understand the issue better.

Thanks for helping us improve AstroPlayer!

@Deaths-Door
Copy link
Owner

Deaths-Door commented Jul 9, 2024

@andraz To be concise, does it work - I don't really know.

I haven't had the time to check the wasm target yet, but I've started checking the wasm target locally.

If you have any finds or fixes , please feel free to open a pull request.

Back to your message

Change library destination because I can't find the library published on Maven.:

As I mentioned in the README.md files that it's only published to maven local not maven , I used the composeApp module to test, whether the publishing works

And back to your error, I've been experiencing that as well , and I'm trying to fix it. My guess is that the web doesn't allow accessing local files using a file path

Reference goldfire/howler.js#724 (comment)

Copy link

github-actions bot commented Sep 8, 2024

Stale issue message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants