Git Product home page Git Product logo

dyc3 / opentogethertube Goto Github PK

View Code? Open in Web Editor NEW
388.0 12.0 51.0 15.07 MB

Watch videos with your friends. The spiritual successor to TogetherTube, preserving the spirit of it's simple to use interface, while improving it's look, feel, and reliability.

Home Page: https://opentogethertube.com

License: GNU Affero General Public License v3.0

JavaScript 4.38% HTML 0.08% Vue 13.59% Shell 0.65% Dockerfile 0.61% SCSS 0.26% Rust 18.75% TypeScript 61.58% PLpgSQL 0.02% CSS 0.08%
nodejs vuejs video video-streaming video-synchronization social entertainment hacktoberfest

opentogethertube's Introduction

OpenTogetherTube

CI/CD codecov Docker size

The easy way to watch videos with your friends.

Try it here: https://opentogethertube.com/

Features

  • Real-time video synchronization
    • No account registration required
  • Bookmarkable rooms with custom URLs for easy sharing
  • Text chat
  • SponsorBlock integration
  • Plays videos from:
    • YouTube
    • Vimeo
    • .mp4 files served over HTTP
    • HLS VOD streams
    • DASH VOD streams
    • ...and some others.
  • Vote mode: Vote on what to watch next
  • Vote to skip
  • DJ mode: Good for D&D background music
  • Room permissions
  • Multiple UI themes

Deployment

See the deployment docs.

Contributing

Contributions are welcome! Check out issues that have the "good first issue" label. Read CONTRIBUTING.md for more information.

opentogethertube's People

Contributors

adapap avatar antoinebou12 avatar butt4cak3 avatar ceofil avatar cjrkoa avatar cloudmaker97 avatar daichuanwu21 avatar dcarpenter31 avatar dennisvanderwerf avatar dependabot[bot] avatar dyc3 avatar elenirotsides avatar fortstatement avatar friedrichgaming avatar gianklug avatar icebeach7 avatar ifkb99 avatar jordan883 avatar kennethskelton avatar moreno-michael avatar nebulouspianist avatar nickslowinski avatar sabatonship avatar scraft02 avatar shindouj avatar swsoftware1044 avatar tyler-seliber avatar victor-m-giraldo avatar xrealneon avatar zackatoo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

opentogethertube's Issues

User accounts

Users should be able to create accounts so they can sign in and claim ownership of permanent rooms.

Checklist:

  • User database model
  • Password hashing
  • Account creation
    • Form to make new User
    • API endpoint to make new User
    • Cryptographically secure random salt generation
    • validate email
    • Client side form validation
      • validate email
      • validate email, username, password length > 0
      • validate retype password
  • Rate Limiting
    • Account Creation
    • Account Login
  • Show clear errors when log in or registration fails
    • Registration: when email is already used
    • Log in: when email or password is wrong
    • Registration: when username is already used
  • User's display names should be separate from what they use to log on
  • Make permanent rooms belong to users
  • Something to visually indicate whether or not a user is signed in with a permanent account in the user list
  • A process for users to claim existing permanent rooms as theirs
  • Allow users to change their username (must be unique among registered users)
  • Unit tests
    • User log in
    • User registration
    • Permanent rooms should not require the user to be logged in on creation
    • Permanent rooms should set ownerId on creation when the user is logged in

Bugs:

  • When a user is in a room, then logs in via logging in to existing account or creating a new account, the name displayed in the user list is not the logged in user's name

Questions that need to be answered:

  1. What if users forget their password?
    • For now, tough shit. In the future, password reset email.
  2. Should temp users be able to set their name to one taken by a permanent user?
    • Yes, because they will be colored differently

JS for each pattern instead of looping by index

getVideoLengthYoutube_Fallback: async (url) => {
let res = await axios.get(url);
let regexs = [/length_seconds":"\d+/, /lengthSeconds\\":\\"\d+/];
for (let r = 0; r < regexs.length; r++) {
let matches = res.data.match(regexs[r]);
if (matches == null) {
continue;
}
for (let m = 0; m < matches.length; m++) {
const match = matches[m];
let extracted = match.split(":")[1].substring(r == 0 ? 1 : 2);
console.log("MATCH", match);
console.log("EXTRACTED", extracted);
return parseInt(extracted);
}
}
return -1;
},

Javascript has two enumeration keywords that can be used in for loops: in and of
The former is used to enumerate by index for arrays or keys in objects, and the latter can be used to iterate through an object, such as values of an array.

I propose enforcing the use of for .. of to increase readability/reduce redundancy in code. I am merely using the above as an example; there are many occurrences of the same construct.

for (let r = 0; r < regexs.length; r++) { 
    let matches = res.data.match(regexs[r]); 
    ... 

This can be replaced with:

for (let regex of regexs) {
    let matches = res.data.match(regex);
    ...

Videos skip the first 1 or 2 seconds when a video starts playing

This is caused by the clients not having the video buffered when playback starts.

When a user hits play, the server starts incrementing playbackProgress immediately. When the clients receive the sync message to start playing, they start buffering the video. This usually means at least a second for the client to actually start playing the video. As a result, the user sees the video skip.

Need logo and other misc assets

Need logo for branding, to be used in these locations:

  • favicon
  • navigation bar

Should be in SVG format

Assets needed:

  • Logo design
  • Logo in minimized SVG
  • Placeholder image for videos that don't have thumbnail

Remove add button

Referring to the button with the text "Add" that shows under the "Add" tab. This button is no longer needed as a result of the add preview feature.

POST /room/:name/queue should accept args service and id

Currently, this endpoint only accepts url. This endpoint should also support adding videos to the queue by specifying service and id, where service refers to what service the video is hosted on, and id is the id of the video on that service.

Occasional skipping when playing long videos

This probably has something to do with setInterval not being super accurate. Maybe instead of adding 1 second to playback progress every tick, check the actual time delta since the last tick?

UnhandledPromiseRejectionWarning in server log on skipping video

[api-server] (node:32619) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'replace' of null
[api-server]     at dispatchHttpRequest (/home/carson/Documents/code/opentogethertube/node_modules/axios/lib/adapters/http.js:85:74)
[api-server]     at new Promise (<anonymous>)
[api-server]     at httpAdapter (/home/carson/Documents/code/opentogethertube/node_modules/axios/lib/adapters/http.js:20:10)
[api-server]     at dispatchRequest (/home/carson/Documents/code/opentogethertube/node_modules/axios/lib/core/dispatchRequest.js:59:10)
[api-server]     at process._tickCallback (internal/process/next_tick.js:68:7)
[api-server] (node:32619) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 45)

Room settings

Currently, there is no way to change a room's settings (things like the title, or description).

Video queue voting mode

Users should have the option to switch the room to "Voting mode." #51 and #52 should be implemented before attempting this feature.

Voting mode should order the videos in the queue according to user's votes.

Chat feature

The original togethertube had a chat feature that also served as an event log.

Users could send messages in the chat so other users in the room could see them. This chat box also doubled as an event log, meaning it would show messages like "[USER] joined the room", "[USER] skipped [VIDEO TITLE]", or "[USER] skipped to 3:25".

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.