0.0.10 โ€ข Published 1 year ago

vidsync v0.0.10

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

VidSync ๐ŸŽฌ

๐Ÿ”—โšกDemo Link

๐ŸŽฌ VidSync: Enhance Your Video Experience! ๐Ÿ“น

VidSync is your all-in-one solution for turbocharging the native HTML video player in your React applications. ๐Ÿš€ Whether you're streaming, presenting, or creating interactive media experiences, VidSync has got you covered!

With VidSync, you can seamlessly switch between multiple videos, effortlessly control playback with intuitive keyboard shortcuts, and enjoy full mobile compatibility. ๐Ÿ“ฑ Plus, unleash your creativity with extensive customization options, allowing you to tailor the video player to perfectly suit your project's style.

Key Features:

๐Ÿ”„ Switch between multiple videos on the fly.
๐ŸŽฎ Intuitive keyboard shortcuts for convenient playback control.
๐Ÿ–Œ๏ธ Fully customizable styling to match your project's aesthetic.
๐Ÿ“ฑ Mobile-friendly design ensures a smooth experience on any device.
๐Ÿš€ Lightweight and easy to integrate into your React applications.

Whether you're building a video gallery, an e-learning platform, or a multimedia presentation, VidSync empowers you to deliver a seamless and engaging video experience to your users. Try VidSync today and take your video playback to the next level! ๐Ÿ’ซ

Table of Contents

Features ๐Ÿš€

  • Enhanced Video Player ๐Ÿ“บ: VidSync provides a streamlined interface to optimize your video viewing experience.
  • Multiple Video Support ๐Ÿ”„: Easily manage and switch between a collection of videos with a simple array setup.
  • Customizable Interface ๐ŸŽจ: Tailor VidSync to fit your specific needs with extensive customization options.
  • Mobile Friendly ๐Ÿ“ฑ: VidSync is fully optimized for mobile devices, ensuring a consistent experience across all platforms.
  • Intuitive Key Bindings โŒจ๏ธ: Effortlessly

MasterHead

Installation โš™๏ธ

install via npm

npm install vidsync

Or, using yarn

yarn add vidsync

Usage/Examples

import { VidSyncPlayer } from "vidsync";

type VideoPlayerProps = {
  src: string | string[];
  poster?: string | stri[];
  index?: number;
};
export const VideoPlayer = ({ src, poster, index }: VideoPlayerProps) => {
  return <VidSyncPlayer src={src} poster={poster} index={index} />;
};

Customization Options ๐ŸŽจ

Playing With The Primary Color

import { VidSyncPlayer } from "vidsync";

type VideoPlayerProps = {
  src: string | string[];
  poster?: string | stri[];
  index?: number;
};
export const VideoPlayer = ({ src, poster, index }: VideoPlayerProps) => {
  return (
    <VidSyncPlayer
      src={src}
      poster={poster}
      index={index}
      primaryColor="#22d3ee"
    />
  );
};

MasterHead

Playing With The Icons & text Color

import { VidSyncPlayer } from "vidsync";

type VideoPlayerProps = {
  src: string | string[];
  poster?: string | stri[];
  index?: number;
};
export const VideoPlayer = ({ src, poster, index }: VideoPlayerProps) => {
  return (
    <VidSyncPlayer
      src={src}
      poster={poster}
      index={index}
      primaryColor="#22d3ee"
      iconsColor="orange"
    />
  );
};

MasterHead

Documentation

๐ŸŽฅ๐ŸŽฅNative HTML Video Tag Attributes ๐ŸŽฅ๐ŸŽฅ

AttributeTypeDescription
autoplaybooleanVideo plays automatically when loaded
controlsbooleanDisplays video controls
heightstringSpecifies the height of the video player
loopbooleanVideo restarts automatically when finished
mutedbooleanVideo's audio is muted
posterstringImage displayed while video is loading
preloadstringSpecifies how video should be loaded
srcstring | string[]URL of the video file
widthstringSpecifies the width of the video player

โœจโœจVidSync Attribute โœจโœจ

AttributeTypeDescription
srcstring | string[]The URL or array of URLs of the video file(s).
posterstring | string[]The URL or array of URLs for the poster image(s) displayed while the video is loading.
indexnumberThe index of the video in the src array to start from. Default is 0.
containerStylesReact.CSSPropertiesCustom styles for the video container element.
videoStylesReact.CSSPropertiesCustom styles for the video element.
primaryColorstringThe primary color used for styling the component.
iconsColorstringThe color used for icons (e.g., play button, controls).
autoplaybooleanSpecifies that the video will start playing as soon as it is ready.
controlsbooleanSpecifies that video controls should be displayed.
heightstringSpecifies the height of the video player.
loopbooleanSpecifies that the video will start over again, every time it is finished.
mutedbooleanSpecifies that the audio output of the video should be muted.
preload"auto" | "metadata" | "none"Specifies if and how the video should be loaded when the page loads.
widthstringSpecifies the width of the video player.

๐ŸŽฎ๐ŸŽฎ Key Bindings ๐ŸŽฎ๐ŸŽฎ

VidSync provides convenient keyboard shortcuts to control your video playback experience. Here's a list of key bindings along with their corresponding actions:

ShortcutDescription
Shift + NMoves to the next video ๐ŸŽฌ
Shift + PMoves to the previous video ๐Ÿ”„
K or SpacebarToggles between play and pause โ–ถ๏ธโธ๏ธ
FToggles full-screen mode ๐ŸŒ
MToggles mute/unmute ๐Ÿ”‡๐Ÿ”Š
Arrow DownDecreases the volume ๐Ÿ”‰
Arrow UpIncreases the volume ๐Ÿ”Š
Arrow LeftSeeks backward by 10 seconds โช
Arrow RightSeeks forward by 10 seconds โฉ
IToggles picture-in-picture mode ๐Ÿ–ผ๏ธ

These shortcuts allow you to seamlessly control your video playback without leaving your keyboard. Enjoy your video experience with VidSync!

๐Ÿ“น๐ŸŽš๏ธ All Events ๐Ÿ“น๐ŸŽš๏ธ

Function NameTypeDefault ValueDescription
onAbort((event: Event) => void) \| undefinedundefinedHandler for when the loading of the video is aborted.
onCanPlay((event: Event) => void) \| undefinedundefinedHandler for when the browser can start playing the video.
onCanPlayThrough((event: Event) => void) \| undefinedundefinedHandler for when the video can be played through to the end without buffering.
onDurationChange((event: Event) => void) \| undefinedundefinedHandler for when the duration of the video is updated.
onEmptied((event: Event) => void) \| undefinedundefinedHandler for when the video element's resource is suddenly unavailable.
onEnded((event: Event) => void) \| undefinedundefinedHandler for when the video has ended.
onError((event: Event) => void) \| undefinedundefinedHandler for when an error occurred during the loading of the video.
onLoadedData((event: Event) => void) \| undefinedundefinedHandler for when the first frame of the video has finished loading.
onLoadedMetadata((event: Event) => void) \| undefinedundefinedHandler for when the metadata (like dimensions and duration) has been loaded.
onLoadStart((event: Event) => void) \| undefinedundefinedHandler for when the browser starts loading the video.
onPause((event: Event) => void) \| undefinedundefinedHandler for when the video is paused.
onPlay((event: Event) => void) \| undefinedundefinedHandler for when the video starts playing.
onPlaying((event: Event) => void) \| undefinedundefinedHandler for when the video is playing after having been paused or stopped for buffering.
onProgress((event: Event) => void) \| undefinedundefinedHandler for when the browser is fetching the video data.
onSeeked((event: Event) => void) \| undefinedundefinedHandler for when the seeking operation has completed.
onSeeking((event: Event) => void) \| undefinedundefinedHandler for when the browser is in the process of seeking the position of the video.
onStalled((event: Event) => void) \| undefinedundefinedHandler for when the browser is trying to get media data, but data is not available.
onSuspend((event: Event) => void) \| undefinedundefinedHandler for when the browser is intentionally not currently fetching the media data.
onTimeUpdate((event: Event) => void) \| undefinedundefinedHandler for when the current playback position has changed.
onVolumeChange((event: Event) => void) \| undefinedundefinedHandler for when the volume of the video has changed.
onWaiting((event: Event) => void) \| undefinedundefinedHandler for when the video is waiting for data from the server.
0.0.10

1 year ago

0.0.9

1 year ago

0.0.8

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago