Answer the question
In order to leave comments, you need to log in
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>
Answer the question
In order to leave comments, you need to log in
Raise your streaming server.
Like a module for nginx, or one of these
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question