Video.js with an empty source

Anyway, can I host video.js without setting the source to the video tag? Video.js does not start without source.

I want to post video.js without a source and set the humor from js api later.

the same question here, but no one answered. VideoJS without source?

+4
source share
1 answer

Use preload="none"for video element

<video id="my_video" controls preload="none" class="video-js vjs-default-skin" data-setup="{}" />

Then download the API

videojs("my_video").src([
  { type: "video/mp4", src: "http://vjs.zencdn.net/v/oceans.mp4" },
  { type: "video/webm", src: "http://vjs.zencdn.net/v/oceans.webm" }
]);
+6
source

All Articles