Web Development Articles - Page 163 of 801

How to play YouTube videos using Video.js player?

Prince Yadav
Updated on 04-Apr-2023 13:43:37

8K+ Views

In this tutorial, we're going to learn the procedure to play YouTube videos using the video.js player. Video.js is a very popular modern web video player which supports all the latest video formats including YouTube, Vimeo, etc. Now, we'll see how the video.js library can be used for playing YouTube videos using the 'videojs-youtube' package. For playing YouTube videos in the video.js player we need to install a package 'videojs-youtube' in our project. Installation of the package is very easy and can be done using bower or node package manager. Installing video.js YouTube Use the following command for installation of ... Read More

How to play QuickTime MOV files using the Video.js player?

Prince Yadav
Updated on 14-Nov-2022 06:58:56

4K+ Views

Video.js is an open-source, HTML5 web video player. It supports a variety of HTML5 media source extensions along with modern video playback technologies like YouTube, HLS Stream, etc. through plugins. Video.js supports video playback on a range of display sizes with a plethora of devices like desktops and mobile devices. In this tutorial, we're going to learn how to play the QuickTime MOV files using in our web browser using video.js. MOV is a very common video container used in Apple's QuickTime player for storing movies and video files. These containers use a compression algorithm designed by Apple Computer and ... Read More

How to play HLS stream in HTML5 player Video.JS?

Prince Yadav
Updated on 04-Apr-2023 13:38:57

20K+ Views

In this tutorial, we're going to learn how to play HLS stream in HTML5 video player using video.js. HTTP Live Streaming, also known as HLS Stream, is a HTTP-based communication protocol which used dynamic or adaptive bit rate for streaming videos. This protocol was developed and published by Apple Inc. in the year 2009 and a wide variety of media player, web browsers, mobile devices and streaming media players support this protocol. HLS has the benefit of being compatible with all Internet-connected devices, making it easier to adopt than streaming protocols that need the usage of specialist servers. Another advantage ... Read More

Can scripts be inserted with innerHTML?

Shubham Vora
Updated on 10-Nov-2022 07:40:37

9K+ Views

In this tutorial, we will learn that can scripts are inserted with innerHTML. There are various properties in JavaScript that help in working with the HTML of the current page. The innerHTML property in JavaScript is used to add the Html to the element. It also returns the content present in an element. Scripts are the programs or codes of JavaScript that makes a webpage interactive and dynamic. We can add the script in the script tag on the same page or another JavaScript page linked with an HTML file. The HTML is inserted in the innerHTML property for an ... Read More

How to fix broken images automatically in jQuery?

Shubham Vora
Updated on 21-Nov-2022 09:20:06

2K+ Views

In this tutorial, we will learn to fix broken images automatically in jQuery. Have you ever seen broken images while wondering on any website which shows only alternative text with the default icon of the broken image? Don’t you think it is a bad user experience? Obviously, it is. So, when you develop the application or website, you should write some JavaScript or jQuery code such that it can automatically replace broken images. Here, we will learn 2 to 3 different methods to fix broken images automatically using jQuery. Use the ‘onerror’ event inside the HTML ‘ ’ tag ... Read More

How to Create and Save text file in JavaScript?

Shubham Vora
Updated on 31-Oct-2023 12:50:40

117K+ Views

In this tutorial, we will learn to create and save the text file in JavaScript. Sometimes, developers need to get texts or content from the user and allow users to store content in a text file and allow the file to download to the local computer. Many JavaScript libraries are available to achieve our goal, but we have used the best two libraries in this tutorial to create and save the text file. Create a text file using custom text and save it to a local computer We will use normal JavaScript operations to create and save the text file ... Read More

How to play FLV videos using Video.js player?

Prince Yadav
Updated on 04-Apr-2023 12:46:26

3K+ Views

Video.js is a very popular library for creating a web video player for videos, which has been built on HTML5 from the scratch. Video.js supports all the basic video formats like mp4, WebM, Flv, etc. It is very effortless and straightforward to create a modern web video player in video.js for these various video types. However, the procedure is a little different for flv-type video formats. In this article we’re going to learn how to play the flv videos using the video.js web player. First, let’s start with how to create a basic web player in video.js using mp4 and ... Read More

How to Play .mp4 file using Video.js Player?

Prince Yadav
Updated on 08-Nov-2022 07:03:24

5K+ Views

In this tutorial, we're going to learn how to play an mp4 file using the video.js player library. Video.js is a very popular and modern web video player which has been developed keeping the HTML5 world in mind. It supports a wide range of video playback formats like mp4, webm, flv, etc., and other modern video formats also like YouTube, Vimeo, and Flash. Video.js also makes sure that the video player is consistent across all display sizes like desktop, computer, and mobiles. In this tutorial specifically, we'll have a look at creating a video player for our mp4 video files ... Read More

How to add subtitles in video using Video.js?

Prince Yadav
Updated on 08-Nov-2022 07:01:41

6K+ Views

In this tutorial, we're going to learn how to add subtitles to a video using the video.js library. Subtitles, often known as captions, are lines of speech or other text that appear at the bottom of the video. Adding subtitles to the video really enhances the video experience for the viewers who are deaf or hard-of-hearing. Adding subtitles using video.js is very easy and furthermore, video.js allows crossbrowser implementation of the subtitle. Let's learn how to add subtitles to our video using video.js in the next section of the video. How to Add Subtitles in Video Using Video.js? Subtitles, also ... Read More

Get the size of the screen, current web page and browser window in JavaScript

AmitDiwan
Updated on 01-Nov-2022 13:07:30

2K+ Views

To get the current screen size of a web page, use the window.inner. We can also use the window.outerWidth and window.outerHeight as shown below to get the outer width and height of the web browser windows. We will see two examples − Get the Inner Width and Height Get the Outer Width and Height Get the Inner Width and Height To get the current screen size of a web page, use the window.innerWidth and window.innerHeight − var wd = window.innerWidth; var ht = window.innerHeight; Example Let us see an example − DOCTYPE html> ... Read More

Advertisements