@deepeshgupta/video-player
TypeScript icon, indicating that this package has built-in type declarations

0.0.25 • Public • Published

Video Player

A frontend web video player.

Installation

CDN JavaScript

https://res.cloudinary.com/deepeshgupta/raw/upload/v1657553895/deepeshgupta/video-player/js/video-player-0.0.25_ojlbjk.js

Initialize

var myVideo;
(async () => {
    myVideo = await window.deepeshdg.videoPlayer({
        video: document.querySelector("video"),
        loop: true,
    });
})();

For Multiple

var myVideos;
(async () => {
    myVideos = await window.deepeshdg.videoPlayer({
        videos: document.querySelectorAll("video"),
        loop: true,
    });
})();

Sample image

Sample Image

Features

  • Press space or k for Play / Pause.

  • Press j or left arrow for backward 10s and 5s respectively.

  • Press l or right arrow for forward 10s and 5s respectively.

  • Press up arrow and down arrow for volumn up and volumn down 5% respectively.

  • Press m for toggle Mute.

  • Press f or double click Mouse on Screen for toggle Full Screen.

  • click Mouse on anywhere on Video above controllers for Play / Pause.

Boom, You are good to go...

Deepesh Gupta

Developed By - Deepesh Gupta


License

MIT

Package Sidebar

Install

npm i @deepeshgupta/video-player

Weekly Downloads

1

Version

0.0.25

License

MIT

Unpacked Size

80 kB

Total Files

13

Last publish

Collaborators

  • deepeshgupta