Reputation: 355
I am using
<a--assets>
<video id="penguin-sledding" autoplay loop="true" src="v.mp4">
</a-assets>
assets,Now how can i mute this video by code
<a-video src="#penguin-sledding" width="16" height="9" position="0 0 -20"></a-video>
Upvotes: 0
Views: 1809
Reputation: 630
You can use this to change it by code:
$("video").prop('muted', true);
Upvotes: 0
Reputation: 31
You can use some html5 video controls, though not all will work. Luckily "muted" easily does the trick. Also, you have an extra hyphen in <a-assets>
you need to remove. The following code will play a muted video.
<a-assets>
<video muted id="penguin-sledding" autoplay loop="true" src="v.mp4">
</a-assets>
<a-video src="#penguin-sledding" width="16" height="9" position="0 0 -20"></a-video>
Upvotes: 3