From this topic HTML5 audio element with dynamic source I use this part of code very well:
<audio id="player" controls="controls" autoplay="true" loop="loop"><source src="song.php" type="audio/mpeg" /> </audio>
song.php:
$file = "something.mp3";
header("Content-Type:audio/mpeg");
header("Content-LEngth:".filesize($file));
readfile($file);
Now I want to do the same with videos mp4.
<video autoplay="true" controls src="video.php" type="video/mp4"></video>
video.php:
$file = "something.mp4";
header("Content-Type:video/mp4");
header("Content-LEngth:".filesize($file));
readfile($file);
but this doesn't work, the video isn't playing. Any idea how I can prevent to deliver the URL to the video ?