[email protected]

Create Your own HTML5 Custom Video Player

A custom video player built using plain JavaScript for a personalized media experience.

Published on: 16/10/2024

Web DemoGitHub Repo

This project features a custom video player built using plain JavaScript. It includes various functionalities such as play/pause control, volume adjustment, playback speed settings, fullscreen toggle, and more.

🔍 Project Overview

A lightweight, customizable, and feature-rich video player built using plain JavaScript and CSS. Includes essential video controls such as play/pause, volume adjustment, speed control, fullscreen mode, theater mode, mini-player, and more.

✨ Features

📥 Installation

  1. Include the Video Player in HTML

    Use the following HTML to include the video player in your page:

    <div
      class="nex-video-player"
      data-src="path/to/your/video.mp4"
      data-title="Video Title"
    ></div>

    Note: Replace "path/to/your/video.mp4" with your actual video file URL and update the "Video Title".

  2. Link CSS Styles

    Include the necessary CSS to style the video player and controls.

    <link
      rel="stylesheet"
      href="https://cdn.jsdelivr.net/gh/nexoscreator/[email protected]/video-player.min.css"
    />
  3. Link the JavaScript

    Add the JavaScript code cdn link provided below to the functionality of the video player.

    <script
      src="https://cdn.jsdelivr.net/gh/nexoscreator/[email protected]/video-player.min.js"
      defer
    ></script>

🎯 Keyboard Shortcuts

This custom video player supports the following keyboard shortcuts to enhance your video playback experience:

Shortcut KeyActionDescription
FFullscreen ToggleEnter or exit fullscreen mode.
→ (Right Arrow)ForwardSkip the video forward.
← (Left Arrow)BackwardRewind the video.
TToggle Theater ModeSwitch between normal and theater modes.
IMini Player ModeActivate or deactivate mini player view.
MMute/UnmuteMute or unmute the video.
+Increase SpeedIncrease playback speed.
-Decrease SpeedDecrease playback speed.

🎨 Customization

You can customize the CSS styles and JavaScript functionality according to your needs.

  1. Clone the Repository:

    git clone https://github.com/nexoscreator/html5-custom-video-player.git
    cd html5-custom-video-player
  2. Customize CSS: Edit the video-player.css file to change the styles.

  3. Customize JavaScript: Customize the player controls by modifying video-player.js. You can update controls, navigation, or error handling as needed.

🤝 Contributing

We ❤️ contributions! Follow these steps to contribute:

  1. 🍴 Fork the repository
  2. 🌿 Create a new branch (git checkout -b feature/AmazingFeature)
  3. 💾 Commit your changes (git commit -m 'Add some AmazingFeature')
  4. 🚀 Push to the branch (git push origin feature/AmazingFeature)
  5. 🔃 Open a Pull Request

📖 See our Contribution Guidelines for more details.

📄 License

This project is licensed under the MIT License. See the LICENSE file for details.

📬 Contact & Community

💬 Join us on Discord: Click Here
🐦 Follow on Twitter: @nexoscreator
📧 Email: [email protected]

If you find this project helpful, please consider starring ⭐ the repository or sponsoring 💖 on GitHub!

Created with ❤️ by @nexoscreator