1

I'm trying to load a video from another PHP file so it will be like my main playlist

video code:

<video id="video" class="video-js" controls="" preload="none" data-setup="{}">
<source src="v.php?video=[video id in playlist]" type="video/mp4">
</video>

For v.php the code is

<?php 

$video = $_GET['video'];

if($video == 1) echo "https://lh3.googleusercontent.com/Ev9OED5LnZLILAXH_RaOS0Ytdq_LDDglugy_7XmeYJb49Cr5lA7wWQ8XTYIuuagfX74-mgcBDw=m22";
//next video....
?>

But it will not load the video.?

P.S. the video is online to test the code

nerdlyist
  • 2,842
  • 2
  • 20
  • 32
  • Have you checked your error logs? – Jay Blanchard Jun 24 '16 at 17:22
  • it's don't see the video link i get: `log.js:79 VIDEOJS: ERROR: (CODE:4 MEDIA_ERR_SRC_NOT_SUPPORTED) The media could not be loaded, either because the server or network failed or because the format is not supported.` but when entering the link by localhost:80/v.php?video=1 it show's the link – Alexander Ayzin Jun 24 '16 at 17:28
  • I'd guess the php script called by the video src must send back the actual file stream instead of a link? Check this: http://stackoverflow.com/questions/24596450/play-mp4-file-through-php-in-html5-video-tag-in-chrome – Lord Grosse Jeanine Jun 24 '16 at 21:46

0 Answers0