0

I need to play a video located on my computer inside the PHP code using the embed tag. My code looks like this:

echo "<embed src='".$filename."' type='video/avi' autostart=false >";

When I run this code on google chrome, it says that the plugin is not supported. How can I resolve the issue? Please note that the video is not located in the Website folder. They are located in some folder outside the website folder. Is it possible to play the video using this scenario? And what do I need to make it work in chrome(Any plugin which needs to be installed)?

Mohammed Wahed Khan
  • 836
  • 2
  • 14
  • 35
Hassan Abbas
  • 1,166
  • 20
  • 47
  • Do you want to embed youtube video or some other 3rd party video? send me the video link – Amit Gupta Nov 29 '17 at 14:11
  • Unfortunately chrome seems to having this issue of playing videos from embed code. I also tried at my end but of no use. This issue seems to come for everyone https://productforums.google.com/forum/#!topic/chrome/SHHX5I4xc0w – Amit Gupta Nov 29 '17 at 14:29
  • Why do you "need" to use the `embed` tag, what's wrong with the `video` tag? – Josh Lee Nov 29 '17 at 14:30
  • @JoshLee, well the video tag takes a url from the same folder of the website and i need it to play the video from my the server hard disk since its on LAN. I am not sure how to do it with the video tag taking the source from the server hard disk. it would be nice if you can post the code regarding it. Also if i use video tag it implicitly adds my domain url before the source thinking that it should find the video on that website folder. – Hassan Abbas Nov 30 '17 at 06:31
  • @AmitGupta, Yes they are third party videos not the youtube ones. – Hassan Abbas Nov 30 '17 at 06:32
  • @AmitGupta, It does not work on firefox as well. – Hassan Abbas Nov 30 '17 at 06:40
  • @HassanAbbas I will try to find the solution for it and will let you know. – Amit Gupta Nov 30 '17 at 09:39
  • https://stackoverflow.com/questions/14052473/go-to-local-url-with-javascript https://stackoverflow.com/questions/23969953/not-allowed-to-load-local-resource-file-c-jpg-java-ee-tomcat https://stackoverflow.com/questions/39007243/cannot-open-local-file-chrome-not-allowed-to-load-local-resource – Josh Lee Nov 30 '17 at 16:28

0 Answers0