locked
HTML 5 Video.js RRS feed

  • Question

  • User1771308999 posted

    I want to use video.js on my website. With the following codes:

    <video id="example_video_1" class="video-js vjs-default-skin"
      controls preload="auto" width="640" height="264"
      poster="http://video-js.zencoder.com/oceans-clip.png"
      data-setup='{"example_option":true}'>
     <source src="http://video-js.zencoder.com/oceans-clip.mp4" type='video/mp4' />
     <source src="http://video-js.zencoder.com/oceans-clip.webm" type='video/webm' />
     <source src="http://video-js.zencoder.com/oceans-clip.ogv" type='video/ogg' />
     <p class="vjs-no-js">To view this video please enable JavaScript, and consider upgrading to a web browser that <a href="http://videojs.com/html5-video-support/" target="_blank">supports HTML5 video</a></p>
    </video>

    It works fine -- however, if I make a small tweak in the src section like this:

    <video id="example_video_1" class="video-js vjs-default-skin vjs-big-play-centered" controls preload="auto" width="640" height="264" poster="http://video-js.zencoder.com/oceans-clip.png">
        <source src="@fullVidPath" type='video/mp4' />
        <p class="vjs-no-js">To view this video please enable JavaScript, and consider upgrading to a web browser that <a href="http://videojs.com/html5-video-support/" target="_blank">supports HTML5 video</a></p>
    </video>

    Note: all the videos uses .mp4 format -- they previously work well with jwplayer -- but I want to switch them to HTML5 due to better compatibility.

    Any assistance would be greatly appreciated.

    Many thanks in advance!

    Tuesday, February 3, 2015 1:06 PM

Answers

  • User1771308999 posted

    I figured it out -- the folder where I stored all the videos is a network folder.

    The pathway to that folder is important and I did not direct the pathway to the actual location of that folder.

    My apologies.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, February 3, 2015 2:16 PM

All replies

  • User753101303 posted

    Hi,

    Use "view source" in your browser and compare the markup. Is the src path correct?

    Tuesday, February 3, 2015 1:54 PM
  • User1771308999 posted

    I figured it out -- the folder where I stored all the videos is a network folder.

    The pathway to that folder is important and I did not direct the pathway to the actual location of that folder.

    My apologies.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, February 3, 2015 2:16 PM
  • User1771308999 posted

    Thank you, your questions helped me look into area that I didn't consider such as the pathway.

    Tuesday, February 3, 2015 2:17 PM