A
A
andreys752020-07-08 11:25:12
Video
andreys75, 2020-07-08 11:25:12

How to include video in HTML from a local file with immediate launch?

Good afternoon!

I'm trying to add a video to an html page. Tried several variations. But there are several problems:
1. the video file is located on the same server as the html file, and it cannot be placed on some kind of streaming servers like youtube
2. Files of 100-250 megabytes in size

Connected with a native video tag and using the player
here is the code using the player

<body>
    <video
      id="my-video"
      class="video-js"
      controls
      preload="auto"
      width="640"
      height="264"
      poster="MY_VIDEO_POSTER.jpg"
      data-setup="{}"
    >
      <source src="../uploads/ca26ad77f5ed42939889819f54fa65d5.m4v" 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="https://videojs.com/html5-video-support/" target="_blank"
          >supports HTML5 video</a
        >
      </p>
    </video>
  
    <script src="https://vjs.zencdn.net/7.8.3/video.js"></script>
  </body>


The video only starts after it is completely loaded into memory on the local computer, and this requires a 3-4 minute wait.

How can this problem be solved ?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Stalker_RED, 2020-07-08
@Stalker_RED

Raise your streaming server.
Like a module for nginx, or one of these

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question