【发布时间】:2018-09-27 23:45:03
【问题描述】:
我正在尝试更改 aframe 中 videosphere 的 src 属性
<a-assets>
<video id="vid" src="videos/vid1.mp4" webkit-playsinline loop></video>
</a-assets>
<a-videosphere src="#vid" rotation="0 180 0"></a-videosphere>
我目前正在使用以下方法更改#vid 资产的源代码:
document.querySelector("#vid").setAttribute("src", "videos/vid2.mp4");
document.quertSelector("a-videosphere").play();
但是视频仍然冻结并且播放函数返回 undefined
感谢您的帮助:)
【问题讨论】:
标签: aframe