Asvarox / allkaraoke

Online Karaoke game with pitch detection in your browser
https://allkaraoke.party
85 stars 17 forks source link
game karaoke online-game party singstar typescript ultrastar webrtc

Karaoke in the browser - click here to play online

Getting started

Requirements

  1. Node (check .nvmrc for version)
  2. pnpm

Install dependencies

pnpm install

Run

pnpm start

Run in offline mode

Plays dummy local video instead of YouTube to work properly in offline environments (eg. planes).

pnpm start:mock

Localhost service worker

Locally the app runs on HTTPS (with dummy cert) so remote microphones work. This makes the Service Worker not work due to untrusted origin. See this document how this can be fixed.

Build for production

pnpm build

Development

By default, dummy (simulated) microphones are used. You can use whatever other mic.

Connecting remote mic to dev server

You can just copy the link and open it in a new browser tab or whole new browser. If you want to connect actual phone to the dev server, you need to run it with --host flag, eg pnpm start --host (and open the actual IP link).

Note that some songs won't work (YouTube will block the access), probably due to the host being an IP.

E2E tests

Running against the dev server if it's running by simply running

pnpm e2e

You can run specific test and specific browser, headed or with debug like so

pnpm e2e --project="chromium" --headed --debug tests/song-list.spec.ts

It's also possible to run the tests against prod build (same as in CI) - it makes the tests run slightly faster:

pnpm e2e:prod

For that you might want to keep following command running separately to not have the app built every time tests are run:

pnpm build:serve

Run unit tests

pnpm test

Misc docs

Documentation about specific topics can be found in docs/ folder.

Terminology:

Note types