Skip to content

[bug] Illegal customType: xxx 错误 #801

@topgame123com

Description

@topgame123com

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]"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions