#dev-chat

1 messages ยท Page 46 of 1

crisp shuttle
#

I changed the size of the widget but nothing changes :/

#

ooooh, my overlay is 1080x720 (I think) but I put my widget 700x500

#

maybe I just need to have the same size for both

#

OKAY my overlay is 1920x1080, I put the same size for the custom chat and it works

#

thx ๐Ÿ™‚

winged steppe
#

I've been researching a way to animate the supporter labels so that they start to glow, burn away then ashes/particles reform into the new text when the label data changes. I'm unfamiliar with the limitations of css/JavaScript, but does anyone know if there is a way for something like that to be coded to sync up with a follow/sub alert so that it flows seamlessly into the label animation?

wraith flame
#

Hi so I'm trying to make a Chat Workaround by using some CSS and the YouTube Chat Link.
It already works in OBS but I'd like to integrate in into Streamelements so I don't need seperate Browser Sources.

My question is how I need to import the YouTube Pop-Out Chat into Streamelements to achive a similar result?

hardy walrus
#

@wraith flame click the blue plus sign on the overly editor and choose custom widget. Click layer, settings, paste accordingly.

viral patrol
#

I just checked if it is possible to nest it and as I thought - it is not possible to do that as widgets are in secured iframes. You will have this error:

tribal zenith
#

are iframes even allowed in general? I tried to iframe StreamElements itself and still got the error LUL

charred vortex
#

i really doubt it, but i might as well ask. is there a way to answer some commands through the bot account and some through my account?

wraith flame
#

Thanks, I hoped it would work but I think there might be a possibility in the future for a workaround in General ๐Ÿ˜‰

viral patrol
#

Yup. Iframes are blocked by chromium policy (same origin), so you won't be able to use iframes, cookies, localstorage.

sage bane
#

Hi there! I applied through the form something like 5 months ago and never got any feedback. One of my Colleagues at Touch Portal tweeted about this and the response was for me to contact you directly.

#

And now the form says it's closed

hallow field
#

Good morning, first Q here... Is there an overlay that can be triggered to display a bit of trivia? Kind of like VH1 pop up videos, would like to overlay with in/out animation, based on what my moderator puts in.

viral patrol
#

@sage bane I will get back to you once I have any details about that.

#

@hallow field Unfortunately I am not sure what do you mean. There are 2 trivia widgets on #widget-share channel. One for bot and one for pokemon guess on screen.

hallow field
#

no, not like that, during a live stream, I want have mod talk about the song "This song was released in 1972", "Made on a budget of 10 dollars" and so on, Didn't want to have to build my own if one already existed.

viral patrol
#

Oh. There's nothing ready like that

sage bane
#

@viral patrol sounds good, thanks

viral patrol
#

@sage bane But do not hesitate to ping me so I ping again as due to timezones differences some messages may get lost.

sage bane
#

K

glass kettle
#

Hello, I noticed a little problem on custom widgets.
When I create it by adding it from Streamelements, my event refreshes about every 15 seconds except that of another (publish widget) is instantaneous. I don't understand, so I copy and paste its code on my widget but I still had the 15 seconds. So I took its widget, erased all its code to paste my code, that solved my 15 second problem but the widget still has its name (sorry im french)

#

If I am given 100 donation, it will take 25 minutes to arrive at the last donation

#

can it come from the fact that I have not made a request for publication?

viral patrol
#

Definitely not. All widgets should work properly, even not published (as SE doesn't force for publication). Your widget seems to take some time to play animations, maybe it listens to events and has no resumeQueue along with widgetDuration property

glass kettle
#

I didn't use widgetDuration before and after, but the 15 seconds disappeared

#

I tried absolutely everything before, I even told myself that the 15 seconds were normal, then I looked at those of the others and they did not have the 15 seconds, suddenly the only thing that has changed is that the basic widget does not come from me

#

I don't add anything to make the 15 seconds disappear, I just paste my code on another widget

viral patrol
#

Do you maybe parse every event by some queue? As you may parse message events too

glass kettle
#

I see the words queue in the log and the problem is resolved and I intend to share it soon.

#

it's your level-up goal widget that inspired me and make me want to create my own @viral patrol ๐Ÿ™‚

viral patrol
#

I just mixed together two widgets ๐Ÿ™‚

winged steppe
#

I've been researching a way to animate the supporter labels so that they start to glow, burn away then ashes/particles reform into the new text when the label data changes, but I can't seem to find exactly what I'm looking for. I'm unfamiliar with the limitations of css/JavaScript, but does anyone know if there is a way for something like that to be coded to sync up with a follow/sub alert so that it flows seamlessly into the label animation?

Any ideas?

hard spear
#

With SE_API.store.put - can anyone explain why I might be getting 400 status codes back (precisely, 400, bad request)? are there rules on variable naming I need to abide by or some such?

viral patrol
#

@winged steppe You can apply any JS/CSS animation to a widget/label, so if you have one, you just need to tie it with for example custom event list of one event only where burning away/reforming is when new event is received

#

But I am not aware of animations like that

#

@hard spear Are you sure you are using object as value?

sage bane
#

@viral patrol hey, getting back to you, any news ?

viral patrol
#

@sage bane pinging forward as I got no updates.

sage bane
#

Ok, thanks

#

Also, is there a complete Java Api for SE ?

viral patrol
#

Do you mean API wrapper?

sage bane
#

Yeah, some kind of project that I can use as a dependency that will handle Api calls , socket connection and events

viral patrol
sage bane
#

That's not what I meant

#

Don't bother, I'll search

viral patrol
#

I think I know what you are looking for, but I am aware of PHP wrapper only.

winged steppe
#

@viral patrol Thanks, I'll check out the timing on the custom events lists

viral patrol
#

@winged steppe Basically your purpose is a regular eventlist, but limited to one event only.

sage bane
#

This request should respond with an array of objects and not just 1 object I believe

#

Also, it would be better to use the JSON API spec for v3, if that will be a thing

#

If I may suggest, I mean ๐Ÿ˜‰

#

Is it really in progress or it's just forgotten into the limbs? ๐Ÿ˜‰

pulsar willow
#

create one app for ps4 or ps5

hard spear
#

@viral patrol oh, it has to be an object and not say, a json string, string, float? Okay thanks. Further, what types can it contain? Can I assume it accepts anything that is rooted with an object and survives a naive parse(jsonify(x))?

viral patrol
#

This can be a simple object (no semireferences, functions)

#

So you can have:

{
"value":15,
"username":"amazingUser",
"items":[1,2,5]
}
hard spear
#

Perfect.

#

admittedly, I was passing it the result of a JSON.stringify() - mainly for backward compatability with a version of my widget code that operates without streamelements overlays. (This is the first stage of a migration from a purely local storage version - which has been awkward for providing tech support to the limited circle of people I made my widgets for)

#

Unfortunately I've only been able to work on it sparing lately (1-2 days in a month) due other commitments.

#

But, it won't be hard to pass it the raw objects. Thanks.

viral patrol
#

Also - you don't have access to localstorage from widget

hard spear
#

yeah, I noticed that one.

#

Is there any documentation on api call limits for the api store? I don't quite recall what call rates to read/writes I have atm, though as part of the migration I have been trying to tune it to once per external event I suppose.

#

(to be clear the backward compatability is achieved using polymorphism and checking for the existance of the SE_API window var)

viral patrol
#

I am not sure about ratelimiting there as bucket limit headers are not forwarded to widget AFAIK

wicked quiver
#

Hey, hi, everyone!
I came here while I was searching about Custom Widgets in StreamElements. I want to do something kinda different. It's a Countdown Timer with some particularities:

1- I want it to be easy to reset. For example, if it starts in 2:00 and goes to 0, I wish I could easily reset it and turn into 2:00 again even if it wasn't reach the 0.
2- I want to make its time "decreasable" by the Cheering from the people watching the stream.

My idea is have a counter to determinate how many time a guest will have to answer correctly a riddle in my stream, but with the possibility to the chat of giving bits to reduce the guest's timer and make its life harder.

Well, with all this said... I will continue doing my search, looking the JS documentation and everything, but... IF someone here already done something like this and could give me some light or just chat with me about, I would be very grateful.

Thenk you very much if you read until this far! Sorry about some text mistakes, english isn't my first language! Have a nice day =]

jolly cradle
#

i have an idea to improve the AUTOPOLL widget on the official widget list but i dont know js. i think all it takes is adding a single line of code and duplicating lines 52-54 into it

#

the ability to auto-end polls after X seconds instead of having to manually type !endpoll in chat

jolly cradle
#

im about to give up on this lol

#

i got an idea

#

is there a way to make streamelements chat bot automatically say !endpoll 20 seconds after a mod !startpoll?

viral patrol
#

Remember, there's a delay between chat and stream

jolly cradle
#

thats fine, the delay is about 3 seconds, 10 seconds in the worst case

#

so the duration could be increased to 25 or 30 sec if 20 feels too short

#

is it possible though?

viral patrol
#

Something like that

#
       setTimeout(()=>{
            isActive = false;
            displayWords();
            $('.container').delay(1000 * userOptions['wordTimer']).fadeTo('slow', 0);
            
        },20000);
jolly cradle
#

thanks thats exactly what i was trying to do

#

i mustve been failing on the syntax

#

and i dont know how to test to see where it as giving an error..

#

i was modifying the code inside the SE editor and then it would just not do anything lol

#

thanks

#

hmm is the ; after },20000) needed or not

#

in the paste it wasnt there (and the thing worked)

#

in the snippet you posted it exists and when i added it it broke again ;x

#

wait nevermind it worked either way. so whats even the point of the ; LULW

viral patrol
#

Great!

jolly cradle
#

is it possible to change the way the thing looks after voting closes but before the widget fades out?

#

because right now theres no difference (if you have the 'live' feature enabled)

#

if it could grey-out or remove the options that werent chosen when !endpoll or the automatic timer runs out it would make more sense ๐Ÿค”

viral patrol
#

Yup. But it is not a "copy/paste" thing, more of code should be added

jolly cradle
#

yeah i was worried about that ๐Ÿ˜ฆ

#

it is what it is i guess, ill just set the fade-out to be slightly longer

#

thanks for the help btw this is great

pastel raft
#

I have a !google command, but is there a way to get a !translate command even if it just googles {translate to (specific language) $(1:)}

#

I'm not sure this is the right channel, but thought this may need to be an api rather than a stand alone command

hardy walrus
#

@pastel raft You might be able to get away with a command but gonna be major thonkingintensifies

#

How are you wanting to use the command along with a response?

pastel raft
#

I want to do !translate example text and have it return either with the googled link to the translation or, what would be epic is just the translation itself.

hardy walrus
#

specific languages or interchangable?

pastel raft
#

if a specific language then to Latvian but interchangeable would be cool

#

maybe !translate latvian example text and return $(channel $(1)) translation $(2:) or something

hardy walrus
#

This will have anything following the command translated from english to latvian ${customapi.https://translate.google.com/?hl=en&tab=TT#view=home&op=translate&sl=en&tl=lv&text=${1:}}

#

Or the link for it at least.

pastel raft
#

WOW Thank you so much!!!

hardy walrus
#

As far as interchangeable I'd have to ask someone something.

pastel raft
#

Thank you, I am testing it dow

#

now

hardy walrus
#

Though actually might need to do a small change if it includes spaces

#

Yup. Thought so.

pastel raft
#

@hardy walrus I may have done it wrong... thi.... yup lol

hardy walrus
#

Change this to the end after that last equal ${queryescape ${1:}}

pastel raft
#

Bot returning --> <!DOCTYPE html><html lang="en"> <head> <style>@import url('https://fonts.googleapis.com/css?lang=en&family=Product+Sans|Roboto:400,700');.gb_1a:not(.gb_Rd){font:13px/27px Roboto,RobotoDraft,Arial,sans-serif;z-index:986}@keyframes gb__a{0%{opacity:0}50%{opacity:1}}a.gb_0{border:none;color:#4285f4;cursor:default;font-weight:bold;outline:none;position:relative;text-align:center;text-decoration:none;t

hardy walrus
#

Yeah.

#

https://translate.google.com/?hl=en&tab=TT#view=home&op=translate&sl=en&tl=lv&text=${queryescape ${1:}}

#

Use just that instead.

pastel raft
#

That works, Thanks again!!!

hardy walrus
#

Let me ask about the interchangeable way.

pastel raft
#

OK looks like it would be tricky, it would be super cool though.

hardy walrus
#

I have an idea of how it might work but not sure if it actually does.

pastel raft
#

No worries, this works well as is. I wish the bot could just read the translation, but I think that would be the tricky part.

hardy walrus
#

That unfortunately is marching into $$$$$ area.

pastel raft
#

100%

hardy walrus
#

BUUUUUT

pastel raft
#

if it can be done for $50 I'm in, but I'm kinda cheap/broke ATM lol

hardy walrus
#

Got it interchangable.

#

You just have to know the language codes.

pastel raft
#

WHAT?!?! How?

#

Yes, but how can you change 2 variables and still have a 3rd?

hardy walrus
#

!command Language1 Language2 Message
https://translate.google.com/?hl=en&tab=TT#view=home&op=translate&sl=${1}&tl=${2}&text=${queryescape ${3:}}

pastel raft
#

DUDE!

#

I was thinking something like this, but didn't know you could break it into more than $(2:)

hardy walrus
#

That being hi hi translated from english to spanish.

pastel raft
#

That's freaking sweet!

sage bane
#

@viral patrol Sorry to ask again, but do you have any news ?

viral patrol
#

I have news, but they are not really good ones. Unfortunately we should wait a bit longer. I got no ETA on that, but SE devs are working on OAuth2 and new credentials are postponed (regardless oauth2 request form which caused big load ๐Ÿ˜‰ ). I hope I will have some good news soon

sage bane
#

The thing is that I applied 5 months ago and Touch Portal users are told to wait since then :/

#

Anyway, thanks for trying ๐Ÿ˜‰

glass cipher
#

hey, i was about to implement the snake widget into my stream but i don't know what the variable for Followerpoints is. Because i want the snake to move even on followers currently. Can you pls tell me the command for that? ๐Ÿ˜„

viral patrol
#

@glass cipher Hi. I added followers to snake game, You need to get that widget again from widget-share channel

sage bane
#

@viral patrol What should I tell Touch Portal team and users then? "Wait a bit more"?

lunar beacon
#

hello,
i am trying to use CSS "backdrop-filter blur" but seems like StreamElements is not accepting it. Can you plz help!
Thanks! ๐Ÿ™‚

tribal zenith
#

@lunar beacon what do you mean by "not accepting it"?

viral patrol
#

Seems to be working on my end:

.title{
 backdrop-filter: blur(1px); 
}
#

As you can see, overlay editor dots are under semitransparent blur

tribal zenith
#

in Firefox you probably need the the moz prefix, but that doesn't matter for BrowserSources in OBS since they are based on Chromium

lunar beacon
#

i was using the following code
.GoalPro{
display: block;
background-color: rgba(0, 0, 0, 0.5);
height: 100%;
width: 40%;
backdrop-filter: blur(5px);
}
and got this result

#

I checked it again. it seems to be working on Browser but not on OBS

glass cipher
#

@viral patrol can't find it there.... ๐Ÿ˜ฆ (the Snake Widget)

viral patrol
#

Oh. There was a typo. Follower point was labeled as sub point too.

#

Fixed it now

tribal zenith
#

@lunar beacon which of those is the desired outcome?

glass cipher
#

@viral patrol can you give me the download link pls? i am literally blind -.-

glass cipher
#

thank you very much!

lunar beacon
#

@lunar beacon which of those is the desired outcome?
@tribal zenith this is the desired outcome, this is a snap from SE widget editor. but OBS shows it without blur

tribal zenith
#

which version of OBS do you use?

lunar beacon
#

i currently have 26.0.2 (64 bit)

viral patrol
#

Maybe using -webkit-backdrop-filter instead will help?

tribal zenith
#

hmm thats strange..I had

backdrop-filter: blur({{glassBackgroundBlur}}px);
border: 1px solid {{glassBackgroundBorder}};```
in my CSS in an older project and that worked in BrowserSources as well ๐Ÿค”
viral patrol
#

OBS CEF is more strict than web browser

lunar beacon
#

Maybe using -webkit-backdrop-filter instead will help?
@viral patrol this din't work

#

hmm thats strange..I had

backdrop-filter: blur({{glassBackgroundBlur}}px);
border: 1px solid {{glassBackgroundBorder}};```
in my CSS in an older project and that worked in BrowserSources as well ๐Ÿค”

@tribal zenith lemme remove the alpha channel from the colour once

tribal zenith
#

I had an alpha channel as well. So that shouldn't matter

lunar beacon
#

yes. removing the alpha didn't do anythng as well

#

so the only difference is the border.

tribal zenith
#

yeah but that has nothing to do with the filter

#

if your browser displays it correctly, but OBS doesn't it should have to do with Chromium versions

lunar beacon
#

maybe the chromium version or something??

#

I tested it in google Chrome it worked. I dn hv chromium as of now

#

if your browser displays it correctly, but OBS doesn't it should have to do with Chromium versions
@tribal zenith ok. I will look into it. Thanks ๐Ÿ™‚

tribal zenith
#

it's unlikely to change things, but you could try to delete the default custom CSS in your BrowserSource. maybe it messes with the background declarations

lunar beacon
#

it's unlikely to change things, but you could try to delete the default custom CSS in your BrowserSource. maybe it messes with the background declarations
@tribal zenith yes, that's empty. I deleted it

tribal zenith
#

okay. yeah if prefixing didn't work either the backdrop-filter is most likely not supported in your BrowserSource version

lunar beacon
#

should i install Chromium thn?

tribal zenith
#

nah, the obs-browser comes with a debugger you can attach to and change css or check the version via console.log

#

just add "--remote-debugging-port=9222" to the exe and open it in localhost

lunar beacon
#

alright man! i will try that. Thank you very much ๐Ÿ™‚ ๐Ÿ™‚

glass cipher
#

@viral patrol just a little question: Does your snake widget progress stay the same from scene to scene? I mean, the length and position etc. if i switch from my BRB Scene to another scene that i implemented it in

tribal zenith
#

no problem. you can check browser and version with

console.log(navigator.appVersion);
console.log(navigator.userAgent);```
viral patrol
#

The best way is to set it on separate overlay with "shutdown source when not visible" not ticked @glass cipher

#

As each widget would be a separate instance, so they would look different on scene change if they are hard element of that overlay

#

Keeping it separate will avoid that

cloud iris
#

Like I feel I should change something in this code to pull the mods in, but not sure what and how:


} else if (event.type === 'tip') {
            if (tSum < session['tip-count']['count']) {
                addEvent('tip', event.name + " - " + event.amount + '' + userCurrency.symbol);
                tSum += 1;
            } ```
viral patrol
#

The easiest way is to add a separate section in HTML for mods and type them inside.

tribal zenith
#

or parse chat messages and log every mod that typed during that stream. Unless you always want all mods

cloud iris
#

@viral patrol Ok yeah that works too. Is it possible, because I already added a field for a mod header in the scrolling credits, is it also possible to add a field in the "fields" part of the custom code, that is more than a single line? So I can type them in there, instead of in the code itself?

#

Does that make sense?

#
        "type": "textfield",
        "label": "Mods label",
        "value": "Mods" ```
I feel like this "type" should be something like "multiline text field", or text box perhaps? But not sure if that'd work?
glass cipher
#

@viral patrol alright, the length stays the same. But the snake moves after setting the Source up. So that every snake is at a different position.

viral patrol
#
 <div class="credits-sections__item" style="display:block">
                <h2>{{modsLabel}}</h2>    
                <ul class="people-list col{{columns}} mods" style="display:flex">
                <li class="people-list__item">Mod1</li>
                <li class="people-list__item">Mod2</li>
                <li class="people-list__item">Mod3</li>
                <li class="people-list__item">Mod4</li>
                </ul>
</div> 
#

Something like that

#

@glass cipher this is why you should have a single overlay, just with snake widget and use it on separate scenes

#

With "shutdown source when not visible" not ticket, so it doesn't refresh

#

@cloud iris there's HTML code above for you

glass cipher
#

@viral patrol i got it on a single overlay. And i move that overlay over my Base Overlay. and the option is not ticked in general

#

i guess it has to do with the followers i already have and it moves as many times as i have followers. But because the movement is "random" the position changes

cloud iris
#

@viral patrol Thanks that actually works pretty well. Appreciate it mrjord1HUG

tribal zenith
#

@cloud iris if you add them via JS, you could also just write a comma separated list in the textfield and use field.split(',') to iterate over them. But that's probably too much coding ๐Ÿ˜„

cloud iris
#

@cloud iris if you add them via JS, you could also just write a comma separated list in the textfield and use field.split(',') to iterate over them. But that's probably too much coding ๐Ÿ˜„
@tribal zenith Well that would be pretty neat, but I just created 8 text fields now... I have nowhere near 8 mods, but I figured this way I am prepared for the future when I have to add more mods... and if I get to that point and I get more than 8, I'll just add more fields mrjord1LUL

tribal zenith
#

yeah, well if it works, it works LUL

cloud iris
#

Right. Sometimes it's great to have things "perfect"... but if it works, why make it harder ๐Ÿ˜›

bitter coral
#

Can someone help me I have a question on how to set up a command that displays my time zone to be 12 hour time and not 24 hr in-stream elements? I'm in the central standard time zone.

#

missouri

#

I'm also trying to have a command on stream elements that shows my faceit rank and elo. but I want it to automatically update every time I lose or gain elo and increase or decrease my rank every time I rank up or derank on faceit. Can anymore help me with that?

#

nvm i figure out how to get the timezone

#

I still need help on the faceit situation

#

i have this api $(eval const api = $(urlfetch json http://api.satont.ru/faceit?nick=Sjblood2); if (api.error) {'Error';} else { 'Lvl: ' + api['lvl'] + ' Elo: ' + api['elo'] }) which shows me my faceit rank and current elo but it only works for nightbot and not streamelements.

viral patrol
#

There is no eval nor JSON parse on custom command with SE bot, you will need an API that replies with plain text

bitter coral
#

so how would i find that plain api

#

lol

#

im kinda new to this my bad

viral patrol
#

You need to find a website that will give you just a text instead of JSON object

bitter coral
fervent prawn
#

Hey was working on some custom widget stuff. I'm new to stream elements. Is their a way to return your latest followers and subs. I want a rotating text bar under the webcam. I saw when you add a new custom widget there is some JS in there that kind does this but couldnt figure the listeners out

viral patrol
#

The widget above has all listeners included

fervent prawn
#

@viral patrol thanks bro. I'll look into this now

flat parrot
#

Would we be able to get the user who triggers a command sent in the customapi Headers? We have the SE Channel ID passed but no data about the user who triggered it.
Nightbot and a few other bots send the Channel and User with multiple datapoints including the raw username, display name, ID, etc. would be great to see this in StreamElements too

upper panther
#

first time pulling the code for custom widget is this the section that fires each time a new follower is triggered?

#

if (listener === 'follower') {
if (includeFollowers) {
addEvent('follower', 'Follower', event.name);
}

tight moat
#

hey guys, I'm just trying to get an idea of available variables in the overlay editor macro thing? Is there an apidoc, or better yet anyone just know if I can have displayName instead of name of a user?

#

I'm an idiot and just found it in the channel description, ignore my blindness ๐Ÿ™‚

frail wyvern
#

does anyone know how to set up a custom bot name for streamelements

lone cliff
#

How can i send a custom alert with tts using the api?

viral patrol
#

@upper panther to be precise, there's an event emitted that can be caught by event listener listening to onEventReceived.

window.addEventListener('onEventReceived', function (obj) {
  const listener = obj.detail.listener.split("-")[0];
  if (listener === "follower"){
    //Your code here

  }
#

@flat parrot The only way that this could happen is to post that idea on ideasboard and get it upvoted. Please include usecase scenario, so it will get more attention.

#

@lone cliff You can create a JS Audio object that points to your TTS api URL then play it like:

const message="Howdy my name is Bill",
const encodedMessage=encodeURIComponent(message);
let tts = new Audio (`https://my.fancy.api/tts/?message=${message}`);
tts.volume = 0.3;
tts.play();
frail wyvern
#

thank u

timid cloud
#

Anyone know if it's possible for me to alter the code in the "Rotating information bar" so that the right side of it (holds the train function), that an image is rotating there mixed with the train number. Like, lets say the number shows for 9 seconds, then it goes away either in a up/down fashion or fades out/in, then the image is there for lets say 30 seconds.

warm needle
#

Hello,
I have installed " Credit Roll - by Grot ".
I chose credit roll alternate instead of roll because I prefer the options offered.

The problem is that I would like to change a lot of things but I can't find them.
Yesterday for example, I had a person who sent me bits 3 times, and at the end of the stream, his name appeared 3 times, whereas I would like it to appear only once.
I would like to change the organization of the credits.
Thanks

tribal zenith
#

@warm needle you could change your widgets JavaScript to something like this. (message was too long, so I had to attach the code as textfile)

warm needle
#

Super too nice thank you!
I deleted everything in "js" and pasted what you sent me!

I'm looking for something simple that scrolls, but I'll tell you tomorrow since you have to be in stream to see the preview! @tribal zenith

If I want to reduce the speed, what exactly do I change? In alternate you can't change the speed while with the other one yes. ๐Ÿ™

#

Hmm, maybe "mark speed" I've reduced it, we'll see. Once again, it's horrible to have to make changes without seeing what you're really modifying. ๐Ÿ˜„

viral patrol
#

I will prepare something

#

As this is for default version

#

And I want to display sum of tips instead of first tip by user.

tribal zenith
#

@warm needle ah wait, my bad I misread that. The code I sent was for the normal version, not alternate, sorry

#

but if lx has something planned you could wait for that

#

And I want to display sum of tips instead of first tip by user.
@viral patrol just add up the amounts in an else statement if the name already exists

viral patrol
#

Yup. But I see that alternate version is broken

#

OK. I am just stupid....

warm needle
#

No problem!
Thanks a lot ๐Ÿ™‚

#

Ah ?

viral patrol
#

I updated alternate version of that widget. You can redownload it from widget share channel

warm needle
#

To avoid having the nickname in several times?
But otherwise, we still can't see the preview?
So I delete it and reinstall it ok!

viral patrol
#

Same setup as previously

warm needle
#

I don't see what you sent

viral patrol
#

And this will aggregate all of tips/cheers into one

#

Have you deleted it already?

warm needle
#

Yep

viral patrol
#

It is updated there

warm needle
#

Oh yea, ok !

#

It's good

#

Is there really no way to see a preview? Because if I change the size or anything and see what it looks like, we can't! The other one yes, this one no ๐Ÿ˜•

viral patrol
#

You can change visibility of it, emulate some events (select "preview live on stream") and they should be visible on OBS too

warm needle
#

Visibility is well set and preview on stream too. And nothing happens!
I tried to make test donations ect... then go on the credits scene and nothing.

viral patrol
warm needle
#

It's possible ๐Ÿ˜„ ?

viral patrol
#

You can set column number to 1

#

So they all should be displayed one by one

warm needle
#

It's perfect and it's even better.
Thank you for your help, really! ๐Ÿ™

tribal zenith
#

okay, that might be a dumb question, but I've seen this often lately..when would you use typeof fieldName === "undefined" over just fieldName === undefined ?
Is there a diference?

viral patrol
#

If you check typeof X === "undefined it will return true, x === undefined will throw an error x is not defined

tribal zenith
#

okay, on normal fields yes. That was a bad example ๐Ÿ˜„
But on arrays it should be the same, right? Or does typeof also check if the "base" var of the array exists?

#

like a["b"] but a is not defined

viral patrol
#

It is the best to have a consistency in your code, just to avoid future mistakes

tribal zenith
#

I tested some variations and they indeed all return true. So it is just a matter of style


console.log(typeof a["b"] === "undefined");
console.log(a["b"] === undefined);

console.log(typeof a.b === "undefined");
console.log(a.b === undefined);

console.log(typeof a["c"] === "undefined");
console.log(a["c"] === undefined);

console.log(typeof a.c === "undefined");
console.log(a.c === undefined);```
#

you can even do shit like this

let a = { undefined: "undefined" };

console.log(typeof a[0] === "undefined"); // true
console.log(a[0] === undefined);          // true
#

JS is weird

viral patrol
frail wyvern
#

tried setting up a custom bot name but ground control doesnt seem to show the option

inland ice
#

I'm sorry if this has been answered, but Discord search is very slow for me today. For @viral patrol cinematic ending, has anyone been able to have that for just the stream, and not all current events?

frail wyvern
#

nvm i figured it out

icy token
#

hi, i'm just trying to make a small widget, but don't really know where to start

#

like, how would one add it to obs

#

i get that it's basically just making a webpage, but is it actually the same as adding a browser source?

#

does it need all the auth stuff as well?

viral patrol
#

Hi. You need to create an overlay and in top right corner you will have "preview", paste that URL to OBS

icy token
#

ah

viral patrol
#

as 1920x1080

icy token
#

okay, so i'll try that

viral patrol
#

Except instead of top bar, there's a plus button

icy token
#

okay, got it

#

now i dump all the stuff in there, and add the overlay as the browser source

viral patrol
#

That is correct

#

You have overlay editor documentation in channel's topic

plain dirge
#

Hey,
Has anyone encountered problems with CORS policies when trying to request data from twitch's api (any api, really)?
Simply trying to gather some data from their new api. I have already made a twitch application and got my bearer token.

Does anyone have a solution to this?

viral patrol
#

First - access-control headers are server side, you don't specify them in client app

#

Second - you have status 200, so server replied (you can see response in body),

#

Basically fetch(url,{headers:{"Client-id":"123","Authorization":"Bearer xyzabc"}}).then(response=>response.json()).then(obj=>{console.log(obj)); should work for you

plain dirge
#

wow that worked

#

thank you so much!

icy token
#

is there any way to get mic input? i'm trying to do it through js but it's unhappy

weary nebula
#

Does anyone know how to change the audio volume of videos that play on stream when redeemed through the stream store? I've put one on just now and it's deafening? But when I look in the 'Edit Item' window the video is muted, same for video upload, so I don't think that is the way to change the volume? Also it's not in the volume of the overlay (as far as I can tell(

frail raven
#

Is it possible to have an HTML widget in Stream Elements that is controlled by a stream deck? Letโ€™s say I have a rotating widget, but letโ€™s say I want it to change when I press a button on my stream deck. Is that possible?

#

I canโ€™t seem to find much info about this.

rugged rapids
#

As a simple solution, switch scenes with your SD.

frail raven
#

Nope.

#

That wonโ€™t work.

rugged rapids
#

ok.

frail raven
#

I want the animation of the HTML widget.

#

I appreciate the offer though, itโ€™s just a bit more complicated than that.

#

The thought process is this; push a button on stream deck and have the HTML file respond and show up/ update within OBS.

#

Any advice would be greatly appreciated guys!

tribal zenith
#

you can add a button to your SE overlay settings and trigger things with that

charred vortex
#

hey everyone, i was wondering, is there a way to get the {uptime} to give the seconds? like 2h 21m 30s

frail raven
#

@tribal zenith Youโ€™re a genius and I love your face! Thank you! That seems to have done the trick for us.

tribal zenith
#

You're welcome :D
Alternatively you can interact with your BrowserSource and use DOM Events as triggers. Like Doubleclick, Hover, Key presses etc.
But I guess the button is easier LUL

tribal zenith
#

@charred vortex not by default, but you could create a custom command with Response Uptime: ${urlfetch https://beta.decapi.me/twitch/uptime/<your_channelname>}
Make sure to replace the placeholder and the brackets with your channelname

charred vortex
#

i will test it when im online but it looks like what im looking for. thank you!

tribal zenith
#

when you try to call it while being offline, it will just output Uptime: Name is offline

upper panther
#

@upper panther to be precise, there's an event emitted that can be caught by event listener listening to onEventReceived.

window.addEventListener('onEventReceived', function (obj) {
  const listener = obj.detail.listener.split("-")[0];
  if (listener === "follower"){
    //Your code here

  }

@viral patrol Thanks for the response. is there a place that list all the events caught y the onEventReceived?

rugged rapids
#

Take a look at the channel header of this channel for the overlay editor documentation.

upper panther
#

ahh i never new you could click up there to see more links i only saw the first two

#

thank you

neat tangle
#

just wondering can custom commands use javascript?

#

chat commands btw ^^^

elfin arch
#

You'd have to go the custom widget -> middleware -> chat route @neat tangle .... assuming Twitch

#

*overlay not widget

hard spear
#

Does the SE_API.store have any mechanism built in for managing/preventing race conditions? And, semi-related, is there a good way to test for updates to stored data without polling manually?

elfin arch
#

I'll defer to someone with more knowledge @hard spear for a real answer; but I would assume yes & no. For the race, there should be a default queue (if not you could queue events in your code). For the updates, I don't think there is a way. I've never played with the store, so take with a grain of salt. Smarter people than me will respond.

hard spear
#

Hm. I should clarify that by race conditions I mean e.g. between multiple copies of the same wudget (e.g. in different layouts/in different scenes) so I'm not sure how well a queue would work if purely in my code; the default queue should provide an atomic object operate around in theory though as long as it can be used without causing data loss amonst other widgets which, is most likely the case

elfin arch
#

oh ya. right. I didn't even think about that. My ignorance comes from never using the store. But you are right. Doesn't matter at that point with it being across widget data. Have you tried creating a widget to store a value then display it @hard spear? ... then duplicate that widget 3-4 times, give them different commands to update and see the results (have all them in the same scene in OBS)

hard spear
#

Yeah I mean I haven't tested it in SE but I generally understand the conditions under which the data might get buggered up; Most of the time as long as all copies of the widget recieve all the same events in the same order or both fail at essentially the same time they would work correctly even though they are both doing the same thing in parallel, but if one misses one message, for example - or other conditions relating to events from sources other than SE, a data conflict can cause both systems to be wrong if the race isn't prevented.

#

less so if the data is only loaded on page load but even then, on next load it might be random which of the two (or more) copies of the widget got the final say if they disagree

elfin arch
#

Is this for like a Twitch overlay, or like a Twitch extension? .... I assumed it was an overlay

hard spear
#

overlay, custom widgets

#

atm I have overlays that have logic other than "display data computed elsewhere"

#

for convenience reasons, long story

#

The concern I have is that a read OR write to a value is currently atomic (i.e. uninterruptable) which prevents random like, bit by bit data corruption, but to really prevent data invalidation you need to be able to like, take ownership of an object such that between reading a value and writing another value that depends on the read value, you can force all others trying to use the object to wait until after you have written before they next read.

#

otherwise you end up with multiple 'truths' if that makes sense

elfin arch
#

hahah. ya sorry @hard spear that is way over my head. Maybe you are overthinking it or making it too complex? ....

#

or it is just to complex for me

hard spear
#

Well, I'm trying to learn about the limitations of the system so I can work within them, and I'm asking from experience, e.g. with caveats I've had to deal with in previous iterations of my old/non-se code;

shell quartz
#

hi! someone know how to integrate streamelements in unity?

hard spear
#

uhhh

#

can you narrow that question down a bit?

shell quartz
#

I have the Twitch integration, but I would like to make games that instead of running with money work with streamelemens points or bits

hard spear
#

Ohhh okay cool

#

Well for that you'll essentially be doing it via HTTP requests, I somewhat doubt there's like, a c# api or such for desktop applications - mainly because any such api would be a thin wrapper around http calls at most.

#

there are some useful links up the top regarding the http API

elfin arch
#

i am very curious in this Unity to Twitch with S.E. integration ....

hard spear
#

You never know, someone might have released a free plugin with a wrapper honestly they wouldn't be hard to make

#

the only issue is maintaining it and keeping up with breaking changes

elfin arch
#

And going back to your thing Cosmo... basically. .... yes... break the limitations... or try to? just don't ping the API 100/sec because that's when the Staff turns it off

#

are you running the Unity local @shell quartz ? .... how are you connecting Twitch chat to Unity?

hard spear
#

I moreso mean limitations that inadvertantly/serruptiously break my code

#

the http api is fairly straightforward though if a little underwhelming in documentation

#

twitch uses fairly standard IRC with some custom extensions but even in those, mainly they are implemented like, inception-y within the overarching scope IRC leaves for extension

shell quartz
#

Of course I am not a professional programmer but in Unity I know how to program and understand a lot of code, I need good documentation to work.

hard spear
#

The good thing about http APIs is that you can familiarise yourself with then simply by using like, curl

elfin arch
#

there is no limit @hard spear that will break your code... but you might get rate limited if you write shitty code.

hard spear
#

you should be able to find a unity plugin that provides AJAX or REST utilities and work from there if that helps @shell quartz

#

@elfin arch I didn't mean rate limits

elfin arch
#

... haha i know.

shell quartz
#

Thank's @hard spear ๐Ÿ˜„

elfin arch
#

that is your limit though. rate limiting.

hard spear
#

I meant, misunderstanding boundary conditions

#

if that makes sense

#

or edge cases

#

yw @shell quartz

tribal zenith
#

JavaScript and SE store actions support promises. So, they are the way to check if data was lost or if any operation failed @hard spear

hard spear
#

@tribal zenith but those promises aren't an inter-widget semaphore or mutex, are they?

#

so race conditions remain a possibility AFAIK

elfin arch
#

Again; @hard spear I think you are overthinking this

tribal zenith
#

if you have multiple BrowserSources with different code there will always be the chance for race conditions, since (for security reasons) you never know what the other source is doing

#

But if you want a complete synchronous source you would have to use sockets with acknowledgements

hard spear
#

strictly speaking, I would need a server that provides a synchronisation mechanism (such as sockets with acknowledgements) - I'm trying to discern if SE provides any such feature.

tribal zenith
#

No, a socket server would have to be your own

#

SE Widgets could listen though

hard spear
#

yeah, that answers my question, thanks.

#

I wasn't certain because it does provide a datastore server.

#

@elfin arch you'd be surprised how easily these conditions can come up. Consider for example a widget which has two faces: a display face running a clock or listening for SE events and updating the display, and a control panel for overriding data, hitting start/stop on a stopwatch, these kinds of things. To do this, the display face has to be able to regularly poll the storage to check for updates. Without access synchronisation, there's a (rare) chance that attempting to override the data in the control panel fails because the display face happens to overwrite the data between the control panel's last write and the next time the display face tries to read.

#

Now, it's not neccessarily mandatory to have a control panel, but if the option is there it may be highly preferable to end users compared to say, using chatbot commands.

#

So it's just, good to know

tribal zenith
#

well, you can always just add fields to the Widget Editor ๐Ÿ˜„

hard spear
#

'always' isn't strictly true, but it does cover a lot of use cases, yes

elfin arch
#

Again; i think you are over thinking whatever you are doing. ๐Ÿคฃ ... unless you are trying to make a live multiplayer game in the Twitch panel

hard spear
#

It's just curiousity @elfin arch

#

I do overengineer a lot, but in this case I'm curious.

viral patrol
#

@hard spear You solution sounds complex and it should use MITM service as there's no socket room on SE WS for information exchange. If you want to use SE store from multiple updaters and single listener I would create 3 widgets:

  1. script that does whole logic and emits event to updater including some widget specific data
  2. script that listens to events emitted by all widgets and aggregates them, checks overwrite conditions, timestamps
  3. script that displays data
    for initial load I would use SE store, but later on MITM sockets
#

In this scenario (correct me if I am wrong) widgets should dispatch data without delay, and with KV store you would need to use interval to check data

hard spear
#

that is a good way to design it yes.

#

However, I don't have a server myself and I've never really been motivated enough to pay for or stay on top of one. Since I mostly end up making tools for use only by a small circle of friends, I tend to find ways to get away with purely client side systems.

tribal zenith
#

I never really used them, but maybe AWS is for you

viral patrol
#

I think that heroku free tier should be enough for that

hard spear
#

yes, these are both options I considered.

#

but they both have a learning curve anyway, and I'm a poor judge of time expense so I tend to cautious (if not neccessarily efficient).

#

better the devil you know, as it were

tribal zenith
#

and if you don't do client work you can always just test in a local NodeJS environment

hard spear
#

well exactly.

#

And that's what I do

#

The control panel actually came about as a consequence of the purely client side design because the user needed to be able to apply overrides on their end.

#

but moving to SE largely means I can intervene when neccessary whilst minimally changing the existing code

#

also to be frank

#

it was an easy way to do testing

elfin arch
#

+1 for heroku it's free tier is now 100% no spinup time Node enviornment

hard spear
#

because the widget is written in like, vue

#

so the control panel is just another frontend view on the same functionality

#

I'm not actually sure that fields on the widget editor solve the requirements of having an override panel. They replace my configuration panel (or will do so) but my understanding is that they are read only within the widget code itself which makes them mutually exclusive with the data in SE store

tribal zenith
#

does Heroku still go to sleep after inactivity?

hard spear
#

yeah see that would be an issue although I guess the widget could wake the server

#

anyway 99% of the time race conditions aren't problematic because if the connection to saythe se or streamlabs API fails thery fail in parrallel so even though things might get computed in parallel as long as they aren't actually polling too much generally everything gets all the same results.

#

It does become an issue with the stopwatch widget, but really I've coded that wrong it shouldn't be needing to save at all until the clock gets to 0 or the target is updated externally.

elfin arch
#

If you have just 1 project, no. at least a few months ago they removed that spin up @tribal zenith

tribal zenith
#

oh ok nice

hard spear
#

but since I've already reconfigured all my data manipulation code to be synch/promise safe to interact with SE in the first place, I figure I may as well take advantage of any semaphor that might have existed.

#

but, oh well xD

#

The thing is also

#

I can't trust my friends not to just randomly spawn multiple sources with the same widget instead of reusing one source on multiple scenes

tribal zenith
#

also you don't need any server-side code for a stopwatch. Just add a button to toggle start/stop and maybe a button to reset

hard spear
#

Ah yes, but then the button shows on screen and they have to fuck around in obs to interact with the browser source to press it.

#

Not a user friendly experience

tribal zenith
#

No, the button is in the editor

hard spear
#

Wh-

#

Wait so fields aren't read only?

tribal zenith
hard spear
#

Also to be clear - this is mainly pre SE

#

yes but, and I you can have a start button AND a stop button, so this a technicality

#

but what I want to know

elfin arch
#

Fields are read-only. They cannot be changed (saved) via scrript

hard spear
#

okay thanks.

#

So you can't say, correct the sub count if the API goes down, through the editor - just as an example.

#

and I know that SE has it's own counter, but that only covers one goal at a time without SE store

#

I'm pretty sure I can still get it to work with SE don't get me wrong

tribal zenith
#

the editor fields work one-way. If you edit a field, it will reload the widget with the new data provided, but your script can't change the value of fields n your editor

hard spear
#

but, the easiest way to do it depends on my understanding of the capabilitiesd

#

yeah, thanks for confirming that.

#

It's a really cool feature, actually.

#

And I will be using it.

elfin arch
#

well; that's debatable. I'd rather be able to update and override the JSON

hard spear
#

I mean it would be better than way I agree

#

but it's still useful

elfin arch
#

the answer to your question is "yes".

#

design to that. then if you see something off. post your code here.

hard spear
#

So value overrides are still the sticking point which is trickiest for user experience. So start with I think I'll have a global field in SE store which is essentially a date that all widgets periodically poll and do a hard refresh if it's in the future so I can use say a chat command or maybe even a button in the editor panel(?) to force update the whole scene (e.g. after changing the configs or overriding data some other way).

#

wait, not in the future..

#

if it's the future WRT the last hard refresh**

#

that way a mod can do things on request of the streamer

tribal zenith
#

your preview in the editor will refresh on every field change. The actual overlay in your OBS for example, will only update after you hit Save

hard spear
#

wait, the overlay is obs is force refreshed if you hit save even remotely?

#

heck that's great

#

so then there's a refresh event hidden in the overlay code?

viral patrol
#

Overlay reload event is emitted by save.

hard spear
#

excellent

viral patrol
#

And there's a listener to that event type in overlay

hard spear
#

yeye

tribal zenith
#

but it will only refresh if you actually changed something before saving

hard spear
#

yeah, just tested that

#

that's good though

#

I suppose I could write the control panels to forcedly keep trying to override the data until it reads back the same but that's definitely race conditiony.

#

oh, I'm dumb.

#

there just needs to be a staleness flag.

#

Like the date refresh thing, but like, only the control panels can set a new one, all the other widgets only update like a second 'last seen' copy of that flag.

#

And any time the two differ, the widgets have to dump their copy for the existing copy

elfin arch
#

i still have no Idea what you are trying to do or what the struggle is....

hard spear
#

normally you'd still get race issues but the control panels can just, not auto update at all.

#

and the only race is between mods

#

so that's acceptable.

tribal zenith
#

I think he tries to control multiple overlays from one editor

#

but that won't work, since they are sandboxed

elfin arch
#

but what if you add ```js
{
time: Date.now()
...
...
}

and just compare the store.time
#

yup. it's sandboxed.

hard spear
#

yeah, that's exactly what I meant @elfin arch there are caveats with that (specifically it can create an infinite loop). but in this case that's avoidable.

#

oh!

#

I know how to explain why the race condition is a thing

tribal zenith
#

just put a date field on every overlay you need it for and update each field if necessary

elfin arch
#

how can you create an infinite loop with that?

hard spear
#

gift sub bombs

#

re: race conditions

elfin arch
#

you want to error proof if Date.now() = Date.now() ?? that's always false.

tribal zenith
#

use performance.now()

#

but you don#t need time for subbombs

hard spear
#

I'll explain the caveat with time.now() in a second but first

#

if you have two tabs open of the same widget (due to user error), and you get 15 subs in a row, that's 15 events in quick succession, and if you have those widgets reading data to stay up to date with the control panel between every event, then the two widgets read and write in pseudo random order, and one may be say, one sub behind the other (because the interval is so small), which then means one sub gets counted twice.

tribal zenith
#

No, they work independent

hard spear
#

The other day, in a production environment, this double counting happened about 50% of the time in every batch of gifted subs

tribal zenith
#

each tab will work on it's own queue

hard spear
#

but they're not independant

#

because they are READING from the store

#

between every event

#

process event, read, process event, read

#

(the read is to stay up to date with the control panel overrides)

#

that is an example of a race condition.

elfin arch
#

why

hard spear
#

why what?

elfin arch
#

let's say this is chat messages....

#

not subs.

hard spear
#

to be clear, the actual trigger for the read was a notification from localstorage in the browser that the data had been updated by an external entity

tribal zenith
#

I think your mixing up some fundamentals of JavaScript here

hard spear
#

that's not there is SE, but it's a legit example of a race condition.

elfin arch
#

i thought this was an overlay. i am so confusded.

#

thank you @tribal zenith

hard spear
#

not all overlays are made by SE @elfin arch

elfin arch
#

so you are not using the SE overlay editor?

hard spear
#

I'm migrating to it

#

you'll have to explain @tribal zenith because I don't see how this is language specific

tribal zenith
#

your widget just listens for certain events and processes them independently. The overlays are sandboxed. So no other overlay or site can access its functionality.
also you don't need to notify the server, if most of your processing is on client side

elfin arch
#

haha; ok; phew. you're killing me Cosmo. I'm forehead to keyboard right now.

hard spear
#

Sorry, I know my thought processes aren't exactly, typical/natural for others to follow. (relating more to the language I use and structure of explanation than to correctness)

#

communication is hard at times xD

#

@tribal zenith everything you've said is true and none of it seems relevant. I was giving an example under the old code of a race condition that I have already solved; The sandbox aspect is almost entirely irrelevant as I have that encapsulated very well already. The difference between running in the sandbox and outside of the sandbox is literally 8 lines of code.

#

(4 for reading, 4 for writing)

tribal zenith
#

you also don't have access to localstorage for example

hard spear
#

that's the 8 lines of difference, yep

elfin arch
#

i'd like to know these 8 lines...

#

and also... if you are breaking outside of the sandbox... then expect shit to break.

hard spear
#

oh, I miscounted very slightly but here

#

ah where do I upload this diff result..

#

I then export either LocalStorageModule or SEStorageModule as "Module" to every other aspect of the code, depending on the presence of SE_API on window.

#

Module is, the base class of all widgets, and viola

tribal zenith
#

I still don't get the use-case for this monkaHmm

hard spear
#

lock.check() is a fail-fast measure I was using to make sure that my promises were being handled correctly, long story

#

I made custom styled alert/goal/counter widgets for some friends using StreamLab's API

#

It's grotesquely overengineered at this point but it started out as spagetti and then it got more convenient to just engineer it than to adjust it for new features over time

tribal zenith
#

but why use classes/modules instead of basic alert events?

hard spear
#

mainly for custom goal counters.

elfin arch
#

can you post a jsfiddle of what you got?

tribal zenith
#

okay, but lock is client-sided. So every widget would have it's own copy

hard spear
#

and then I started to need multiple html styles so I split the backend logic from the display, write the display in vue, and started standardising all the widget types together

#

lock is literally just a js promise

#

or rather

#

it only garauntees the integrity of a JS promise

#

and then you call lock.release to say "don't use this lock again" - it was an easy way to ensure I was actually awaiting all the promises I needed

#

by shoving them through a single mutex

hexed ridge
#

is it possible for an alert widget like the channel point one of lx to use the same event queue as the default streamelements ones? so that it doesnt play at the same time?

hard spear
#

so if they ever messed up they would raise an error

#

And I can't JS fiddle it buuuut

#

hang on

elfin arch
#

@tribal zenith you know way more than I do; I don't understand the need for any line of the code needed in an SE widget

hard spear
#

it's just a lot of files xD

#

I have a repo but I think it' currently private

elfin arch
#

@viral patrol ^ up 4

tribal zenith
#

It looks like you come from a desktop application background with that style of code. It "works" in JavaScript, but it is not the style you would normally use

hard spear
#

Well, strictly I'm shoehorning server side code into client side code, which seems to be grotesquely common in js atm

#

the actual display is just Vue code

tribal zenith
#

you don't have to lock the promise, when using await

viral patrol
#

@hexed ridge Unfortunately I am not aware of anything that could allow that

hard spear
#

oh no - the lock is

#

this file might be enough to explain it..

hexed ridge
#

@viral patrol okay thank you for the info

tribal zenith
#

await just stops the code execution until it finishes

hard spear
#

i know what await does, the 'lock' isn't the actual promise object, hold on

#

look at the methods "requestDataLock" and "withDataLock"

elfin arch
#

at no point should either of those be used with the overlay editor.

#

...... this is an 'easy' editor.

#

how is this being so hard?

tribal zenith
#

you can use the onSessionUpdate event to check if any counter data has updated

elfin arch
#

^ right exactly. it's built in for you

hard spear
#

remember: this code was almost entirely written prior to my FINDING SE overlays

elfin arch
#

you don't have create functions for all these things. it's prebuilt functions for you

hard spear
#

I'm only migrating to it now

elfin arch
#

don't worry about any race condition. you will never have it in the overlay editor

hard spear
#

๐Ÿคฆโ€โ™‚๏ธ

#

Now we're just going in circles.

elfin arch
#

right. sorry. focus....

#

get it into the SE overlay editor

hard spear
#

Also, I'm not saying it's your fault but you've started to forget things said earlier

elfin arch
#

Does the SE_API.store have any mechanism built in for managing/preventing race conditions? And, semi-related, is there a good way to test for updates to stored data without polling manually?
@hard spear
it would be 100% my fault ... we started here

hard spear
#

But to digress, it is both true that I have HAD race conditions, and that I'm severely overpredicting them now, hence the confusion on both parts.

elfin arch
#

Hm. I should clarify that by race conditions I mean e.g. between multiple copies of the same wudget (e.g. in different layouts/in different scenes) so I'm not sure how well a queue would work if purely in my code; the default queue should provide an atomic object operate around in theory though as long as it can be used without causing data loss amonst other widgets which, is most likely the case
@hard spear
sorry to cut off but also

hard spear
#

largely the race conditions were due to bugs, and largely the conditions can be eliminated in this context.

elfin arch
#

Answer is no; 2 widgets can not talk to each other.

hard spear
#

but they have shared storage

#

so they can?

tribal zenith
#

they don't have to talk to each other, because the server does by sending events

elfin arch
#

^

hard spear
#

I mean, exactly.

tribal zenith
#

just listen to the same events and you don't have to fear race conditions

hard spear
#

the server is the medium

#

Yes, in general - but I already HAVE a control panel

#

so I want to include it in the migration if possible

tribal zenith
#

you would have to convert that into fields then

#

or on an external server

elfin arch
#

so you have an external website as the dashboard?

hard spear
#

Incorrect, incidentally. @tribal zenith

#

@elfin arch technically it's also purely client side, it's just another frontend for the widget backend. (here frontend means like, the actual html interaction)

tribal zenith
#

what is incorrect?

hard spear
#

Well, as I discovered during this conversation... it can be done with just the SE store

#

using the Date.now() trick

#

I was confused about it at first

elfin arch
#

i think Reboot mention Process that might be better in the Object.

tribal zenith
#

that just makes you more vulnerable to bugs

hard spear
#

If was being used by multiple agents with no "master" technically they could potentially get stuck in an infinitely loop of constantly bickering over overriding each other's dates and constantly reload and never get any work done.

#

But I realised in this case the control panel can just be the ground truth.

#

since it's always manually selected data

#

so the panel can always assume it wins and never has to read the time/stale flag and the widgets can be forced to never ever write to the stale flag (only read it), so there's no loop.

#

And so widgets don't race with each other, as you both mentioned. and the control panel lets people override values manually (which is it's sole purpose), the overlay editor manages all the configurations options that aren't related to live data and everything is fine.

#

And yes my code is ridiculously overengineered but it works pretty well, and I don't really want to start from scratch.

#

So yes, you're right, in general the widgets should be read only and there should be a server that dictates all the actual data. I'm just, shoving the server into the widget - kind of like a mini chatbot that the streamer doesn't actually need to know about and just auto spawns when they open OBS if that makes sense?

#

Thank you for coming to my TED talkโ„ข

#

(in all seriousness, thank you both for your time @elfin arch @tribal zenith)

#

As I migrate to SE a lot of the complexities will honestly get removed

#

it does like 85% of the backend work for us

tribal zenith
hard spear
#

I do and it did

elfin arch
#

So yes, you're right, in general the widgets should be read only and there should be a server that dictates all the actual data. I'm just, shoving the server into the widget - kind of like a mini chatbot that the streamer doesn't actually need to know about and just auto spawns when they open OBS if that makes sense?
@hard spear THIS 100%

#

StreamElements is 100% cloud based. So if a stream goes on vacation with their laptop; boom all overlays/bot work.

hard spear
#

yeah that's why I'm migrating

#

plus as I mentioned, if anything does go wrong I can manually interact with the copy of the data that affects them (well I say manually but I mean because I already implemented the control panel I just have to migrate it)

#

And, because I guess I'm cursed, even when I literally have nothing to do with setting any of it up, something always goes wrong if I am witness xD

#

STG

#

I need to figure out what the feck one of my friends did to set up their stream event display because it's literally always exactly one event behind?

#

๐Ÿคทโ€โ™‚๏ธ

#

i.e. latest follow is actually displaying the second latest follow

#

but that's not something ya'll can help with xD

elfin arch
#

๐Ÿคฃ ... if it's an Array ... [1] instead of [0] but seriously no idea

hard spear
#

see the thing is

#

she doesn't code

#

she just took something or other and configed it in UI

#

So I'm impressed it could go so specifically wrong

tribal zenith
#

even if your version works, the recommended design pattern still is event based. If your control panel is too complex to migrate to fields and JS code, you probably should outsource that to your own external server and use sockets to notify the overlays. Other than that, SE already gives you a lot of freedom to process and display data

hard spear
#

it's still event based. not sure why that was unclear.

tribal zenith
#

it looked to me like you used the store as proxy for event processing not the actual listeners. But maybe I just misread that

hard spear
#

I have not been doing that, although I did consider doing that prior to SE just so there's one hidden source that does the actual processing and the actual widgets just do reads.

#

Uh what's the term

#

I think it's the View-ViewModel paradigm or something?

#

essentially a lot of the code for reading and writing is in the same class just so that the data structures with information mirror each other on both sides of the queue, but the actual workflow still goes through an event queue which is external to the datamodel

#

I will be using the store as a proxy for detecting an override value sent by the control panel but calling it an event is a bit of a stretch, it's more like a data integrity mechanism IMO.

#

e.g. how CouchDB/PouchDB has those unique IDs on records every time it's changed.

#

Oh no I remember why I was going to using the store as proxy for events.. a custom alert that triggers when the goal is reached

#

I never did get around to that one mind you.

#

oh and if you're still curious I've just made https://gitlab.com/marcoscosmos/static-twitch-overlays/ public. You can play with it here https://marcoscosmos.gitlab.io/static-twitch-overlays/configuration.html - note that it's not actually user-friendly to use in SE yet (you'll have to figure out how to do it by browsing the repo), and that the preview on the config page does NOT listen for events.

#

you can use the onSessionUpdate event to check if any counter data has updated
@tribal zenith wait shit.

#

yeah that does the trick

#

Or wait - it depends, is session data writable?

viral patrol
#

It is not writeable by custom widget. Only native (session events/aggregates) and bot (counters)

hard spear
#

okay, thanks.

#

I suppose that makes sense.

tribal zenith
#

well, you can modify it on the client, but not on the server

hard spear
#

yeah like fields

#

makes sense

tribal zenith
#

if you need to manage overlays for other people, they can also just add you as editor. Then you can just access their overlays and change data from there

hard spear
#

yes but not data in SE_API.store

#

there's literally no frontend for it it's only accessible by the actual widget.

#

Or is that somehow incorrect?

#

@tribal zenith

tribal zenith
#

the store is user-specific and overlays sandboxed, yes. But you can import overlays from your account to other accounts (which you are editor of) and have the same code there. It just runs isolated from each other

viral patrol
#

But multiple overlays can have access to same SE_API.store key

hard spear
#

^

tribal zenith
#

across accounts?

viral patrol
#

Like you have a one widget that updates data and second, on another overlay (within same account) can access this data

hard spear
#

it doesn't need to be cross account

viral patrol
#

But for data across users - you can use keyvalue.xyz service

#

But... They did reset my value several times

hard spear
#

So what I mean is, as the editor for a thing, I can only manipulate default provided by SE using the provided API. If I need to edit custom data (i.e. data in SE_API.store) I need to make my own frontend, expose it as a widget, and use polling to force widgets to read it. @tribal zenith

#

key-value xyz is great to know about though, thanks! @viral patrol

tribal zenith
#

If you need one central front-/backend you have to build your own, yes. But for most cases you can just duplicate code

hard spear
#

No-

#

If I need to EVER override the data in SE_API.store to a maually selected value

#

Which is a problem I expect to have.

#

centrality has nothing to do with it

#

I assume you can't access SE_Store via console for example.. due to sandbox

#

(not trivially)

#

I could be wrong about that though?

ancient fjord
#

Hello, I was told to come to this channel for some potential help. So I saw that there is a stream marathon timer widget already supplied by StreamElements. The problem with the timer that I am seeing is that I am not able to stop the timer and it instead resets the time to what I set my minimum time at originally. Is there a different stream marathon timer widget that allows me to stop the timer instead of resetting the timer? Or is there code that I can add to the stream timer that would allow me to stop the timer.

#

It is widget "STREAM MARATHON TIMER" created by LX

viral patrol
#

There is no stop as StreamMarathon doesn't hold "how many seconds remains" but "what is the datetime of end" (so it doesn't have to update it every second).

#

But you can always add time by emulating an event, to add time instead. For example you want to pause it for some time, then emulate $1000 tip, to update time.

ancient fjord
#

So there is no way to code that in?

viral patrol
#

It would require widget rewrite, a big rewrite. And the state would be updated every second or lost on widget refresh

tribal zenith
#

or add a second timer, which measures how long the widget was paused and add it to the end date

#

also it should clear the first timer and resume it after unpause

pulsar willow
#

Hello! I need some help with the Credit Roll widget by @hushed hazel
I change the font size of the usernames, but it won't show the change!

tribal zenith
#

yes, I can confirm that. @pulsar willow
You have to change line 87 in the CSS settings, so the block looks like the following:

.people-list__item {
  flex: 1 1 100%;
  padding: 10px 0;
  font-size: {{fontSize}}px;
}
#

@viral patrol can you change that in the repo too?

#

and maybe take the font-size out of the * selector at the top

knotty obsidian
#

attempting to post to that with data results in a http 500

#

nvm, the key is user, not user11

#

Is it possible to use a non-listed currency and have more decimal places shown in the alert?

devout stone
#

is there any current way to get oauth credentials? the application link on the docs is closed

#

my use-case is to have a user sign in with their streamelements account in order to display their most recent donations

weak creek
mortal knotBOT
#

@eternal girder Read and follow our server rules:

  • We do not tolerate toxicity! Treat the community team, staff and all members with respect.
  • No advertisement or channel promotion, anywhere on the server.
  • No NSFW/NSFL
  • No unsolicited DMs or friend requests to server members

Make sure to read the #rules in any server you join.

gloomy viper
#

Hello! (I was told to post here ๐Ÿ‘€ ) one of my friends is trying to be sneaky and lurk on my channel, and to mess with them I thought it would be funny to create a command of sorts that would post a message in chat when the bot detects that that person is lurking. Is this possible to do?

elfin arch
#

Yes; it is possible. But not suggested or supported by either Twitch or SE

gloomy viper
#

oh i see.. ok thank you!

remote herald
#

idk how to use the api.... Does anyone know how I could "print" the top coins for example in my chat

elfin arch
#

have you tried !top command?

remote herald
#

yeah i know....

#

But I wanna know how to use api cause I have to code my own bot because i cant connect a account to the se bot

#

I cant connect my bot account

#

When I click Connect it doesnt work...

#

Its doin nothing

elfin arch
#

Can you explain the best you can what you would like to do? Are you having problems connecting your account? Or you have a custom client/server side bot and want to read the "point leader" with an API call?

remote herald
#

My problem is I cant connect my Bot account to the SE Bot! Because of that I am coding my own Bot... And I wanna know how to use the api

elfin arch
#

Having your own bot is a good thing....

#

Do you want to connect your bot name into SE with OBS.Live @remote herald or want to make API calls with your clientside bot

remote herald
#

I want that my own Bot conneted to the api

viral patrol
tribal zenith
#

@remote herald Can't you just connect your main account to SE and rename the bot? The points and commands are stored on the server, so you don't need to run anything local

#

unless you really want to write custom logic

fading aurora
#

is there a way to add time manually to the stream a thon widget ?

viral patrol
#

@fading aurora you can always emulate an event from overlay editor with "preview live on stream" which should add time. You can also wait some time and I will add that feature

weak creek
#

@viral patrol Thank you! I'm looking, and I don't see recent Gifter name gathered at all - it looks like this isn't in session or widget data at all. So is crediting gift givers, rather than gift receivers, just something not possible?

viral patrol
#

Data is collected since you registered on SE, there's no backlog on that

#

Was there a subgift event since you joined SE?

hexed ridge
#

Hey, i changed up the minimal chat to my needs. and i think i got a css problem i am not able to solve ๐Ÿ˜‚ maybe someone can help me with that.

So the HMTL of one message block is kinda this:

<div class='main-container'>
  <div class="message-row">
    <div class="user-box ">blablabla</div>
    <div class="user-message">a short text that could have many different sizes</div>
  </div>
</div>

i got following css (trying to add all the needed css but not to much).

.main-container {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 99999px;
  white-space: nowrap;
  overflow: hidden;
  padding: 0px 10px 0px 10px;
  background: rgba(0, 0, 0, 0.55);
  color: white;
}

.message-row {
  vertical-align: middle;
  display: inline-block;
  bottom: 0;
  right: 0;
  float: right;
  padding: 5px 5px 5px 5px;
  height: 170px;
  max-width: 1200px;
  white-space: normal;
  overflow: hidden;
  background-color: rgba(0, 0, 0, 0.85);
  margin-left: 15px;
}

.user-message {
  vertical-align: middle;
  display: inline;
  font-size: 12px;
  word-wrap: break-word;
  border: 1px solid white;
}

my problem is that it fills the width first when messages get longer, and then does linebreaks. is there a css way to let it first fill up the height and only take more width if needed?

weak creek
#

@viral patrol Yes. I did a gift sub to a viewer earlier today to test and see if it's logged, but I don't see that data getting collected.

#

maybe it's not collected when I'm not live?

weak creek
#

oh god I finally got it, thank you so much @viral patrol and @twin ore in #helpdesk-twitch , The final thing I needed to credit most recent sub gifter was {subscriber-gifted-latest.sender} and now it's fully working. this was actually my whole reason to want to switch over to SE and I'm SO happy it's working now!

broken coyote
#

@hexed ridge what are you trying to do?

ancient fjord
#

For the goal widget provided by stream elements is there a way for the end goal to be automatically updated by a certain number once the orginal goal is reached?

#

So that it automatically updates and does not need to be manually updated

sturdy oak
#

@ancient fjord I beleive there is an auto incrementing goal bar in #widget-share

ancient fjord
#

Any idea how far in it would be

cerulean ibex
#

Is there any official documentation about command syntax from chat? Like what variables can I use in commands and what options can I set from chat?

hardy walrus
cerulean ibex
#

@hardy walrus thanks

hexed ridge
#

@broken coyote
Basicly i wanted your Widget but with multiple lines :D
Kinda like in the image.
But i want it to fill the height first with some min width and only if the message is to long for that it should increase the width.

So that it doesnt takes up so much width if it could use some more vertical space instead

fading aurora
viral patrol
#

@hexed ridge It is not nice, but you if text length is above specified threshold, change padding-right of text container.

tribal zenith
#

or flexbox even

#

with min-width and min/max-height

sturdy oak
#

height : max-content maybe?

deep wadi
#

Why do my alerts sometimes just stop working? I have to reload my overlays from time to time to get them to start working again. Is there a cooldown or something that is causing it to just stop that I don't know about?

viral patrol
#

There's no cooldown. I think that your cache may be somehow broken and that occurs in errors. Please clear this directory when OBS is not running: %AppData%\obs-studio\plugin_config\obs-browser\Cache

fallen juniper
#

will streamelements be adapted for Theta tv ?

dense rose
#

Is it possible to use add button press events into streamelements like keydown to control overlays with buttons?

atomic copper
#

Hello, is there any field on api.streamelements.com/kappa/v2/channels/me that is the channelId? Thanks

Would like, if possible, to avoid pinging validate to get channel id.

coarse merlin
#

Is like to add a chat command where my viewers can end the current song and start it over from the beginning. Is that something that would be possible through coding ?

steep wagon
#

Has anyone made a Chat command that can add 2 or more users to a multistream. The basic one is set up to link 2 streams in a multistream using multitwitch. Is there a way to make a command that will add 3 - 6 streamers just by typing in "!multi Streamer1 Streamer2 Streamer3 Streamer4 Streamer5 Streamer6" and then it generates the link for up to 6 viewers?

I use "https://www.multitwitch.tv/streamername/$(touser)" for the dual stream, but wanted to add additional streamers to the command. Is this possible?
@naive forum you ever figure this out? I JUST notice my multistream commands are wrong

naive forum
#

@steep wagon, I had to make multiple commands. I called them !multi3, !multi4, etc. Up to !multi6

steep wagon
#

ah okay, thanks

naive forum
hardy walrus
#

@naive forum @steep wagon actually try $(1:)

#

wait

naive forum
#

@hardy walrus it works with either

#

but I haven't figured out a single command that you can use to go from 2 to 6 multistreams. If you have 4 spots in the code, and not 4 users, the code doesn't work. It probably needs some type of IF statement telling it to ignore when null value.

hardy walrus
#

Mine actually wouldn't work I think on second thought.

naive forum
#

Mine works fine

hardy walrus
#

And unfortunately we dont have that.

#

I mean my thought of $(1:)

steep wagon
#

@hardy walrus I just turned off my PC but ${1:} would work, you'd just have to type in a dash in between each name

naive forum
#

@ancient fjord if you didn't find a solution look into Snaz version 1.12.6.0. That version writes timers to a file and you can then add the text file to your obs overlay and fine tune the look as you want. It has a Time, date and countdown along with Chronos. It also stores the times for later recall. Here is what it looks like on my stream. The left is my total in the area and counts up, while the right is a timer that counts down.

hardy walrus
#

@steep wagon the problem is how would it handle placing the names in the link though.

naive forum
#

@hardy walrus it would need to know to place a "/" between each name entered.

hardy walrus
#

Which it's not capable of unless you include that in the command used.

steep wagon
#

So I had 3 commands:
Multi = $(customapi.https://api.thefyrewire.com/twitch/multi/ea8478176237d216/t$(channel)?platform=raredrop)
Multiset = $(customapi.https://api.thefyrewire.com/twitch/multi/set/ea8478176237d216?query=$(1:)
Multioff = $(customapi.https://api.thefyrewire.com/twitch/multi/off/ea8478176237d216?msg=Currently not multi-streaming!)

And I think they used to work but I hadn't used them in like years so when I tried it today the link was for multi drops instead of a multi stream which is why I asked

hardy walrus
#

@mild cipher For your input ^^^^

naive forum
#

@hardy walrus @steep wagon This seems to work. Use this formula in the command:

https://www.multitwitch.tv/your_twitch_name/${1:}

When you enter the command, just enter it like this:

!multi User1/User2/User3/User4

You only need one !multi command and you can add from 1 to 5 more users.

hardy walrus
#

Yeah that's the slightly tedious part.

naive forum
#

@hardy walrus yea, but it is a lot better than a code for each one. Thanks!

hardy walrus
#

@steep wagon Sidenote: thanks for giving me an idea for a friend and something else from that guy's things.

steep wagon
#

@hardy walrus welcome! Hopefully @mild cipher does answer though, would help

hardy walrus
#

Well considering he has 2 pings nnow PepeLaugh

mild cipher
elder dragon
#

I am having a very weird problem where my custom coded alert is only shown once in obs. If I run the follow alert let's say 5 times. The first time it shows on obs, the other 4 times it doesn't

#

Is this problem known? Or am I just breaking things haha

hardy walrus
#

@mild cipher While I'm thinking of it: Can I have the wiring for your wireframe for the hypecup not completely close and only do about 90% around the image?

elder dragon
#

Also, there are no errors inside the obs debug console

steep wagon
#

@mild cipher thank you

mild cipher
#

@hardy walrus how do you mean 90% spinning_think

viral patrol
#

@elder dragon I would clear all the OBS Browser Source cache, just to be sure

hardy walrus
#

@mild cipher the video you have from that tweet or yours with tom nook. The same thing but not across the top of his head.

#

Everything but that spot.

elder dragon
#

@viral patrol Where can I find that?

mortal knotBOT
#

Right click on the BrowserSource > Properties > Scroll down a bit > Refresh cache of current page

viral patrol
#

@elder dragon %AppData%\obs-studio\plugin_config\obs-browser\Cache

hardy walrus
#

Or that.

elder dragon
#

Half a gb of data lol

mild cipher
#

@hardy walrus ahh gotcha, you could probably need to trace around the outer edge twice. it's a bit tedious but there isn't really a way around it at the moment. maybe I'll add more drawing functionality in the future

elder dragon
#

Did not fix it

viral patrol
#

Put an eventlist on same overlay and check if other widgets are receiving events

tribal zenith
#

maybe some JS which works in your browser but doesn't in OBS Chromium

#

but you can attach a debugger to OBS and look at the BrowserSources console

#

I am not sure if there already is a Discord Bot command for that, but just add "--remote-debugging-port=9222" as start parameter to the OBS exe and open localhost:9222 (or whatever port you chose) in your normal Browser

viral patrol
#

@tribal zenith if you are using this port it is easier to go to chrome://inspect ๐Ÿ˜‰

tribal zenith
#

or that LUL

elder dragon
#

Already checked the console and stuff

#

All data is just getting through normally

viral patrol
#

And if you start it in browser instead of OBS? Is it acting the same?

elder dragon
#

In a browser it works fine

#

Added the event list. It doesn't update after the first one in obs

#
    let tl = gsap.timeline();
    gsap.set('.main-container', {y: '0%'});
    let items = ['Cheenburger', 'Big Cheen', 'Medium Cheen', 'Small Cheen', 'Cheen Sauce', 'Cheen Sundae', 'Cheen Coffee', 'Cheen Special', 'NM Special'];
    let prices = [4.25, 5.50, 2.99, 2.95, 5.99, 4.99, 2.99, 1.50, 1.95, 1.00, 0.95, 0.99];
    let name_amount = getRandom();
    let item_amount = getRandom();
    let price_name = getRandomPrice() * name_amount;
    let price_item = getRandomPrice() * item_amount;
    let price_total = price_name + price_item;
    console.log('Load!');
    $('.random-name').text(`${name_amount}x {name}`);
    $('.random-item').text(`${item_amount}x ${getRandomItem()}`);
    $('.price-name').text(price_name.toFixed(2));
    $('.price-item').text(price_item.toFixed(2));
    $('.price-total').text(price_total.toFixed(2));

    tl.to('.main-container', {
        y: '0%',
        duration: 1,
        ease: 'Power2.easeOut'
    });

    tl.to('.main-container', {
        y: '100%',
        duration: 1,
        ease: 'Power2.easeIn'
    }, '+=5');

    function getRandom() {
        return (Math.floor(Math.random() * 6) + 1);
    }

    function getRandomItem() {
        return items[Math.floor(Math.random() * items.length)];
    }

    function getRandomPrice() {
        return prices[Math.floor(Math.random() * prices.length)];
    }
#

This is the js

#

I don't see anything that would break it

frail raven
#

How can I simulate a keyboard button press to my HTML widget? @tribal zenith mentioned it could be done, but Iโ€™m not sure how?

tribal zenith
#

register the DOM event normally in your overlay and interact with it in OBS

elder dragon
#

Further testing with the data, as soon as a single follower event is shown none of the data is updated. So any event is broken

#

So there must be something that breaks it

tribal zenith
#

where do you trigger the timeline?

viral patrol
#

It should destroy all the data after event as alertbox is emptied on each call

elder dragon
viral patrol
#

Seems like something internal that breaks queue

elder dragon
#

This error is shown on load, and on the first follow event

#

Then it's not shown anymore and no alerts are shown

#

I do get the emulating logs

#

Seems like something internal that breaks queue
So I did break se lol

viral patrol
#

calls for SE.Police

elder dragon
#

where do you trigger the timeline?
From the editor and from the obs plugin tested both same result

tribal zenith
#

what if you say let tl = gsap.timeline({ repeat: 0, paused: true }); and then trigger tl.play() after the last tl.to

elder dragon
#

I don't think the problem is with gsap

#

As the event list widget I added also doesn't get data

#

Even if it's from other events besides the follow event

tribal zenith
#

track sounds like the internal playhead of a timeline

elder dragon
#

Yeah the error comes from se internal code

next radish
#

yo sup mischa

#

i literally have 5 creators screaming at me right now

#

any idea if this will be fixed soon

elder dragon
#

Oh wait this is a problem more people have?

next radish
#

yeah

elder dragon
#

lol

next radish
#

assuming its the same thing

#

nothing is triggering obs side

#

editor side is fine

viral patrol
#

I have forwarded this issue to devs.

next radish
#

i just got the Mayday call from soo many creators

dense rose
#

I can confirm I see those error messages myself too

elder dragon
#

Can we get a message when it is fixed?

next radish
#

worst thing to happen on a big content drop day ๐Ÿ˜‚

elder dragon
#

Big oof

next radish
#

YES PLEASE so i can forward this along to the creators

#

destiny is dropping content in 1h

#

valhalla is out today

elder dragon
next radish
#

dude im freaking rn lmaooo

#

all my dms just freaked out at the same time

#

everyone getting the same problem

elder dragon
#

mischa
Misha*

#

๐Ÿ‘€

next radish
#

๐Ÿ˜ฌ sowwwy

#

you guys got it back by the looks of things

#

fast reply - AMAZING work guys

dark hornet
#

@next radish how? restart or is it meant to just work again? mine isnt

next radish
#

just jumped into gladds stream and alerts were working so

elder dragon
#

Yeah it works again

#

Just had to refresh the browser source in obs

next radish
dark hornet
#

omg thank you so much @elder dragon , im freaking out because i know nothing about tech lol โค๏ธ

elder dragon
#

No worries

viral patrol
#

Fix has been applied. It should be all fine now, If there are any issues, do not hesitate to ping me

frail raven
#
window.addEventListener('keydown', function (event){
  console.log("Working");
});

Doesn't seem to trigger at all in streamelements, any thoughts on what weโ€™re doing wrong here?

Weโ€™re trying to trigger an animation in HTML with a button press, but having trouble getting things working in OBS.

viral patrol
#

@frail raven The only way to catch keydown is probably to interact with overlay, but I am not sure if this would be good way to go.

#

The other way is pretty complex: key listener on your computer with websockets and widget that connects to this websocket

#

Overengineering at finest

dense rose
#

We know it's possible to catch such events with OBS's interact thing of the browser sources

viral patrol
#

This is what I wrote above, but you should be interacting, window should be focused, iframe helper should be removed...

#

I think there are easier ways - like chat commands, to interact with widget

dense rose
#

It seems to me that the iframe helper is blocking such events from even being caught in a browser.

If possible, we want to have it controllable with stream deck.

But like, I guess I can over engineer too

frail raven
#

Working with keyboard keys = Working with Stream Deck. That part is easy.

#

So itโ€™s not possible to do it the way we were trying, I guess.

frail raven
#

Seems kindaโ€™ insane that keyboard button presses donโ€™t work.

viral patrol
#

This websocket and registering key strokes.... it is a keylogger ๐Ÿ˜‰

dense rose
#

Ahh yes, over engineering lets goo

tribal zenith
#

what exactly are you trying to do with the streamdeck?

dense rose
#

Just trigger an event in an obs browser source when you press an button. It would be awesome if we could get it to work in streamelements

elder dragon
#

I think you could run a local nodejs server that uses a streamdeck package and then emits a local socket.io stream. Then with the widget connect to that.

tribal zenith
#

can you emit events when you connect to the SE socket? or just listen?

charred vortex
#

im creating a chat widget and i want to check if the message is a highlight. the only thing i can see that differentiates the normal messages from highlights is this "msg-id" in the tags. is there anything else that says its a highlight or how do i call that tag?

sturdy oak
#

I think you could run a local nodejs server that uses a streamdeck package and then emits a local socket.io stream. Then with the widget connect to that.
@elder dragon possible but too complex for average joe

dense rose
#

I'm not worried about setting that kind of thing up, I'm more worried that other people can't really use it properly

rapid hemlock
#

Hey Bois and Girls. Im lokking for a develepor there can make a twitch bot.
i want the bot to say thx for joining my discord server in the twitch chat when peapoel join the discord server.

I can pay for it if one of u want me to. ๐Ÿ™‚

ivory heath
#

help
does the api have any means to collect merch sales events, possibly in activities?
i'm using the following to get subs, tips, hosts and raids but want to add merch to the setup, but cant see anything in the docs

/kappa/v2/activities/"+ channel_id + "?types=subscriber&types=tip&types=host&types=cheer&types=raid&after=(date/time)

viral patrol
#

@ivory heath &types=merch

ivory heath
#

@viral patrol I was hoping it was that simple. Thank you ๐Ÿ‘

charred vortex
#

im creating a chat widget and i want to check if the message is a highlight. the only thing i can see that differentiates the normal messages from highlights is this "msg-id" in the tags. is there anything else that says its a highlight or how do i call that tag?
@viral patrol could you help me with this? ๐Ÿ˜…

viral patrol
#

Checking that. I think that there's a tag with reward id

#

OK. I was doing the same you wrote:

if (obj.detail.event.data.tags['msg-id'] === "highlighted-message")
charred vortex
#

oh i see how you're getting it, okay. thanks a lot!

#

also, i dont know if you can help with that, im trying to animate the text, but if i do a 0.5s gsap animation it breaks when the messages come in faster than that.. is there a way to delay the chat?

tribal zenith
#

create your own queue and animate text from there

#

or use CSS animations. I believe they run separate from JS

charred vortex
#

yeah, thats what i was thinking, but the text has to go up not a fixed amount, so i would somehow need to create a css animation dynamically through js ๐Ÿค”

muted dagger
#

Guys is there something wrong on hex color?

charred vortex
#

what do you mean?

muted dagger
#

what do you mean?
@charred vortex thats for me?

charred vortex
#

yes

muted dagger
#

I was trying to choos e a light pink on my alerts

#

But the hex color isn't choosing the right one

charred vortex
#

pretty sure the colorpicker is bugged in general. i would suggest you just type the hex you want

muted dagger
#

pretty sure the colorpicker is bugged in general. i would suggest you just type the hex you want
@charred vortex i was typing the color from photoshop xD

#

I mean copying and pasting

charred vortex
muted dagger
#

OH i know what is wrong LUL

#

Thank you @charred vortex <3

spice pawn
#

hello, i need some help setting up my software to work smoothly on my hardware specs, so if anyone can help, let me know please

#

specs is i3 3240,8gb ddr3, r9 290 4gb gpu

tribal zenith
#

yeah, thats what i was thinking, but the text has to go up not a fixed amount, so i would somehow need to create a css animation dynamically through js ๐Ÿค”
@charred vortex well, you can create CSS animations in JS, but then you might as well use GSAP and queue messages yourself

viral patrol
#

@spice pawn Unfortunately threshold of video transcoding is high. I am not sure if you are able to stream above 480p with that setup.

spice pawn
#

well i could with streamlabs but somehow it decided to screw itself up

#

especially with the game capture being very buggy still, on both streamlabs, standard obs and obs live

elder dragon
#

For youtube member alerts I currently need variations for the different tiers. How do I set this up? I can set the variation paramater to "Subscription tier" and condition to "Exact". But tiers on youtube are named and not numbered so I have no clue what tier to put where

upper pollen
#

Hi guys!

#

I'm looking for some really basic guide on how to start coding an overlay

#

I couldn't find anything so far ๐Ÿ˜ฆ

sturdy oak
lost fjord
#

Hi, I have a question, how can I take the alerts from one overlay to another one?

timid ridge
#

Hello good people. I have a twitch extension and i want to integrate with streamelements. Specifically to send or trigger alerts from this extension to streamelements. Is it possible and if so, where do i start, whats the documentation for this?

tribal zenith
#

look at the pinned messages in this channel

timid ridge
#

Thank you. Not using Discord usually ๐Ÿ™‚ Will take a look

tribal zenith
#

but I am not sure if you can create activities by POSTing to the API or just update existing

rapid hemlock
#

Hey Bois and Girls. Im lokking for a develepor there can make a twitch bot.
i want the bot to say thx for joining my discord server in the twitch chat when peapoel join the discord server.

I can pay for it if one of u want me to. ๐Ÿ™‚

charred pebble
#

hey guys i was wondering if its possible to create a webhook from my stream store to my discord, so whenever someone redeems smth there i would also be notified in here
thx

jaunty flare
#

@steady iron I'm not sure why , but my awesome shoutout widget (nothing was changed) just started not showing the channel image when the command is used. You can see, the shoutout in chat, hear the music, but no image or text on screen. Any help?

steady iron
#

Hello! Does it happen in the StreamElements page or just on OBS side?

#

@jaunty flare

jaunty flare
#

SLOBS side @steady iron

steady iron
#

Have you tried clearing the cache off the source or re-adding it altogether?

jaunty flare
#

where would I clear the cache? I tried deleting it and redoing it all together yes, same result

#

@steady iron

muted dagger
#

Guys i need some help here, I have one alertbox that is working perfectly on SE Overlays Editor, but when the alert shows up on my OBS, isn't breaking the message line, on SE is breaking the message line, but in OBS isn't making the alertbox big as far as the message, there's any thing that I can do?

sturdy oak
#

While adding the browser source, there's some css that OBS adds, that could be the problem

#

First try this

mortal knotBOT
#

Right click on the BrowserSource > Properties > Scroll down a bit > Refresh cache of current page

muted dagger
#

Gonna try this right now

#

Same thing @sturdy oak I've restarted OBS too to try and nothing =/

sturdy oak
#

then it's the custom css that OBS adds

#

Can you go into custom css of those alerts and paste the css here

muted dagger
#

sure

#

It's a really big one, should I post here?

sturdy oak
#

yeah yeah

sturdy oak
muted dagger
#

Okay

#

Didn't worked =/

#

@sturdy oak maybe I'm gonna just remove the message below the alert

sturdy oak
#

no wait let me have a look at the css

muted dagger
#

Okay <3

sturdy oak
#

can you send html and js too so I can set it up localy

muted dagger
#

Okay

#

the html

#

this is the JS

muted dagger
#

@sturdy oak over i'm gonna sleep right know, tomorrow i'm gonna take a look here <3

#

Thank you for now for all the help โค๏ธ

sturdy oak
#

ooh should have checked with ya before, need the fields

copper phoenix
#

I'm making this custom follower goal bar, how do I update follower count when someone follows, my event listener works when I emulate follow, but when real follow happens it's not working. Probably trying to get data from wrong object, but what's right way to do this?

tribal zenith
#

what listener are you using currently?

copper phoenix
#

onEventReceived

#

or if you mean inside that, I try to use follower-latest

#

in emulation it shows amount inside object and I assumed that it's that what I need, but not sure as it's not working in live

tribal zenith
#

so you have something like:

window.addEventListener('onEventReceived', function(obj)
{
  if(!obj.detail.event) return;

  const listener = obj.detail.listener.split("-")[0];
  const event    = obj.detail.event;
  
  if(listener === 'follower')
  {
    //do stuff
  }
}
#

then event.name is the username for example

sturdy oak
#
{
  if(!obj.detail.listener['follower-latest']) return;

  if (followers <= follower_goal){
  followers++;
}
}```
copper phoenix
#

window.addEventListener('onEventReceived', function(obj){
const listener = obj.detail.listener;
const data = obj.detail.event;

if(listener === "follower-latest"){
let followers = obj.detail.event.amount;
console.log(followers);
setFollowers(goalText, followers, goal);
}
});

sturdy oak
#

No, that wil return 1 all the time

copper phoenix
#

ah ok, that makes sense, I was trying to get latest total amount from some where, but it's not working that way

sturdy oak
#

you can do that

tribal zenith
#

change your listener to onSessionUpdate if you just want the count

sturdy oak
#
    let data=obj["detail"]["session"]["data"];
    let fieldData=obj["detail"]["fieldData"];
    followers = data["follower-total"]["count"]
});```
#

That will return total followers

tribal zenith
#

but only on load

copper phoenix
#

I got that on load

sturdy oak
#

yeah and onEventReceieved followers will be incremented

hardy walrus
#

All these single tick codeblocks.

tribal zenith
copper phoenix
#

But if I use onSessionUpdate can I use ["follower-total"].["count"] there?

tribal zenith
#

without the dot yes

sturdy oak
#

without the . sure

copper phoenix
#

thanks

sturdy oak
#

yea lol you first

tribal zenith
sturdy oak
#

@copper phoenix But if you go for onSessionUpdate and use data["follower-total"]["count"], the goal bar will go from 0% everytime there's a follow

#

So that might not be a good idea

tribal zenith
#

you can save the last value in a global variable and animate/update from there

sturdy oak
#

it anyhow has to be incremented

copper phoenix
#

Thanks, I'll do some testing, ++ is also good option

tribal zenith
#

people can also unfollow and you would have to decrease the counter

sturdy oak
#

that will be compensated for in onSessionUpdate

copper phoenix
#

I tested this with my bot account and I dont know why, but when I unfollow it's not decreasing total count in streamelement data, even if it's shows correctly in twitch

tribal zenith
#

you could try something like:

var count;

window.addEventListener('onWidgetLoad', function(obj)
{
  //If you need fieldData
  //let fieldData = obj["detail"]["fieldData"];
  let data = obj["detail"]["session"]["data"];
  count = data["follower-total"]["count"];
  updateGoal(count);
});

window.addEventListener('onSessionUpdate', function(obj)
{
  const data = obj["detail"]["session"];
  let updatedCount = data["follower-total"]["count"];
  if(count !== updatedCount) // followers lost or gained
  {
    count = updatedCount;
    updateGoal(count);
   }
});

function updateGoal(value)
{
  //do stuff
}
#

but I actually don't know if or how often SE updates the follower-list on unfollows

#

and that only gets the count for all followers. If you only want a specific timespan you would have to adjust some fields

copper phoenix
#

not with this one, but thanks

cloud iris
#

Hey all. Not sure if anyone would be able to help with this, but I have bought some overlays from VBI (JellyUI) and I want to use their goal widgets. However they don't use the totals in SE, but they use the "goals" in SE (the goal values that you can set yourself). For instance subscriber goal, I want that to update live, so if I have goal X of 30, that X updates, when people sub but also unsub (if that makes sense). Is there any way to change this in the code?

sturdy oak
#

ohh sure

#

There is a way you can get the current subs, if that's what you wanna use