1

I've stumbled upon this problem, while coding my project. I have this html that plays a video:

<video id="video" autoplay="autoplay">
    <source src="/videos/sample.mp4" type="video/mp4"></source>
</video>

Unfortuanately it is not starting the video.

However if i set the source of the video to be taken from the web (e.x.) http://techslides.com/demos/sample-videos/small.mp4 It plays the video correctly. Does anybody know what could be a trouble in here.

Łukasz Trzewik
  • 1,165
  • 2
  • 11
  • 26

1 Answers1

0

Try this

<video width="720" controls autoplay loop>
  <source src="sample.mp4" type="video/mp4">
  Your browser does not support HTML5 video.
</video>
Josh Lee
  • 171,072
  • 38
  • 269
  • 275
suhair
  • 1