New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cvp-prewcioo

Package Overview
Dependencies
Maintainers
0
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cvp-prewcioo

A customizable HTML5 video player built with React, featuring custom controls, progress bar sections, themes, and dynamic thumbnails.

  • 0.0.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
0
Weekly downloads
 
Created
Source

Custom Video Player

Custom Video Player is a React-based HTML5 video player with a fully customizable UI, themes, and advanced features such as sections on the progress bar, timestamped thumbnails, and keyboard shortcuts. It is designed to replace the default HTML5 player controls with a sleek, user-friendly interface.


Features

  • Custom progress bar with labeled and colored sections.
  • Dynamic timestamped thumbnails on hover.
  • Custom toolbar with:
    • Play/Pause button.
    • Skip forward/backward by 10 seconds.
    • Skip to next section.
  • Settings menu for theme and resolution.
  • Customizable themes for colors, icons, and fonts.
  • Keyboard shortcuts:
    • F: Toggle fullscreen.
    • Space or K: Play/Pause.
    • L or Right Arrow: Skip forward 10 seconds.
    • J or Left Arrow: Skip backward 10 seconds.

Installation

npm install custom-video-player

Usage

import React from 'react';
import { CustomVidPlayer } from 'custom-video-player';

const App = () => {
  const sections = [
    { start: 0, end: 10, label: 'Intro', color: 'red', labelOn: true },
    { start: 30, end: 60, label: 'Main Topic', color: 'blue', labelOn: true },
    { start: 90, end: 120, label: 'Summary', color: 'green', labelOn: true },
  ];

  const theme = {
    colors: {
      toolbarBg: '#222',
      progressBg: '#444',
      sectionBg: '#555',
      sectionText: 'white',
    },
    icons: {
      play: <i className="custom-icon-play" />,
      pause: <i className="custom-icon-pause" />,
    },
  };

  return (
    <CustomVidPlayer
      videoSrc="https://example.com/video.mp4"
      sections={sections}
      theme={theme}
    />
  );
};

export default App;

Props

Prop NameTypeRequiredDefaultDescription
videoSrcStringnullURL of the video to be played.
sectionsArray[]List of video sections with start, end, label, and color.
themeObjectDefault theme object.Customization options for colors, icons, and fonts.

Keyboard Shortcuts

KeyAction
FToggle Fullscreen
Space or KPlay/Pause
L or Skip forward 10 seconds
J or Skip backward 10 seconds

Customization

Sections

Sections are optional and are used to highlight parts of the video on the progress bar. Each section can have a start and end time, a label, and a color.

Example:

const sections = [
  { start: 0, end: 10, label: 'Intro', color: 'red', labelOn: true },
];

Themes

Themes allow you to customize colors, fonts, and icons.

Example:

const theme = {
  colors: {
    toolbarBg: '#222',
    progressBg: '#444',
    sectionBg: '#555',
  },
  icons: {
    play: <CustomPlayIcon />,
    pause: <CustomPauseIcon />,
  },
};

Contributing

Contributions are welcome! Please open an issue or submit a pull request.


License

This project is licensed under the MIT License.

FAQs

Package last updated on 30 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc