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

音频资源加载报错 #70

Open
jamesliu96 opened this issue Jul 13, 2021 · 0 comments
Open

音频资源加载报错 #70

jamesliu96 opened this issue Jul 13, 2021 · 0 comments
Assignees
Labels
enhancement New feature or request
Projects

Comments

@jamesliu96
Copy link

jamesliu96 commented Jul 13, 2021

XhrLoadStrategy.setExtensionXhrType('mp3', XhrResponseType.Buffer)

如果资源URL中没有有效后缀(通过resource-loadergetExtension方法获得),会导致默认使用text格式,而非arraybuffer返回,加载音频报错

if there isn't a valid extension within the resource URL (returned by getExtension function of third-party resource-loader module), it will load using text by default, instead of arraybuffer, and there we are getting an error

Failed to execute 'decodeAudioData' on 'BaseAudioContext': parameter 1 is not of type 'ArrayBuffer'.

建议如果设置资源type字段为audio,强制使用arraybuffer

i suggest if user sets the resource's type field to audio, use arraybuffer to parse fetched data rather than let the third-party module determine by itself (code)

@lidongjies lidongjies added this to To do in Workflow via automation Jul 14, 2021
@lidongjies lidongjies added the enhancement New feature or request label Jul 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

No branches or pull requests

2 participants