-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
<a-image> keeps running videos after changing src #3615
Comments
Hi i tried experimenting with this:
The video elements are created and cached in Should i make it into a PR, or wait for some feedback regarding the branch ? |
My two cents: If you mean using a video by selector reference, you have to stop the video yourself, when you change the src, a-image should stop using it but does not manipulate it (since it doesn't really own it) If you mean by src, then since a video element is created to use it, really a-image should stop and discard the video when src changed (assuming there is no other reference to it) which it probably doesn't (and I would consider a bug) |
@machenmusik here its the second case, where the |
The main repo still has this issue. @gftruj ( Hi from years and years in the future) any chance you still have a branch with a working fix? The link is now dead and the fiddles have the same issue when using the most recent aframe version. |
@pdbeard I have no clue what happened to the branch, and I'm afraid I'm a bit too busy to re-create it, but I can offer a workaround, which should be working properly if you wait for a video to load before switching (because even if an old one is cached, the new one will be created and play in the background ). You could also load the videos in threejs, omitting the material system at all. |
setting the
src
to an<a-image>
at runtime to a video and then later to an image the image is loaded but the video keeps playing in the backgroundThe text was updated successfully, but these errors were encountered: