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

work.js 中执行new Image报错:Image is not defined #44

Closed
7956968 opened this issue Jul 28, 2021 · 0 comments
Closed

work.js 中执行new Image报错:Image is not defined #44

7956968 opened this issue Jul 28, 2021 · 0 comments

Comments

@7956968
Copy link

7956968 commented Jul 28, 2021

this.setVideoSize函数中添加如下代码,

var img = new Image();
img.onload = function () {
console.log('img loaded');
}
img.src = "data:image/png;base64,...";

浏览器提示“Image is not defined”, 而在其他js中运行则不会有这个错误,看起来是和wasm运行环境有关。work.js中其他地方运行同样如此。

请问如何配置才能在setVideoSize中执行Image加载?

@7956968 7956968 closed this as completed Jul 29, 2021
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

No branches or pull requests

1 participant