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

youtube-together

v1.3.2

Published

Embed youtube-together sessions in any iframe to allow watching youtube videos together with friends located anywhere

Downloads

2

Readme

:sunny: Youtube Sync - Synchronized YouTube Player built in react

Synchronized YouTube player that let friends watch videos together regardless of geograpic location

Host the server and embed the youtube sync session in an iframe, allowing you to use this out of the box on any website for any use case

Usage from NPM ⚡

Quickstart

Install youtube-together with npm install youtube-together --save. Start youtube-together server with cd node_modules/youtube-together && npm start. Scroll down to How to to get started creating your first youtube-together session.

To use a port other than the default server port (8000), run cd node_modules/youtube-together && PORT=8123 npm start, 8123 can be replaced by whatever port your heart desires.

Integrating the youtube-together server into your code

To start the youtube-together server:

const startServer = require("youtube-together");
startServer();

To start youtube-together as an https server:

const startServer = require("youtube-together");
startServer({
  keyFilePath: "your_ssl_private.key",
  certFilePath: "your_ssl_certificate.crt",
  caFilePath: "your_ssl_ca_bundle.crt",
});

Choose a port

To start the youtube-together server on a specific port:

const startServer = require("youtube-together");
startServer(undefined, 443);

To start the youtube-together https server on a specific port:

const startServer = require("youtube-together");
startServer({
  keyFilePath: "your_ssl_private.key",
  certFilePath: "your_ssl_certificate.crt",
  caFilePath: "your_ssl_ca_bundle.crt",
}, 443);

Setup from GitHub repo 🖥️

cd client
yarn
yarn build
cd ../server
yarn
yarn start

How to 📜

To create a new youtube sync session, open your browser and visit localhost:8000/start/choose_session_id/encoded_youtube_url, where choose_session_id is any alphanumeric string and encoded_youtube_url is the link to a youtube video encoded using encodeURIComponent.

Example of creating a new session with session id abc123 and youtube url https://www.youtube.com/watch?v=yB1xfGv_PY8: localhost:8000/start/abc123/https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DjEJUa64NU7s

Then, to join somebody else's existing youtube sync session, visit localhost:8000/watch/abc123 in a new browser.

All youtube-together session urls can easily be embedded in an iframe to easily allow users to watch youtube videos together on your platform.

Contributing ❤️

Submitting Issues

If you notice any bugs, create a GitHub issue with the title being a very short summary of the problem, e.g. Sync not working on start, and the description being the exact steps to reproduce the issue. If we do not have the exact steps, we can't figure out what's wrong and can't fix it.

If you notice any room for improvement, create a GitHub issue with the title being a very short summary of the improvement, e.g. Improve session scalability, and the description being the improvement you would like to see made. Feel free to add hints on the approach you would take.

Addressing Issues

Thank you for deciding to contribute! Pick a GitHub issue that you would like to address (or add your own), and then assign yourself to that issue. Then, fork the repo and add any changes you would like to make to that fork. Currently, we don't have tests in place so please be sure to test various scenarios locally before deciding your changes are ready to submit. When you would like to submit your changes for review, create a pull request, list the specific changes that you made, and I will review/test it myself as soon as possible.

The main two files that are related to youtube sync and the scalability of the end-to-end process are client/Video.js and server/server.js.

Please contribute! This project needs scalability and sync improvements to allow its full potential to be reached!

If you have any questions at all, please feel free to contact me on linkedin and I'll get back to you as soon as possible.

Contributors 🔥

@filahf @stuckinaboot

Credit for Project Start

The overwhelming majority of this was built by @filahf, and can be seen on his youtube sync website https://wevid.online/. I (@stuckinaboot) just simplified the code to make using this within an iframe trivial. Some core youtube sync ideas were used from @YasserYka.