Skip to content

Intro1997/JsAudio-Android

Repository files navigation

C++17 NodeJS v14.17.0

Description

This project aims to run Web Audio API in Android with javascript code. Most of the available APIs have passed wpt test cases.

Now it supports following Web Audio feature:

Features Interface Support State Test State
AudioBuffer Static Badge Static Badge
AudioContext Static Badge Static Badge
AudioDestinationNode Static Badge Static Badge
AudioNode Static Badge Static Badge
AudioParam Static Badge Static Badge
AudioScheduledSourceNode Static Badge Static Badge
BaseAudioContext Static Badge Static Badge
OfflineAudioCompletionEvent Static Badge Static Badge
OfflineAudioContext Static Badge Static Badge
OscillatorNode Static Badge Static Badge
GainNode Static Badge Static Badge
DelayNode Static Badge Static Badge
AudioBufferSourceNode Static Badge Static Badge

more detail info is descript here.

Build & Run

  1. run npm install for installing dependency
  2. run npm start to get server address like http://xxx.xxx.xxx.xxx:20490
  3. open root folder with Android Studio
  4. add this line js_entry="http://xxx.xxx.xxx.xxx:20490/index.js" to local.property file
  5. build and run app

App Interface

After running app, you can see five buttons:

  1. START: Start running js code in index.js
  2. STOP: Stop js event loop. You need to press RESTART button to re-run js code.
  3. PAUSE: Pause js event loop.
  4. RESUME: Resume js event from pause.
  5. RESTART: Restart app.

NOTE: all console message in js code will be output to Android Studio Logcat.

Develop

see develop.md

Thanks

  1. The NodeJS runtime is base on node-android-build v14.17.0 release verison, Thanks!
  2. Test case based on wpt.
  3. NAPI_IH base on node-addon-api-helper.
  4. Use ProcessPhoenix to restart Android App.

About

Implement Web Audio by NAPI in Android

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published