Skip to content
the poor coder

videojs cdn

Poor Man
Published
Reading time
2 min read
On this page

What is Video.js CDN?#

If you are looking for a reliable way to host your videos online, then Video.js CDN is a great option. It is a content delivery network that provides fast and efficient access to your videos from anywhere in the world. The Video.js player is an open-source HTML5 video player that supports a wide range of video formats and allows you to embed videos on your website or blog. Using Video.js CDN makes it easy to host your videos and ensures that your viewers have a smooth and uninterrupted viewing experience.

How to use Video.js CDN#

To use Video.js CDN, you first need to add the Video.js player to your website or blog. You can do this by adding the following HTML code to your webpage:

Text
<link href="//vjs.zencdn.net/7.10.2/video-js.css" rel="stylesheet" />
<script src="//vjs.zencdn.net/7.10.2/video.min.js"></script>

This code includes the necessary CSS and JavaScript files for the Video.js player to work. Once you have added this code to your webpage, you can then add your video by including the following HTML code:

Text
<video id="my-video" class="video-js" controls preload="auto" width="640" height="264"
  poster="MY_VIDEO_POSTER.jpg" data-setup="{}">
    <source src="MY_VIDEO.mp4" type='video/mp4'>
    <source src="MY_VIDEO.webm" type='video/webm'>
    <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>

This code creates a video player with the ID "my-video" and includes two different video sources, one in MP4 format and one in WebM format. You can add additional video sources if you want to support even more formats.

Alternative ways to use Video.js#

While Video.js CDN is a great option for hosting your videos, there are also other ways to use the Video.js player. You can download the Video.js source code and host it on your own server, or you can use a hosting service like Amazon S3 or Vimeo to host your videos. Additionally, there are many plugins available for Video.js that provide additional features and functionality, such as subtitles, playlists, and analytics.

Conclusion#

Video.js CDN is a reliable and efficient way to host your videos online. By using the Video.js player, you can easily embed videos on your website or blog and ensure that your viewers have a smooth and uninterrupted viewing experience. Whether you choose to use Video.js CDN or another hosting option, the Video.js player is a great tool for hosting and sharing your videos online.

Keep going

2023

how to sort an array

How to Sort an Array If you have an array and you want to order its elements in a specific way, you need to use a sorting algorithm. There are several sorting algorithms available, but two of the most commonly used are…

javascript2 min read
2023

jquery mobile or desktop

jQuery Mobile or Desktop? As a web developer, I have had some experience with both jQuery Mobile and jQuery Desktop. Both frameworks have their pros and cons, and which one to use really depends on the specific project…

javascript1 min read
2023

node.js folder structure

Node.js Folder Structure If you are new to Node.js, it can be daunting to create a folder structure that will work for your project. The structure you choose will depend on the size and complexity of your project. Here…

javascript1 min read
ESC