DIYgod / DIYgod/APlayer

[bug] Illegal customType: xxx 错误

Open
#801 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
7.7k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

APlayer v1.10.1 af84efb

当用户使用customAudioType自定义解释时, 如果函数定义为 async function, 由于代码使用:
"[object Function]" === Object.prototype.toString.call (customAudioTypeFn)
判断是否存在函数, 此处为false导致报错

Illegal customType: xxx

因为
Object.prototype.toString.call (function(){}) 返回值为 "[object Function]"
Object.prototype.toString.call (async function(){}) 返回值为 "[object AsyncFunction]"

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.