Skip to content

revesis/audioc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AudioC JavaScript Library.

amrnb.js Ported opencore-amr-0.1.6.tar.gz using emscripten tool.

Build:

  1. npm run build
  2. cd build
  3. sh build.sh

Usage:

  • AudioC(): Pure front-end decoding and playback of audio without server support. The mainstream audio file formats supported by default include MP3, WAV, OGG, and AMR. Different browsers offer varying levels of support for these four formats, with MP3 providing the best compatibility.
    • Usage:
      var audio = new AudioC();
      audio.loadBlob(blob); // return Promise
      audio.loadUrl(url); // return Promise
      
      var totalTime = audio.getTotalTime();
      var currentTime = audio.getCurrentTime();
      
      audio.setGainValue(value); // 0 ~ 1.5
      audio.setPlaybackRate(pr); // 0.5 1 1.5 2
      
      audio.isPaused();
      
      audio.play();
      audio.pause();
      
      audio.skip(offset);
      
      audio.onEnded(callback);

ko-fi

About

Pure front-end decoding and audio playback without server support. The mainstream audio file formats supported by default include AMR, MP3, WAV, AAC, OGG, FLAC, and OPUS. Different browsers support the three formats to varying degrees. Among them, the MP3 format supports the best

Topics

Resources

License

Stars

Watchers

Forks

Contributors