GithubHelp home page GithubHelp logo

stream-chat's People

Contributors

andi242 avatar davidpatzke avatar izzy avatar lodenrogue avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

stream-chat's Issues

More customization fields

As discussed in #35, I'll put here what I think should be upgraded:

  1. First of all, better differentiation between the standard vertical chat and others (the standard horizontal chat, bubble vertical, and bubble horizontal), because I have a slight issue, whenever I try to override the username color so the color for all usernames is the same in my vertical chat, even if I have two different links with different parameters(one for the vertical chat and one for the bubble vertical chat), I can't change it in any way (the "text_color" doesn't work), the only way for me to do it is in CSS and if I do that in the code, it will change my bubble username color as well since I modified the CSS part and I know it's not ok to do it like that, I tried even with "!important" and it changes the username color for every chat I'll make, another option is to just have two chat folders, one for my vertical chat, and one for the bubble chat, but that will be counter-productive, right?; So, in short, I'd love a better differentiation between each chat format;
  2. More customization options for the bubble chat:
    • customizable border size, border radius, color (for example I use it without the border and with no rounder corners), maybe even a shadow field;
    • username font name & color.
  3. Customizable announcement & highlight text options:
    • in my case, I'd want to have a specific announcement background color, message color & username color for all announcements, the same for the highlighted messages, and for now, that is not possible;
  4. Maybe customizable icons (Subscriber, Bit Cheerer, Broadcaster, Moderator, VIP, Announcement, etc.).

For now, I'll keep the highlight & announcements off, and if the text_color (which affects the username from what I understand) will work for each individual link (for different chats), then the no. 1 issue for me will be solved, in my opinion, that's the biggest issue I encountered.

Config Interface

To make it easier for non-tech users to set up the overlay it would be best to have a config interface.

This could be implemented by having a config=true option that displays the options available to the user, a preview of what the messages would look like and a drag-me button that has the URL set as href so users can drag and drop the final configuration into OBS.

Additionally presets for the most-used combinations could be displayed next to the preview.

Allow scrollback

When using the overlay for monitoring chat it would be good to have a certain amount of scroll back.

Unify bubble/non-bubble styling

The goal is to remove any additional code just in place for bubble styling and building everything over a unified code base to make the code less cluttered. This should be a priority before #44.

Possible solutions include templating, CSS-variables and the new addCSSRule implemented in #41

Add option to reverse the message flow

Adds option "Reverse Flow" in the settings which depending on the settings will change flow like following:

  • Bubbles
    • Bottom-Top -> Top-Bottom
    • Right-Left -> Left Right
  • No Bubbles
    • Top-Bottom -> Bottom-Top
    • Right-Left -> Left Right

Update notifications

It would be good to do opt-out notifications about new versions given that a lot of users won't notice a new version has been released.

An option to start new chat messages at the bottom (instead of the top)

Currently, new posts on a blank "canvas" are first displayed at the top. Then when the "canvas" is full, the chat is "pushed" upwards by the messages appearing at the bottom. The latter is "expected behavior" but it would be nice if there was an option to start the NEW chat messages on a blank "canvas" at the bottom.

Username colour doesn't change

Reproduced with sb_enabled=true&sb_twitch=true&highlights=true&announcements=true&text_color=ff0000&msg_color=002aff&direction=vertical&bubbles=false&debug=true

Discovered in #35

UI: Show connection status

Unless the Websocket is connected there should be some form of UI element showing that the Overlay is either connecting or that the connection failed.

Font configuration options

It would be good to have fonts configurable via the URL parameters. At least the following

  • font-size
  • font-family

Additional GFonts would be a nice-to-have.

Feature requests

I have a few feature requests.

  • Ability to hide bot messages
  • Ability to hide commands
  • Ability to display larger emotes
  • Fade messages after time

Some of the customizable fields don't work (at least in my case)

Hello! First of all, I wanted to say that I love this repo a lot! Thank you so much for all the work, it is awesome.

For a better understanding of what I want to do to use both the chat bubble and the vertical chat from the same chat.html, but with slightly different settings, and I want to keep it as simple as possible, with no badges, timestamps, pronouns or other things, just the username, text and emotes and maybe announcements to be displayed differently (which I saw it was added to the code already).

Now, getting to the issue at hand, the issues I encountered are:

  • pronouns appear whatever I do;
  • the username color remains the same (Twitch username color), even if I have set up the text_color in the link and the other text color variables in the browser source link;
  • also this is more of a nice-to-have thing, but in case the user selects vertical/horizontal vs bubble, it would be nice to have a different set of settings for each, for example, I'd want the username to be bigger on the bubble chat and smaller on the vertical chat.

I can do those changes directly in the CSS part of the HTML myself, but that would be very ok since the repo is getting updated and I'll have to adapt what I wrote every time it gets an update.

Preview images

This project should probably have some preview images for the README and the social media preview.

A good example image should show that different customization options are available.

The social media preview image "should be at least 640ร—320px (1280ร—640px for best display)".

New option for max. number of messages displayed

Should be an easy one, only needs to hook with a setting into the remove_old_messages()

stream-chat/chat.html

Lines 497 to 521 in 6eb92a8

function remove_old_messages() {
let chat = document.getElementById('chat');
let messages = chat.getElementsByClassName('chat-message');
let messages_to_remove = [];
for (let i = 0; i < messages.length; i++) {
// Remove messages that are outside the bounding box
// bottom when vertical scrolling is enabled,
// right when horizontal scrolling is enabled
if ((config['direction'] === 'vertical' && messages[i].getBoundingClientRect().bottom < 0) ||
(config['direction'] === 'horizontal' && messages[i].getBoundingClientRect().right < 0)
) {
messages_to_remove.push(messages[i]);
}
// Remove messages that are older than the max age (fade_duration)
else if (parseInt(config['fade_duration']) > 0 && window.getComputedStyle(messages[i]).opacity === "0") {
messages_to_remove.push(messages[i]);
}
}
for (let message of messages_to_remove) {
chat.removeChild(message);
}
}

Refactor of the add/remove message functions to allow multiple sources

For now this is specifically for YT comments, but also for general independance in terms of what data sources the overlay can work with, so if a user has a different websocket data source that emits chat messages, it should be as easy as possible to extend the overlay to accept these.

Once this is done, the SB YouTube chat should be integrated as a test.

Emotes aren't displaying

With the latest update, emotes don't display. I've tried with no arguments and with a bunch on.

chat.html?direction=horizontal&bubbles=true&badges=true&highlights=true&cmdprefix=!&bots=nightbot&fade_duration=120

Pluggable theme support

Change to the file structure would look like themes/[name-of-theme]/index.{js,css}

index.js would contain a config array that will be merged with the config.

index.css will be added via JS.

The generator would need a list of themes and the theme should be added to the URL.

Copy button does not work in Firefox

Uncaught (in promise) TypeError: 'clipboard-write' (value of 'name' member of PermissionDescriptor) is not a valid value for enumeration PermissionName.
    copyToClipBoard [url]/twitch-chat/generator.js:324

Wordwrap issue

If someone send a long message the text doesn't do a word wrap when it reaches the end of the area defined.

EX: sd;lghkfsd;lkhsd;flkhsd;flkhsd;flkhsd;flkgs;dflgksd;flgksd;flgks;dflgksdl;fkg;sdlfkg;sdlfgsdfljkhg;seiuhgy;ser8urhg'sierthjs

Does not fit in a area off 300x500.

Screen shot attached of chat box and stream chat to show example.

2022-04-21 13_36_06-OBS 27 2 4 (64-bit, windows) - Portable Mode - Profile_ Twitch 2_1 - Scenes_ Twi

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.