Skip to content
/ audioc Public

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

License

Notifications You must be signed in to change notification settings

revesis/audioc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 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, and different browsers have different levels of support for these three formats. The MP3 format has the best support among them
    • 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

Releases

No releases published

Packages

No packages published