Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
izzy opened this issue Jul 11, 2022 · 3 comments
Open
Assignees
Labels
enhancement New feature or request

Comments

@izzy
Copy link
Owner

izzy commented Jul 11, 2022

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.

@izzy izzy added the enhancement New feature or request label Jul 11, 2022
@izzy
Copy link
Owner Author

izzy commented Jul 11, 2022

@andi242 you sorta worked on this already, right? Since I don't really work with YT streaming, could you provide me with some messages(preferably as JSON) that the SB websocket emits here?

@izzy izzy self-assigned this Jul 11, 2022
@andi242
Copy link
Contributor

andi242 commented Jul 15, 2022

Sorry for the late reply!

I have some example json that should do :)

[
    "Event",
    {
        "timeStamp": "2022-06-02T19:01:39.2554885+02:00",
        "event": {
            "source": "YouTube",
            "type": "Message"
        },
        "data": {
            "message": "mit emote 😀",
            "eventId": "LCC.CikqJwoYVUNMdk1VYmhsb0hvX0k0b3RjZVN0U29nEgtDa1Z0anozcF9yNBI6ChpDUENodkt1ZmpfZ0NGVXZ3d1FvZEQySU1RQRIcQ1BqUjNMdVVqX2dDRlFuZVZRb2Q3RmtPMEEyNA",
            "user": {
                "id": "UCLvMUbhloHo_I4otceStSog",
                "url": "http://www.youtube.com/channel/UCLvMUbhloHo_I4otceStSog",
                "name": "andi242",
                "profileImageUrl": "https://yt3.ggpht.com/U75sKXEC9YdTLqwC2qbzI80QoO4oarJCw9xg66uILq5ndEvRXkOeaLJ03nwGrP1YamLVzQb4Rw=s88-c-k-c0x00ffffff-no-rj",
                "isOwner": true,
                "isModerator": false,
                "isSponsor": false,
                "isVerified": false
            },
            "publishedAt": "2022-06-02T19:01:36.914732+02:00"
        }
    }
]
[
    "Event",
    {
        "timeStamp": "2022-06-02T19:03:30.0217939+02:00",
        "event": {
            "source": "YouTube",
            "type": "Message"
        },
        "data": {
            "message": "messaddd :hydrate::hydrate::hydrate:",
            "eventId": "LCC.CikqJwoYVUNMdk1VYmhsb0hvX0k0b3RjZVN0U29nEgtDa1Z0anozcF9yNBI6ChpDTm1uemVDZmpfZ0NGVFVHMWdBZGVic0paURIcQ1BqUjNMdVVqX2dDRlFuZVZRb2Q3RmtPMEEyNg",
            "user": {
                "id": "UCLvMUbhloHo_I4otceStSog",
                "url": "http://www.youtube.com/channel/UCLvMUbhloHo_I4otceStSog",
                "name": "andi242",
                "profileImageUrl": "https://yt3.ggpht.com/U75sKXEC9YdTLqwC2qbzI80QoO4oarJCw9xg66uILq5ndEvRXkOeaLJ03nwGrP1YamLVzQb4Rw=s88-c-k-c0x00ffffff-no-rj",
                "isOwner": true,
                "isModerator": false,
                "isSponsor": false,
                "isVerified": false
            },
            "publishedAt": "2022-06-02T19:03:28.343049+02:00"
        }
    }
]

@andi242
Copy link
Contributor

andi242 commented Jul 15, 2022

in addition, I got all the events that can be subscribed to as json
the tricky thing was to find out what events to subscribe to, when using YT.
the event is youTube which might be a typo on SB side. YouTube did not work... not sure if they fixed this in the meantime.

{
    "id": "obs-chat",
    "events": {
        "general": [
            "Custom"
        ],
        "twitch": [
            "Follow",
            "Cheer",
            "Sub",
            "ReSub",
            "GiftSub",
            "GiftBomb",
            "Raid",
            "HypeTrainStart",
            "HypeTrainUpdate",
            "HypeTrainLevelUp",
            "HypeTrainEnd",
            "RewardRedemption",
            "RewardCreated",
            "RewardUpdated",
            "RewardDeleted",
            "CommunityGoalContribution",
            "CommunityGoalEnded",
            "StreamUpdate",
            "Whisper",
            "FirstWord",
            "SubCounterRollover",
            "BroadcastUpdate",
            "StreamUpdateGameOnConnect",
            "PresentViewers",
            "PollCreated",
            "PollUpdated",
            "PollCompleted",
            "PredictionCreated",
            "PredictionUpdated",
            "PredictionCompleted",
            "PredictionCanceled",
            "PredictionLocked",
            "ChatMessage",
            "Host",
            "ChatMessageDeleted",
            "UserTimedOut",
            "UserBanned"
        ],
        "streamlabs": [
            "Donation",
            "Merchandise"
        ],
        "speechToText": [
            "Dictation",
            "Command"
        ],
        "command": [
            "Message",
            "Whisper",
            "MessageCooldown"
        ],
        "fileWatcher": [
            "Changed",
            "Created",
            "Deleted",
            "Renamed"
        ],
        "quote": [
            "Added",
            "Show"
        ],
        "misc": [
            "TimedAction",
            "PyramidSuccess",
            "PyramidBroken"
        ],
        "raw": [
            "Action",
            "SubAction"
        ],
        "websocketClient": [
            "Open",
            "Close",
            "Message"
        ],
        "streamElements": [
            "Tip",
            "Merch"
        ],
        "websocketCustomServer": [
            "Open",
            "Close",
            "Message"
        ],
        "donorDrive": [
            "Donation",
            "ProfileUpdated"
        ],
        "youTube": [
            "BroadcastStarted",
            "BroadcastEnded",
            "Message",
            "MessageDeleted",
            "UserBanned",
            "SuperChat",
            "SuperSticker",
            "NewSponsor",
            "MemberMileStone",
            "NewSponsorOnlyStarted",
            "NewSponsorOnlyEnded",
            "StatisticsUpdated",
            "BroadcastUpdated"
        ],
        "pulsoid": [
            "HeartRatePulse"
        ],
        "hypeRate": [
            "HeartRatePulse"
        ],
        "kofi": [
            "Donation",
            "Subscription",
            "Resubscription",
            "ShopOrder",
            "Commission"
        ],
        "patreon": [
            "FollowCreated",
            "FollowDeleted",
            "PledgeCreated",
            "PledgeUpdated",
            "PledgeDeleted"
        ],
        "application": [
            "ActionAdded",
            "ActionUpdated",
            "ActionDeleted"
        ],
        "tipeeeStream": [
            "Donation"
        ],
        "treatStream": [
            "Treat"
        ]
    },
    "status": "ok"
}

I had a hard time finding this out, since I had no idea how to get to this :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants