Giter Club home page Giter Club logo

marina9568 / video.js-hls-player-for-wordpress Goto Github PK

View Code? Open in Web Editor NEW

This project forked from star2dev/video.js-hls-player-for-wordpress

0.0 2.0 0.0 1.65 MB

Easily embed responsive/fluid (or fixed width) HLS videos into WordPress posts and pages using this customized video.js player. Embedding externally hosted .m3u8 HLS video files couldn't be easier.

Home Page: https://www.socialite-media.com/videojs-hls-player-for-wordpress

License: GNU General Public License v3.0

CSS 15.27% JavaScript 33.16% PHP 51.57%

video.js-hls-player-for-wordpress's Introduction

"Video.js HLS Player" for WordPress

Video.js HLS Player is a user-friendly plugin that allows you to easily embed responsive/fluid (or fixed width) HLS videos into WordPress posts and pages using this customized video.js player. Embedding externally hosted .m3u8 HLS video files couldn't be easier.

Video.js HLS Player Features

  • Embed HLS video package into a post/page or anywhere on your WordPress site
  • Embed responsive videos for a better user experience while viewing from a mobile device
  • Embed HTML5 videos which are compatible with all major browsers
  • Embed videos with poster images
  • Embed videos using videojs player
  • Automatically play a video when the page is rendered
  • Embed fallback videos uploaded to your WordPress media library using direct links in the shortcode
  • No setup required, simply install and start embedding videos
  • Lightweight and compatible with the latest version of WordPress
  • Clean and sleek player with no watermark
  • Fallback for other HTML5-supported filetypes (MP4, WebM, Ogv)

Video.js HLS Player Plugin Usage

In order to embed a video create a new post/page and use the following shortcode:

[videojs_hls url="https://player.vimeo.com/external/xxxxxxxxx.m3u8"]

Here, "url" is the location of the HLS video package file.

Video Shortcode Options

The following options are supported in the shortcode.

MP4

You can specify an MP4 video file in addition to the source HLS video file. This parameter is optional.

[videojs_hls 
ย  url="https://player.vimeo.com/external/xxxxxxxxx.m3u8" 
  mp4="http://example.com/wp-content/uploads/videos/myvid.mp4"
]

WebM

You can specify a WebM video file in addition to the source HLS video file. This parameter is optional.

[videojs_hls 
  url="https://player.vimeo.com/external/xxxxxxxxx.m3u8" 
  webm="http://example.com/wp-content/uploads/videos/myvid.webm"
]

Ogv

You can specify a Ogv video file in addition to the source HLS video file. This parameter is optional.

[videojs_hls 
  url="https://player.vimeo.com/external/xxxxxxxxx.m3u8" 
  ogv="http://example.com/wp-content/uploads/videos/myvid.ogv"
]

Width

Defines the width of the video file (Height is automatically calculated). This option is not required unless you want to limit the maximum width of the video.

[videojs_hls url="https://player.vimeo.com/external/xxxxxxxxx.m3u8" width="480"]

Preload

Specifies if and how the video should be loaded when the page loads. Defaults to "auto" (the video should be loaded entirely when the page loads). Other options:

  • "metadata" - only metadata should be loaded when the page loads
  • "none" - the video should not be loaded when the page loads
[videojs_hls url="https://player.vimeo.com/external/xxxxxxxxx.m3u8" preload="metadata"]

Controls

Specifies if video controls should be displayed. Defaults to "true". In order to hide controls set this parameter to "false".

[videojs_hls url="https://player.vimeo.com/external/xxxxxxxxx.m3u8" controls="false"]

When you disable controls users will not be able to interact with your videos. So It is recommended that you enable autoplay for a video with no controls.

Autoplay

Causes the video file to automatically play when the page loads.

[videojs_hls url="https://player.vimeo.com/external/xxxxxxxxx.m3u8" autoplay="true"]

Poster

Defines image to show as placeholder before the video plays.

[videojs_hls 
  url="https://player.vimeo.com/external/xxxxxxxxx.m3u8" 
  poster="http://example.com/wp-content/uploads/poster.jpg"
]

Loop

Loop to beginning when done and automatically start playing again.

[videojs_hls url="https://player.vimeo.com/external/xxxxxxxxx.m3u8" loop="true"]

Muted

Mute the audio output of the video.

[videojs_hls url="https://player.vimeo.com/external/xxxxxxxxx.m3u8" muted="true"]

iOS Inline

Force the video to play inline on iOS v10+

[videojs_hls url="https://player.vimeo.com/external/xxxxxxxxx.m3u8" inline="true"]

Installation

  1. Go to the Add New plugins screen in your WordPress Dashboard
  2. Click the upload tab
  3. Browse for the plugin file (videojs-hls-player.zip) on your computer
  4. Click "Install Now" and then hit the activate button

Changelog

1.0.2

  • Pause other videos on play()

1.0.1

  • Fixed data-setup json error
  • Loading video.js from vjs.zencdn.net

1.0

  • First commit

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.