I want to play a video in the path of a file located in the hard disk out apatch server from a php file in the apatch server, knowing that I am using xampp, I tried to write the code as follows.
<?php
$src="file://E:/Vtest/Fle.mp4";
?>
<video src="<?php echo $src;?>" autoplay controls style="width:50%;height:50%;"></video>
But not working. What to i do?
CodePudding user response:
You should look into a tutorial similar to this. I think you need to stream the video from you server, PHP HTML5 Video Streaming Tutorial
Also I think the src should point to the web location of the file for example: $src="localhost/Fle.mp4" the path will depend on your exact location of the file. Been a while since writing PHP but hope that helps