【问题标题】:Three.js: video Texture NeedsUpdate stop rendering三.js:视频Texture NeedsUpdate停止渲染
【发布时间】:2015-04-16 14:35:22
【问题描述】:

我尝试将视频作为纹理放在网格上,为此,我测试了 2 个不同的示例:

http://jeromeetienne.github.io/threex.videotexture/examples/videotexture.html

http://stemkoski.github.io/Three.js/Video.html

两者都在网络上按预期工作,但如果我从本地的 github 下载它们,它不会显示任何内容。

如果我放了

videoTexture.needsUpdate = false;

然后显示楼层和屏幕。 视频正常播放,我可以听到后面的声音,但没有显示图像。

知道如何解决这个问题吗?

(我已经用 firefox 和 chromium 测试过)。

编辑: 在Firefox的控制台中,我有这个

SecurityError: The operation is insecure. Three.js:25696:0
Error: WebGL: The canvas used as source for texImage2D here is tainted (write-only). It is forbidden to load a WebGL texture from a tainted canvas. A Canvas becomes tainted for example when a cross-domain image is drawn on it. See https://developer.mozilla.org/en/WebGL/Cross-Domain_Textures

【问题讨论】:

    标签: javascript three.js html5-video


    【解决方案1】:

    问题和我想的完全不同。

    当我从本地文件夹而不是本地服务器运行文件时,我遇到了Same-Origin Policy 问题。

    正如这个答案中的解释: https://stackoverflow.com/a/24042463/1224782

    【讨论】:

      猜你喜欢
      • 2019-02-11
      • 1970-01-01
      • 2013-10-17
      • 2019-01-12
      • 2012-08-10
      • 2013-02-18
      • 2020-04-11
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多