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

fix: align WebAudioContext.decodeAudioData signature with weapp doc #17081

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

BH4HPA
Copy link

@BH4HPA BH4HPA commented Dec 25, 2024

…at docs

Updated the decodeAudioData method in WebAudioContext to match the official WeChat Mini Program documentation:

  • Modified the return type to Promise<AudioBuffer> instead of AudioBuffer, because of this method' actual response.
  • Adjusted method parameters to accept audioData, successCallback, and errorCallback.

This fixes the TypeScript error and aligns the implementation with the expected API behavior. Closes #17080

这个 PR 做了什么? (简要描述所做更改)
修复了 WebAudioContext.decodeAudioData 的签名

这个 PR 是什么类型? (至少选择一个)

这个 PR 涉及以下平台:

  • 所有小程序
  • 微信小程序
  • 支付宝小程序
  • 百度小程序
  • 字节跳动小程序
  • QQ 轻应用
  • 京东小程序
  • 快应用平台(QuickApp)
  • Web 平台(H5)
  • 移动端(React-Native)
  • 鸿蒙(harmony)

…p docs

Updated the `decodeAudioData` method in `WebAudioContext` to match the official WeChat Mini Program documentation:
- Modified the return type to `Promise<AudioBuffer>` instead of `AudioBuffer`, because of this method' actual response.
- Adjusted method parameters to accept `audioData`, `successCallback`, and `errorCallback`.

This fixes the TypeScript error and aligns the implementation with the expected API behavior.
Closes NervJS#17080
This was referenced Dec 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Taro.WebAudioContext.decodeAudioData API 函数签名错误,实现方法不明确
1 participant