1.0.0-alpha.5 • Published 7 months ago

svelte-video-kit v1.0.0-alpha.5

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

Svelte Video Kit

This library is a powerful video playback tool that can be customized to perfectly suit modern, elegant, and even older applications.

💡 Requirements

The library Supports NodeJS version 18 or higher.

📲 Installation

yarn add svelte-video-kit
# OR
npm install svelte-video-kit

🌟 Getting Started

Simple usage looks like:

// Step 1: Import the parts of the module you want to use
<script>
  import VideoPlayer from 'svelte-video-player';
  ...
</script>

// Step 2: Create the attributes
<script>
  ...
  const poster = 'https://www.server.com/poster.jpg';
  const source = [
    'https://www.server.com/video.webm',
    'https://www.server.com/video.mp4',
    'https://www.server.com/video.ogv',
  ];
  ...
</script>

// Step 3: Calls the component
  <VideoPlayer {poster} {source} />;

📋 Customizable attributes

Prop nameTypeDefault valueDescription
widthnumber1920Real width of video for calculating aspect ratio for responsive design
heightnumber1080Real height of video for calculating aspect ratio for responsive design
posterstring''Absolute or relative URL of poster image
sourcestring | string[]''Absolute or relative URL (or array of those) of video source. Supported formats are webm, mp4 and ogg
controlsHeightnumber55Height of bottom control bar, rescaling included components
trackHeightnumber6Height of playbar and volume slider tracks
thumbSizenumber15Size of playbar and volume slider thumb
centerIconSizenumber60Size of center icon
playerBgColorstring'black'Color of player background
colorstring'#FF3E00'Main color of control components
focusColorstring'white'Color of focus outlines
barsBgColorstring'white'Background color of playbar and volume slider tracks
iconColorstring'white'Color of button icons
bufferedColorstring'#FF9600'Color of buffered chunks
borderRadiusnumber8Rounded corner radius of the player.
skipSecondsnumber5Skipping time in seconds
chunkBarsbooleanfalseDisplay overlay with buffered and played parts of video
loopbooleanfalsePlay video in loop
controlsOnPausebooleantrueShow control bar when video is paused
timeDisplaybooleanfalseDisplay current time beside playbar

📦 Packages

This repo uses pnpm workspaces, which TLDR means if you want to run a commands in each project then you can either cd to that directory and run the command, or use pnpm -r [command].

For example pnpm -r test.

Just

Just-debounce-it / Just-throttle

Part of a library of zero-dependency npm modules that do just do one thing. Guilt-free utilities for every occasion.

screenfull

Simple wrapper for cross-browser usage of the JavaScript Fullscreen API, which lets you bring the page or any element into fullscreen. Smoothens out the browser implementation differences, so you don't have to. screenfull

🤝 Contributing

All contributions are welcome, ranging from people wanting to triage issues, others wanting to write documentation, to people wanting to contribute with code.

Please read and follow our contribution guidelines. Contributions not following these guidelines will be disregarded. The guidelines are in place to make all of our lives easier and make contribution a consistent process for everyone.

📜 What happened to the original svelte-video-player?

Read the team update (October 16th, 2023).

🏻 License

MIT license. Copyright (c) 2023 Ediberto BO
For more information, see the LICENSE file.
1.0.0-alpha.5

7 months ago

1.0.0-alfa.4

7 months ago

1.0.0-alfa.1

7 months ago

1.0.0-alfa.0

7 months ago

1.0.0-alfa.3

7 months ago

1.0.0-alfa.2

7 months ago

1.0.0

7 months ago

0.0.1

7 months ago

0.1.2

7 months ago

0.1.1

7 months ago

0.1.0

7 months ago