NFPlayerJS: 基于 JavaScript/TypeScript 的高性能音频引擎

NFPlayerJS 是一款专为 Web 和服务器端设计的 JavaScript/TypeScript 音频引擎,具备多轨时间拉伸、音高转换、声明式效果等功能。相较于实时处理,NFPlayerJS 拥有更高的处理速度。

安装

使用 npm 安装 NFPlayerJS:

npm install --save nf-player

使用示例

import { SmartPlayer , TimeInstant } from 'nf-player' ; 
import * as ScoreJSON from './your-score.json' ;

( async function ( ) {
  // 创建播放器。默认情况下,它使用...
  const player = await SmartPlayer.fromScoreJSON( ScoreJSON ) ;

  // ...准备好了,你可以使用播放器了!
} )() ;

更多使用方法请参考官方文档:https://github.com/nordicgiant2/nf-player

zip 文件大小:4.21MB