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

Suggestion: Putting custom events on the global event queue #50

Open
bitapparat opened this issue Dec 14, 2024 · 2 comments
Open

Suggestion: Putting custom events on the global event queue #50

bitapparat opened this issue Dec 14, 2024 · 2 comments

Comments

@bitapparat
Copy link

Hi! I found no api to achieve this, thus i'd like to put up a suggestion for it.

I want to show an alert triggered by chat messages, but chat commands and keywords are too limited/rigid for this. Thus i'm using a widget that reacts to messages instead. This works, but i want the alert to not overlap with follower or subscriber alerts and as far as i understand message events don't arrive on the global event queue.
Is there any way for me to put a custom event for my alert onto the global event queue to prevent overlap with other alerts?

The alternative would be to handle follower and subscriber alerts in the widget, too, and to implement a custom queue. But that seems excessive for such a simple and not very exotic use case.

Any other suggestions on how to achieve this are welcome, too.

@c4ldas
Copy link

c4ldas commented Dec 14, 2024

You can use widgetDuration and resumeQueue so it can hold the notifications. You basically create an entry on FIELDS tab called widgetDuration with value of the maximum duration you want to pause the alerts, when your code is triggered.

{
  "widgetDuration": {
    "type": "hidden",
    "value": 15
  }
}

In your code, when the alert is finished, you call SE_API.resumeQueue() method to resume it again.
More information here:
https://docs.streamelements.com/overlays/custom-widget#resumequeue-method-and-widgetduration-property

@bitapparat
Copy link
Author

bitapparat commented Dec 14, 2024

You can use widgetDuration and resumeQueue so it can hold the notifications.

Thank you for the reply, but as far as i understand "message" events don't arrive on the queue so widgetDuration and resumeQueue have no effect in this case.

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

No branches or pull requests

2 participants