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.
- Responsive design for various screen sizes.
- Support for various video formats.
- Touch and click navigation support.
- Keyboard Shortcut Key Support
- Customizable player controls.
- Play/Pause Control, Volume Control, Playback Controls, Fullscreen Mode, Playback Speed Adjustment, Video Navigation, Mini Player and Theater Mode, Loading Indicator.
This custom video player supports the following keyboard shortcuts to enhance your video playback experience:
Shortcut Key | Action | Description |
---|---|---|
f |
Toggle Fullscreen | Enter or exit fullscreen mode. |
→ (Right Arrow) |
Forward | Skip the video forward. |
← (Left Arrow) |
Backward | Rewind the video. |
t |
Toggle Theater Mode | Switch between normal and theater modes. |
i |
Toggle Mini Player | Activate or deactivate mini player view. |
m |
Toggle Mute/Unmute | Mute or unmute the video. |
+ |
Increase Playback Speed | Increase the playback speed. |
- |
Decrease Playback Speed | Decrease the playback speed. |
Provide step-by-step instructions on how to install and set up your project.
-
Include the Video Player in HTML
Use the following HTML to include the video player in your page:
<div class="nexos-video-player" data-src="path/to/your/video.mp4" data-title="Video Title"></div>
-
Link CSS Styles
Include the necessary CSS to style the video player and controls.
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/nexoscreator/html5-custom-video-player@v0.0.3/video-player.min.css">
-
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/html5-custom-video-player@v0.0.3/video-player.min.js" defer></script>
Customize the player by modifying the CSS styles in styles.css and the JavaScript in player.js.
-
Clone the Repository:
git clone https://github.com/nexoscreator/html5-custom-video-player.git cd html5-custom-video-player
-
Customize CSS: Customize the player styles by modifying the
video-player.css
file. -
Customize JavaScript: Adjust player functionality by editing the
video-player.js
file. You can update controls, navigation, or error handling as needed.
Contributions are welcome! If you have any suggestions, bug fixes, or improvements, feel free to open an issue or submit a pull request. If you'd like to contribute to this project, please follow these ste
- Fork the repository.
- Create a new branch (
git checkout -b feature/improvement
). - Make your changes and commit them (
git commit -m 'Add feature/improvement'
). - Push to the branch (
git push origin feature/improvement
). - Open a Pull Request.
Please check the CONTRIBUTING.md file for more details.
This project is licensed under the MIT License.