如何在帧停止之前从头开始重新启动视频球?
How to restart a videosphere from the beginning before it stops in aframe?
我需要在暂停视频球后从头开始重新启动它。有什么想法吗?
<a-assets>
<video id="myVideo" src="myvideo.mp4"></video>
</a-assets>
<a-videosphere src="#myVideo"></a-videosphere>
document.querySelector('#myVideo').pause();
// Now how to restart?
我不知道如何重置 videosphere。
https://aframe.io/docs/0.3.0/components/material.html#video-textures
To control the video playback such as pausing or seeking, we can use the video element to control media playback. For example:
var videoEl = document.querySelector('#my-video');
videoEl.currentTime = 122; // Seek to 122 seconds.
videoEl.pause();
This doesn’t work as well if you are passing an inline URL, in which case a video element will be created internally. To get a handle on the video element, we should define one in .
我需要在暂停视频球后从头开始重新启动它。有什么想法吗?
<a-assets>
<video id="myVideo" src="myvideo.mp4"></video>
</a-assets>
<a-videosphere src="#myVideo"></a-videosphere>
document.querySelector('#myVideo').pause();
// Now how to restart?
我不知道如何重置 videosphere。
https://aframe.io/docs/0.3.0/components/material.html#video-textures
To control the video playback such as pausing or seeking, we can use the video element to control media playback. For example:
var videoEl = document.querySelector('#my-video');
videoEl.currentTime = 122; // Seek to 122 seconds.
videoEl.pause();
This doesn’t work as well if you are passing an inline URL, in which case a video element will be created internally. To get a handle on the video element, we should define one in .