Advanced HTML5 Video Player jQuery Plugin | aksVideoPlayer.js

aksVideoPlayer.js is a fully-featured and highly customizable HTML5 video player built on top of jQuery.

Features:

  • Easy to implement.
  • Custom video poster.
  • It allows the user to choose the quality of the video.
  • It allows the user to set the playback speed.
  • Pictures in pictures.
  • Full-screen mode.
  • “Forward” and “Rewind” buttons.
  • Video captions and subtitles.
  • Custom context menu.
  • It allows you to insert your own ads in the video.

A Dedicated HTML5 Video Player Optimized For Movies | moovie.js

How to make use of it:

1. Load the aksVideoPlayer.js jQuery plugin’s files within the doc.

<link rel="stylesheet" href="/path/to/dist/aksVideoPlayer.min.css" />
<script src="/path/to/cdn/jquery.min.js"></script>
<script src="/path/to/dist/aksVideoPlayer.min.js"></script>

2. Load the Google IMA3 SDK if you would like to combine adverts into your HTML5 movies.

<script src="https://imasdk.googleapis.com/js/sdkloader/ima3.js"></script>

3. Create a container to carry the video participant.

<div id="video"></div>

4. Initialize the plugin and specify the path to your HTML5 video.

$("#video").aksVideoPlayer({
  file: [
    {
      file: "1080.mp4",
      label: "1080p"
    },
    {
      file: "720.mp4",
      label: "720p"
    },
    {
      file: "540.mp4",
      label: "540p"
    },
    {
      file: "360.mp4",
      label: "360p"
    },
    {
      file: "240.mp4",
      label: "240p"
    }
  ]
});

5. Set the width and height of the video participant.

$("#video").aksVideoPlayer({
  width: 640,
  height: 360,
});

6. Specify the path to the video poster.

$("#video").aksVideoPlayer({
  poster: "poster.webp"
});

7. add captions and subtitles to the video.

$("#video").aksVideoPlayer({
  captions: [
    {
      file: "subtitle.en.vtt",
      label: "English",
      kind: "captions",
      srclang: "en"
    },
    {
      file: "subtitle.fr.vtt",
      label: "Français",
      kind: "captions",
      srclang: "fr"
    }
  ]
});

8. Insert customized links to the context menu.

$("#video").aksVideoPlayer({
  contextMenu: [
    {
      type: "urlCopy",
      label: "Copy Video Url",
      url: ""
    },
    {
      type: "socialmedia",
      label: "Share on Social Media",
      socials: [
        {
          label: "",
          url: "",
          colorBg: "#0066ff",
          color: "white",
          icon:
            '<svg xmlns="//www.w3.org/2000/svg" viewBox="0 0 10 20"><defs/><path d="M8.174 3.32H10V.14A23.66 23.66 0 007.34 0C4.709 0 2.906 1.656 2.906 4.7v2.8H0v3.555h2.905V20h3.56v-8.945h2.789L9.697 7.5H6.466V5.05c0-1.027.276-1.73 1.708-1.73z" fill-rule="evenodd"/></svg>'
        },
        {
          label: "Twitter",
          url: "",
          colorBg: "#0089ff",
          color: "white",
          icon:
            '<svg xmlns="//www.w3.org/2000/svg" viewBox="0 0 20 16"><defs/><path d="M17.944 3.987c.013.175.013.35.013.526C17.957 9.85 13.833 16 6.294 16c-2.322 0-4.48-.662-6.294-1.813.33.038.647.05.99.05 1.916 0 3.68-.637 5.089-1.725-1.802-.037-3.313-1.2-3.833-2.8.254.038.508.063.774.063.368 0 .736-.05 1.079-.137-1.878-.376-3.287-2-3.287-3.963v-.05c.546.3 1.18.488 1.853.512A4.02 4.02 0 01.838 2.775c0-.75.203-1.438.558-2.038a11.71 11.71 0 008.452 4.225 4.493 4.493 0 01-.102-.924c0-2.226 1.828-4.038 4.1-4.038 1.18 0 2.245.487 2.994 1.275A8.145 8.145 0 0019.442.3a4.038 4.038 0 01-1.802 2.225A8.316 8.316 0 0020 1.9a8.74 8.74 0 01-2.056 2.087z" fill-rule="evenodd"/></svg>'
        }
      ]
    },
    {
      type: "iframe",
      label: "Copy Iframe Code",
      iframe: "&lt;iframe&gt;&lt;/iframe&gt;"
    }
  ]
});

9. Insert customized adverts into the video.

$("#video").aksVideoPlayer({
  ads: [
    {
      type: "google",
      url: ''
    },
    {
      type: "image",
      src: "ads.png",
      width: 320,
      height: 50,
      link: "",
      time: "00:20"
    },
    {
      type: "video",
      src: "videoads.mp4",
      link: "",
      time: "00:35",
      adstimer: "6"
    }
  ],
});

10. Customize the video controls.

$("#video").aksVideoPlayer({
  rewind: true,
  rewindValue: 10,
  forward: false,
  forwardValue: 10,
  preview: true,
  previewWidth: 140,
  previewHeight: 95,
  controller: true,
  autoplay: false,
  muted: true,
  volume: 1,
  loop: false,
  playbackRate: ["0.25", "0.5", "0.75", "1", "1.25", "1.5", "1.75", "2"],
  pictureinpicture: true,
});

11. Customize & localize the labels.

$("#video").aksVideoPlayer({
  playbackRateLabel: "Playing Speed",
  captionsLabel: "Subtitles",
  sourcesLabel: "Quality",
  playLabel: "Play",
  pauseLabel: "Pause",
  rewindLabel: "Rewind %s Seconds",
  forwardLabel: "Forward %s Seconds",
  settingsLabel: "Settings",
  fullScreenLabel: "Fullscreen",
  exitFullScreenLabel: "Exit Fullscreen",
  adsSkipLabel: "Skip Ad",
  closeLabel: "Close",
  pictureinpictureLabel: "Picture in Picture",
});

Advanced HTML5 Video Player, aksVideoPlayer.js Plugin/Github


Official Website(Ahmetaksungur): Click Here

This superior jQuery/javascript plugin is developed by Ahmetaksungur. For extra Advanced usage, please go to the official website.

Related Posts

VenoBox-Responsive-jQuery-Lightbox-Plugin

Responsive Image Gallery Lightbox jQuery Plugin | VenoBox

VenoBox is a responsive jQuery modal window plugin suitable for images, embedded content, iFrames, Google Maps, Vimeo, and YouTube videos. The big difference compared to many other…

bootstrap-dropdown-on-hover

[Animation] Bootstrap Multi-Level Responsive Dropdown Menu

Bootstrap-based multi-level dropdown navigation menu with cool animations. The dropdown on Hover is a jQuery plugin used to create Bootstrap multi-level scroll-triggered dropdown menus with CSS3 animations…

Google-Translate-Dropdown-Customize-With-Country-Flag

Google Translate Dropdown Customize With Country Flag | GT API

Flag google translates jQuery text that takes advantage of the Google Cloud Translation API to translate web content between languages by selecting a country from the dropdown…

Bootstrap-Fileinput

HTML 5 File Input Optimized for Bootstrap 4.x./3.x with File Preview | Bootstrap Fileinput

bootstrap-fileinput is an improved HTML 5 file input  Bootstrap 5.x, 4.x and 3.x with file preview for different files, provides multiple selections, resumable section uploads, and more….

HStack-and-VStack-in-CSS

CSS Layout Components Horizontal/Vertical Stack | HStack and VStack

HStack and VStack in CSS – CSS layout components that (basically) stack anything horizontally and vertically. A pure CSS library that makes it easy to stack elements…

Floating-Whatsapp-Chat-Button

How to Add Floating Whatsapp Chat Button In HTML | venom-button

Venom Button is a very simple plugin for the jQuery floating WhatsApp button. Adds a floating button to your site that calls WhatsApp Click to Chat API. It will automatically start the WhatsApp…

Leave a Reply

Your email address will not be published. Required fields are marked *