Skip to content

foliagetree23/VideoPlayer-Browser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

9 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽฌ Video Player Web

Version License Node.js Platform Build Status

A modern, feature-rich video player built with vanilla HTML, CSS, and JavaScript. This application provides a comprehensive video playback experience with playlist management, multiple viewing modes, and a sleek user interface.

๐Ÿš€ Live Demo โ€ข ๐Ÿ“‹ Features โ€ข ๐Ÿ› ๏ธ Installation โ€ข ๐Ÿค Contributing โ€ข ๐Ÿ“„ License

โœจ Features

๐ŸŽฅ Core Video Playback

  • High-quality video playback with support for multiple formats
  • Play/Pause controls with visual feedback
  • Skip forward/backward (10-second intervals)
  • Volume control with mute/unmute functionality
  • Playback speed control (0.5x to 2x)
  • Progress bar with seek functionality
  • Time display (current time / total duration)

๐Ÿ“‹ Playlist Management

  • Add multiple videos to create custom playlists
  • File picker for selecting video files from your computer
  • Shuffle playlist for randomized playback
  • Loop playlist or loop individual videos
  • Delete videos from playlist with one click
  • Clear entire playlist functionality
  • Visual indication of currently playing video

๐Ÿ–ฅ๏ธ Advanced Viewing Options

  • Fullscreen mode for immersive viewing
    • Toggle via button, F11 key, or double-click on video
  • Picture-in-Picture support for multitasking
  • Keyboard accessibility with space/enter and F11 support
  • Responsive design that works on different screen sizes

๐ŸŽจ User Interface

  • Light/Dark theme toggle with local storage persistence
  • Smooth animations and transitions
  • Custom scrollbar styling
  • Hover effects and interactive feedback
  • Accessibility features with proper ARIA labels
  • Modern Material Design-inspired controls

๐Ÿ”ง Technical Features

  • Cross-browser compatibility (Chrome, Firefox, Safari, Edge)
  • Error handling with console logging
  • Local storage for theme preferences
  • Media Session API metadata support (basic)
  • No external dependencies for the frontend
  • Express.js server for easy local development

๐Ÿš€ Quick Start

Prerequisites

  • Node.js 16+ installed on your system
  • Git (optional, for development)

Installation

  1. Clone the repository

    git clone https://github.com/your-username/videoplayer.git
    cd videoplayer
  2. Install dependencies

    npm install
  3. Start the development server

    npm start
  4. Open your browser

    • The application will automatically open at http://localhost:8000
    • If it doesn't open automatically, navigate to the URL manually

๐Ÿ“ธ Screenshots

Dark Theme

[Dark theme video player interface - to be added]

Light Theme

[Light theme video player interface - to be added]

Playlist Management

[Playlist features demonstration - to be added]

Usage

  1. Add Videos: Click the "+" icon or use the file picker to add video files
  2. Control Playback: Use the control buttons or keyboard shortcuts
  3. Manage Playlist: Add, remove, or reorder videos in your playlist
  4. Fullscreen Mode: Click the fullscreen button or press F11
  5. Toggle Theme: Use the theme toggle button to switch between light and dark modes

๐ŸŽฎ Controls & Shortcuts

Mouse Controls

  • Click play/pause button: Play or pause video
  • Click volume control: Adjust volume level
  • Click progress bar: Seek to specific time
  • Double-click video: Toggle fullscreen mode
  • Click playlist items: Switch to that video

Keyboard Shortcuts

  • Spacebar: Play/Pause (when video is focused)
  • Enter: Play/Pause (when video is focused)
  • F11: Toggle fullscreen mode

๐Ÿ—๏ธ Project Structure

videoplayer/
โ”œโ”€โ”€ index.html          # Main application file
โ”œโ”€โ”€ server.js           # Express server
โ”œโ”€โ”€ package.json        # Project configuration
โ”œโ”€โ”€ README.md          # Project documentation
โ””โ”€โ”€ node_modules/      # Dependencies (created after npm install)

๐Ÿ”ง Development

Available Scripts

  • npm start - Start the development server
  • npm run build - Build for distribution (creates executable)

Customization

The video player is built with vanilla technologies for easy customization:

  • HTML Structure: Modify index.html to change layout
  • Styling: Update CSS variables in the <style> section for themes
  • Functionality: Extend JavaScript functions in the <script> section

CSS Variables for Theming

The application uses CSS custom properties for easy theming:

:root {
  --color-bg: #111;
  --color-text-main: #eee;
  --color-bg-container: #333;
  /* ... more variables */
}

๐ŸŒ Browser Support

  • Chrome: โœ… Fully supported
  • Firefox: โœ… Fully supported
  • Safari: โœ… Fully supported
  • Edge: โœ… Fully supported
  • Mobile browsers: โœ… Responsive design

๐Ÿ“ Features in Detail

Fullscreen Mode

The fullscreen feature allows you to:

  • View videos in true fullscreen mode
  • Use F11, double-click, or the button to toggle
  • Exit fullscreen with the same method or ESC key

Picture-in-Picture

  • Watch videos while working in other applications
  • Available on supported browsers
  • Toggle via the PiP button

Playlist Management

  • Support for multiple video formats
  • Drag-and-drop file addition
  • Persistent playlist during session
  • Visual feedback for current video

Theme System

  • Automatic light/dark theme detection
  • Manual theme toggle
  • Smooth theme transitions
  • Local storage preference saving

๐Ÿ› Troubleshooting

Common Issues

  1. Videos not loading

    • Ensure video files are in supported formats (MP4, WebM, etc.)
    • Videos are loaded from local files, not URLs
  2. Fullscreen not working

    • Fullscreen requires user interaction to activate
    • Check browser fullscreen permissions
  3. Playlist not saving

    • Playlist is session-based and resets on page refresh
    • No cloud storage - videos must be re-added each session

Error Handling

The application includes basic error handling:

  • Server connection error notifications
  • Console logging for video loading errors
  • Browser compatibility checks
  • Fullscreen API error handling

๐Ÿค Contributing

We welcome contributions! Please read our contributing guidelines before submitting pull requests.

Development Setup

  1. Fork the repository

    git clone https://github.com/your-username/videoplayer.git
    cd videoplayer
  2. Create a feature branch

    git checkout -b feature/your-feature-name
  3. Install dependencies

    npm install
  4. Make your changes

  5. Test your changes

    npm start
  6. Commit your changes

    git add .
    git commit -m "Add your feature description"
  7. Push to your fork

    git push origin feature/your-feature-name
  8. Submit a Pull Request

Contribution Guidelines

  • Code Style: Follow existing patterns and conventions
  • Testing: Test your changes thoroughly
  • Documentation: Update documentation if needed
  • Commits: Use clear, descriptive commit messages

Reporting Issues

๐Ÿ› Bug Reports

  • Use the Issue Tracker
  • Include steps to reproduce the bug
  • Provide browser and OS information
  • Include screenshots if relevant

๐Ÿ’ก Feature Requests

  • Check existing issues first
  • Describe the feature clearly
  • Explain why it would be useful

๐Ÿ“‹ Roadmap

Upcoming Features

  • Drag and drop file support
  • Video thumbnail generation
  • Playlist persistence
  • Keyboard shortcuts enhancement
  • Mobile responsive improvements
  • Video format support expansion

๐Ÿ—๏ธ Development

Available Scripts

  • npm start - Start the development server
  • npm run build - Build for distribution (creates executable)

Project Structure

videoplayer/
โ”œโ”€โ”€ ๐Ÿ“„ index.html          # Main application file
โ”œโ”€โ”€ ๐Ÿ“„ server.js           # Express server
โ”œโ”€โ”€ ๐Ÿ“„ package.json        # Project configuration
โ”œโ”€โ”€ ๐Ÿ“„ README.md          # Project documentation
โ”œโ”€โ”€ ๐Ÿ“„ .gitignore         # Git ignore rules
โ”œโ”€โ”€ ๐Ÿ“„ LICENSE            # License file
โ””โ”€โ”€ ๐Ÿ“ node_modules/      # Dependencies (created after npm install)

Technology Stack

  • Frontend: Vanilla HTML5, CSS3, JavaScript (ES6+)
  • Backend: Node.js, Express.js
  • Build: None (pure vanilla technologies)
  • Package Manager: npm

๐Ÿ”’ Security

This project follows standard security practices for web applications. Report security vulnerabilities by creating a private issue or contacting the maintainers directly.

๐Ÿ“„ License

This project is licensed under the GNU GPL Version 1 License - see the LICENSE file for details.

๐Ÿ™ Acknowledgments

  • Built with modern web technologies
  • Uses Material Design principles
  • Inspired by popular video player interfaces
  • Optimized for performance and user experience

๐Ÿ“ž Support


โญ If you find this project useful, please consider giving it a star on GitHub! โญ

Made with โค๏ธ by Foliage Tree

About

This is utility for playing video, it's like video player but on the browser.

Resources

License

Stars

Watchers

Forks

Packages

No packages published