Git Product home page Git Product logo

ponytone's Introduction

ponytone

Ponytone is a web-based online multiplayer karaoke game.

Getting Started

The easiest way to get an instance of Ponytone running is using docker-compose. To get an instance running, run:

$ docker-compose up

This will still be pointing at music.ponytone.online to fetch music, which is currently hardcoded. (want to fix this? make a PR!)

To rebuild the frontend, run yarn build, which will invoke webpack.

Importing songs

The provided importmlk.py script takes a URL to an MLK-style archive and will download the file, upload all the relevant parts to S3, and insert some metadata into the database.

...

There's probably a lot more to say. Talk to me! KatharineBerry on Telegram or #1 on Discord (or try the Ponytone Discord server.

ponytone's People

Contributors

barbeque-squared avatar katharine avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar

ponytone's Issues

Cannot get ready

Cannot get ready when there are more than two people.
How to check what happens? It is a network issue?

Notes and score doesn't appear occassionaly.

Unknown what causes this, but the notes and score will occasionally not appear for the play. The song still plays and the player returns to the lobby. Resizing does not solve the issue.

[Bug] [Chrome 81+] Usage of RTCPeerConnection close causes the party to break when a player leaves.

Summary:

Chrome 81 changed the behaviour of RTCPeerConnection close to not fire a signalingstatechange event when close is called directly. https://bugs.chromium.org/p/chromium/issues/detail?id=699036

Ponytone currently relies on this behaviour to remove a player when they leave the game.

https://github.com/Katharine/ponytone/blob/0702367/assets/js/lib/party/p2p.ts#L130-L141
https://github.com/Katharine/ponytone/blob/0702367/assets/js/lib/party/comms.ts#L133-L136

Affected Browsers:

  • Chrome 81 onwards.

Expected Behaviour

When a player leaves the party they should be removed and the remaining players should be able to continue with their game.

Current Behaviour

Due to the change in behaviour in Chrome when a player leaves the party their RTCPeerConnection is not removed from the rtcConnections hashTable used by the other players. This causes exceptions when messages are broadcasted and breaks the party as no additional communication can be done between the players. To fix this the players must setup a new party and join it instead.

Example Exception.

Uncaught DOMException: Failed to execute 'send' on 'RTCDataChannel': RTCDataChannel.readyState is not 'open'
    at e.PeerConnection.send (https://ponytone.online/static/party-d25a40a65fe468cece0b.js:1:40635)
    at e.NetworkSession.broadcast (https://ponytone.online/static/party-d25a40a65fe468cece0b.js:1:32830)
    at e.Party.setReady (https://ponytone.online/static/party-d25a40a65fe468cece0b.js:1:31792)
    at e.GameController._handleReady (https://ponytone.online/static/party-d25a40a65fe468cece0b.js:1:27739)
    at e.Ready.<anonymous> (https://ponytone.online/static/party-d25a40a65fe468cece0b.js:1:25472)
    at e.Ready.n.emit (https://ponytone.online/static/party-d25a40a65fe468cece0b.js:1:1364)
    at e.Ready._handleReady (https://ponytone.online/static/party-d25a40a65fe468cece0b.js:1:89654)
    at HTMLButtonElement.button.onclick (https://ponytone.online/static/party-d25a40a65fe468cece0b.js:1:88492)

Possible Solution

Either;

I'm not familiar with WebRTC so I don't know which of the above is better or if there is another more appropriate solution.

[Suggestion] Toggle download of videos of the songs

Most of the songs includes videos. Which looks great indeed. But it sadly makes the song loading very long. In some cases, loading is even more long than the song itself.

So I suggest an option that enable or disable videos in songs. This way, one can have the option of downloading only the audio and other stuff, making the loading time really less long.

[Feature] Song sort & filter

Song selection list needs:

  • Sort by title, artist, album, instrumental
  • Search by song, artist, album
  • Browse by filter (artist, duets, instrumental, etc)

Song doesnt start when tabbed out

"Fade in animation is tied to frame rate. When you're tabbed out, you have a frame rate of 0, so the animation never starts, thus neither does the song."

Cannot import ogg

Newer songs have started to use the ogg format in favour of mp3. Example: A Final Twilight

I have created a fix for this problem in a branch, by just using the general mutagen importer instead of the mp3-specific one: https://github.com/barbeque-squared/ponytone/tree/import-ogg
However, I literally cannot tests if this actually works in browsers, otherwise I'd have created a pull request instead.

For reference, without the fix you get this error when importing ogg:

$ docker exec ponytone_web_1 python importmlk.py https://www.mylittlekaraoke.com/store/beta/dotmlk/Community/4EverfreeBrony%20-%20A%20Final%20Twilight%20%28Cover%29.tar.mlk  postgres://postgres:postgres@db:5432/postgres
Traceback (most recent call last):
  File "importmlk.py", line 155, in <module>
    info = song_info(tar, filename)
  File "importmlk.py", line 82, in song_info
    duration = mutagen.mp3.MP3(tar.extractfile(mp3_path)).info.length
  File "/usr/local/lib/python3.6/site-packages/mutagen/_file.py", line 49, in __init__
    self.load(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/mutagen/_util.py", line 129, in wrapper
    return func(self, h, *args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/mutagen/id3/_file.py", line 406, in load
    self.info = self._Info(fileobj, offset)
  File "/usr/local/lib/python3.6/site-packages/mutagen/_util.py", line 158, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/mutagen/mp3/__init__.py", line 396, in __init__
    raise HeaderNotFoundError("can't sync to MPEG frame")
mutagen.mp3.HeaderNotFoundError: can't sync to MPEG frame

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.