Video not playing in video.js but direct link works

user2733332 Source

I am new to video.js and trying to figure this out. I am trying to load videos onto my site self hosting. below is the code I am using. I do not know what I am doing wrong, maybe the source src= is off. I do not know. I get a "No video with supported format or MIME type found (which I know Firefox has problems with mp4).

<div style="overflow:hidden; margin: 0; padding: 0;">
        <link href="video-js.css" rel="stylesheet">
        <script src="video.js"></script>
        <video id=my_video_1" class="video-js vjs-default-skin" controls
          preload="none" width="266" height="150" poster="images/BrattyGirls/BrattyPreview.jpg"
          <source src="../images/BrattyGirls/Previews/"  type="video/mp4">

Above is in a VideoPreviews.php that is loaded to my ftp server. Below is the code I am trying to put on my page to host the video. The video plays when going directly to the link. Also is that correct in the above code for the source src= to be able to use the same code with different videos starting off with that directory but ending in a different title, i.e. /images/BrattyGirls/Previews/vid1 /images/BrattyGirls/Previews/vid2 etc.

 <object data="" type="text/html" width="300" height="240" style="overflow: hidden; height: 256px; width: 314px;">


answered 5 years ago misterben #1

You need to specify a video file, not a directory containing your videos.

<source src=""  type="video/mp4">

comments powered by Disqus