npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@arusak/record-player

v0.4.0

Published

Multiple video files player for web

Downloads

12

Readme

Multiple video player

npm version Build status Coverage Status

For synchronized playback of multiple video files at once.

Supports any number of streams playing at once. Creates a separate element for each file. Uses a single set of controls for the whole set of videos.

Is able to start playing videos with different starting positions.

Why

This player was created as a part of a video conferencing system. That system stored all conversations in video files for archiving purposes. For each conversation, it created as many files as there were participants in the conversation. The recording of each file started at the moment when the person joined the conversation.

So when you wanted to watch archived record, you had to somehow sync the playback of several files. That included synchronous start and ability to seek all videos with a single set of controls. So this tool was created.

API

new RecordPlayer(container, [options])

Create an instance of player.

'container' is a HTML element in which you want this player to render

'options' are:

  • debug - if true: show diagnostic overlay with event history for every video. Default: false.
  • log - if _true): do console logging. Default: false.

load(descriptors)

Load video files into player.

'descriptors' is an array of video descriptors. You usually get it from your video streaming service.

{
    url: './sample.webm',
    type: 'video/webm',
    offset: 0
}
  • 'url' is the path to a file or stream.
  • 'type' is optional. This is a mime-type for the loaded file. The browser tries to guess, but sometimes it need help.
  • 'offset' is the timestamp (in milliseconds) of a video start. It might be UNIX time or your custom time offset.

reset

Stop downloading any content and reset all video sources. To be called on component destruction.

API usage example

let player = new RecordPlayer(document.getElementById('player'), {debug: true});
player.load(recordsList);