huaweicloud / huaweicloud-sdk-browserjs-obs

Apache License 2.0
31 stars 23 forks source link

浏览器引入esdk-obs-browserjs-without-polyfill-3.21.8.min.js后,依然找不到ObsClient对象 #21

Open tclxjiaxing-huang opened 2 years ago

tclxjiaxing-huang commented 2 years ago

1.从github下载华为云obs最新代码 2.本地安装编译后,生成了dist文件夹 3.复制里面dist/@cloud/esdk-obs-browserjs-without-polyfill-3.21.8.min.js文件,引入到项目中 4.在项目中new ObsClient() 报错 Uncaught ReferenceError: ObsClient is not defined

noaccident commented 2 years ago

从问题描述初步看,应该是编译的问题。推荐使用npm安装使用,如果非要静态引入的话,可以引用该文件 esdk-obs-browserjs.3.22.3.min.js