Glimesh / glimesh.tv

Glimesh is a next generation live streaming platform built by the community, for the community.
https://glimesh.tv
Other
461 stars 77 forks source link

Streamers can raid other channels #905

Closed MemoryLeakDeath closed 1 year ago

MemoryLeakDeath commented 1 year ago

Description

Our community has expressed an interest in being able to raid other streamers on the platform live as they are completing their own stream. This is beneficial to the platform as a whole as it helps our streamers cross-promote each other and increase the visibility of the diversity of content on Glimesh.

Raiding differs from Hosting in that hosting is typically an automatic process that streamers set up ahead of time and it happens while they are offline. Raiding is a spur-of-the-moment action that streamers may wish to take while they are live and about to end their stream.

Feature Details

Streamers must meet the following qualifications to raid other streamers:

Settings page

manage-raiding

Workflow

A streamer initiates a raid via the following steps:

1) Finding someone to raid A streamer can open the Glimesh website and navigate to one of our category pages. At the top of the page there will be a filter button called “Can raid?” they can toggle on and the page will show them only the streams that are available for them to raid. This filter is based on the logged-in streamer so it will not show streams that have blocked that streamer from raiding them via the settings above. filters

2) Commencing a raid After filtering the channels down to raid-able ones, the streamer can then click on the stream in the category list and go to that streamer’s stream page. At the top of the stream page, there will be a “Raid” button next to the “Support” button. This button will ONLY appear to streamers that are currently live and able to raid the channel. The button does not appear on the raiding streamer’s own channel (ie. they cannot raid themselves). raid-button

3) The raid countdown begins Upon clicking the “Raid” button, the streamer will be prompted to make sure they want to raid the channel and that raiding will stop their stream after a set timer. If the streamer clicks “OK”, the raid button will change to a “Cancel Raid” button with a 30 second timer. The streamer may cancel the raid before that timer completes. raid-prompt

cancel-raid

When the raid timer begins, viewers on the raiding streamer’s channel will receive a toast notification at the top of the chat area about the impending raid and they are presented with a “Yes/No” option to participate in the raid. By default “Yes” will be selected for the viewers if they do not respond to the toast. raid-toast

If the streamer cancels the raid, the viewers will all receive this message: cancel-raid-message

4) The raid countdown completes Once the 30 second countdown completes, a scheduled job in the backend will pull all the viewers that had said yes to participating in the raid to the target raid channel. I then call “stop_stream()” on the raiding streamer’s channel which should take them offline (I don’t know if OBS will attempt to reconnect, so we should advise streamers to stop their streams when the raid goes through). The target raid channel will then have their customized “raid event” message posted to the chat.

raid-chat-message

The raid events are flagged as events in the chat api via a new boolean column “is_raid_message”, so third party bots should be able to detect the event once they are updated to look for it.

Statistics

I’ve added Raid statistics to the statistics page under settings. I track the number of raids for a stream and the total number of viewers that came from those raids for that stream. I’ve also updated the statistics page to only load 30 rows at a time and to use infinite scroll to load additional pages of rows. This should hopefully make the page load faster. channel-stats

Limitations

Technical Details