A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://cloudinary.com/documentation/cloudinary_video_player below:

HTML5 Video Player with HLS and Video Transformations

The Cloudinary Video Player is a JavaScript-based HTML5 video player bundled with many valuable customization and integration capabilities, and is monetization and analytics-ready. The player has a lightweight bundle size with tree-shaking and lazy-loading of modules for optimal performance. It's fully responsive for use in any device or screen size, and is integrated with Cloudinary's video delivery and transformation solution.

The player is fully WCAG 2.1 AA compliant, ensuring that users with visual, auditory, motor, and cognitive impairments can fully engage with your videos using assistive technologies, keyboard navigation, and other accessibility-friendly enhancements. See our dedicated accessibility page to learn more about other Video Player accessibility features.

This guide describes cloudinary-video-player version 3.0.2.

As of version 3.0.0, the video player is optimized for better performance:

See also:

Cloudinary supports only the documented configuration and the supplied files with the video player. Any direct changes to the player code and its elements (for example, CSS and JS files) might break its functionality, and will not be supported.

Live example

Before you embed a Cloudinary video player in your own website or mobile app, take a look at some sample video player code and the video player that results from it.

Alternatively, design and customize your video player with Cloudinary Video Player Studio.

For this simple example, a video tag and short bit of JavaScript creates a responsively resizing video player that plays a single video. The video is muted when loaded and includes basic controls.

Video player features

The Cloudinary video player is a feature-rich HTML5-based video player. This section summarizes its main functionality.

Installation

Install the library as a module using your package manager or include the video player in your application via CDN.

Option 1: Install the video player and import as a module
  1. Install the cloudinary-video-player:

  2. Import the video player as a module and import the CSS file:

    To keep the package size as light as possible, the video player module includes only basic functionality. To use additional functionality, you need to import the relevant module(s) as well.

    For example:

Available modules The 'all' module

If you intend to use the majority of the above features, you can optionally include the video player using just the all module, which includes all available modules as listed above.

For example:

Option 2: Include the video player directly from a CDN provider

The Cloudinary Video Player script should be included on all pages or views of your application where the video player is used. The player is available in either minified or non-minified formats.

The package includes all functionality described in this video player documentation. Core functionality is loaded initially, with additional features loaded lazily when they are used in your video player instance.

Non-minified Minified JavaScript cld-video-player.js cld-video-player.min.js CSS cld-video-player.css cld-video-player.min.css

The version numbers used above are the latest tested versions at the time of publishing this page. It's recommended to test the latest available versions of the video player and update the version numbers in your code accordingly.

Option 3: Embed a cloud hosted player

A cloud hosted player uses an iframe to embed a fully functioning player with all relevant configuration and dependencies already included. To include a cloud hosted player instance on your page using an iframe, create and configure your player using the Video Player Studio or build the iframe manually.

Here is an example of how the embeddable iframe code will look:

Setup

To create a video player instance, invoke the cloudinary.videoPlayer method. Provide either the HTML element of your video player or its ID, along with the cloud name associated with your product environment. You can also include any additional options. For example:

Once the video player is instantiated, use the source method to load a video. Provide either the public ID or the raw URL of the video you want to load. For example:

Video Player Studio

Use the Video Player Studio to create and customize a video player instance or define a player profile and easily copy and paste the required code into your website or application. The studio includes features that enable you to:

Live streaming

Use the Cloudinary video live streaming API to create and manage live streams that you can then use with the Video Player.

Once you've created a live stream, you can set the video player source to the hls output URI:

Alternatively, you can take the public ID of the hls output and set the type parameter to live when defining your source, making sure to set hls as your source type, for example:

Video Player samples

You can view sample HTML and JavaScript code for the features described in this guide in the Cloudinary Video Player Samples.

Below you can find code explorers showing a basic example with a Video Player component for both React and Angular.

React sample

This code is also available in GitHub.

Angular sample

This code is also available in GitHub.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4