Reputation: 1
I have a website with Laravel and I want to insert a video (mp4) but the video not working.
place the video in the public directory and in storage / public / video call it with:
<video src="videos/people.mp4" autoplay="" loop=""></video>
Upvotes: 0
Views: 808
Reputation: 71
Something is missing in your code, change it to:
<video controls width = "500">
<source src = "{{asset ('videos/people.mp4')}}" type="video/mp4"></video>
• If you want an auto-read, add "autoplay muted" :
<video autoplay muted controls width = "500">
<source src = "{{asset ('videos/people.mp4')}}" type="video/mp4"></video>
• And finally, if you want autoplay and repeat, add "loop" :
<video autoplay muted loop controls width = "500">
<source src="{{asset ('videos/people.mp4')}}" type="video/mp4"></video>
Upvotes: 1