# Video auto play?

**URL:** <https://forum.8thwall.com/t/video-auto-play/651>\
**Category:** Technical Support\
**Tags:** image-targets, video\
**Created:** [March 8, 2024, 10:23pm UTC](https://forum.8thwall.com/t/video-auto-play/651 "2024-03-08T22:23:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ze\_ev\_Gilad](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.8thwall.com/ze_ev_gilad/32/294_2.png) [@Ze\_ev\_Gilad](https://forum.8thwall.com/u/Ze_ev_Gilad)\
**Post date:** [March 8, 2024, 10:23pm UTC](https://forum.8thwall.com/t/video-auto-play/651/1 "2024-03-08T22:23:37Z")

</div>

I have a video with an image target … in `<a-assets>` the `<video>` has `autoplay` but it is not autoplaying.

How can I get it to start playing as soon as target is recognized?

`<video id="house" src="assets/house.mp4" autoplay muted crossorigin="anonymous" loop="true" />`

---

<div class="post-metadata">

**Author:** ![Ian](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.8thwall.com/ian/32/430_2.png) [@Ian](https://forum.8thwall.com/u/Ian)\
**Post date:** [March 9, 2024, 12:59am UTC](https://forum.8thwall.com/t/video-auto-play/651/2 "2024-03-09T00:59:15Z")

</div>

Hello @Ze_ev_Gilad you can reference the sample projec here:

> **[Magic Photos | 8th Wall | 8th Wall](https://www.8thwall.com/8thwall/magic-photos-aframe/code/body.html)**
>
> This uses a custom component called "target-video-fade.js" to fade in videos that autoplay + loop when found and hide when lost.

Or write a custom componen that plays a video on xrimagefound event
