#dev-chat
1 messages ยท Page 46 of 1
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 ๐
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?
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?
@wraith flame click the blue plus sign on the overly editor and choose custom widget. Click layer, settings, paste accordingly.
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:
are iframes even allowed in general? I tried to iframe StreamElements itself and still got the error 
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?
Thanks, I hoped it would work but I think there might be a possibility in the future for a workaround in General ๐
Yup. Iframes are blocked by chromium policy (same origin), so you won't be able to use iframes, cookies, localstorage.
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
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.
@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.
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.
Oh. There's nothing ready like that
@viral patrol sounds good, thanks
@sage bane But do not hesitate to ping me so I ping again as due to timezones differences some messages may get lost.
K
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?
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
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
Do you maybe parse every event by some queue? As you may parse message events too
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 ๐
I just mixed together two widgets ๐
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?
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?
@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?
@viral patrol hey, getting back to you, any news ?
@sage bane pinging forward as I got no updates.
Do you mean API wrapper?
Yeah, some kind of project that I can use as a dependency that will handle Api calls , socket connection and events
I think that for socket it would be https://github.com/socketio/socket.io-client-java and for REST api any wrapper should be OK
I think I know what you are looking for, but I am aware of PHP wrapper only.
@viral patrol Thanks, I'll check out the timing on the custom events lists
@winged steppe Basically your purpose is a regular eventlist, but limited to one event only.
Hi there, It occurs to me that the API documentation is not up to date. Here is an example: https://docs.streamelements.com/reference/single-giveaway#giveawaysjoinedbychannelandgiveawayidget
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 ๐
https://docs.streamelements.com/reference/single-giveaway#giveawaysbychannelandgiveawayidput Body Params: WORK IN PROGRESS
Is it really in progress or it's just forgotten into the limbs? ๐
create one app for ps4 or ps5
@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))?
This can be a simple object (no semireferences, functions)
So you can have:
{
"value":15,
"username":"amazingUser",
"items":[1,2,5]
}
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.
Also - you don't have access to localstorage from widget
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)
I am not sure about ratelimiting there as bucket limit headers are not forwarded to widget AFAIK
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 =]
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
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?
Remember, there's a delay between chat and stream
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?
Something like that
setTimeout(()=>{
isActive = false;
displayWords();
$('.container').delay(1000 * userOptions['wordTimer']).fadeTo('slow', 0);
},20000);
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 ; 
Great!
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 ๐ค
Yup. But it is not a "copy/paste" thing, more of code should be added
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
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
@pastel raft You might be able to get away with a command but gonna be major 
How are you wanting to use the command along with a response?
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.
specific languages or interchangable?
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
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.
WOW Thank you so much!!!
As far as interchangeable I'd have to ask someone something.
Though actually might need to do a small change if it includes spaces
Yup. Thought so.
@hardy walrus I may have done it wrong... thi.... yup lol
Change this to the end after that last equal ${queryescape ${1:}}
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

Yeah.
https://translate.google.com/?hl=en&tab=TT#view=home&op=translate&sl=en&tl=lv&text=${queryescape ${1:}}
Use just that instead.
That works, Thanks again!!!
Let me ask about the interchangeable way.
OK looks like it would be tricky, it would be super cool though.
I have an idea of how it might work but not sure if it actually does.
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.
That unfortunately is marching into $$$$$ area.
100%
BUUUUUT
if it can be done for $50 I'm in, but I'm kinda cheap/broke ATM lol
!command Language1 Language2 Message
https://translate.google.com/?hl=en&tab=TT#view=home&op=translate&sl=${1}&tl=${2}&text=${queryescape ${3:}}
DUDE!
I was thinking something like this, but didn't know you could break it into more than $(2:)
That's freaking sweet!
@viral patrol Sorry to ask again, but do you have any news ?
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
The thing is that I applied 5 months ago and Touch Portal users are told to wait since then :/
Anyway, thanks for trying ๐
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? ๐
@glass cipher Hi. I added followers to snake game, You need to get that widget again from widget-share channel
@viral patrol What should I tell Touch Portal team and users then? "Wait a bit more"?
hello,
i am trying to use CSS "backdrop-filter blur" but seems like StreamElements is not accepting it. Can you plz help!
Thanks! ๐
@lunar beacon what do you mean by "not accepting it"?
Seems to be working on my end:
.title{
backdrop-filter: blur(1px);
}
As you can see, overlay editor dots are under semitransparent blur
in Firefox you probably need the the moz prefix, but that doesn't matter for BrowserSources in OBS since they are based on Chromium
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
after zooming in it is giving me this bevel-ish look
I checked it again. it seems to be working on Browser but not on OBS
@viral patrol can't find it there.... ๐ฆ (the Snake Widget)
@lunar beacon which of those is the desired outcome?
@viral patrol can you give me the download link pls? i am literally blind -.-
thank you very much!
@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
which version of OBS do you use?
i currently have 26.0.2 (64 bit)
Maybe using -webkit-backdrop-filter instead will help?
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 ๐ค
OBS CEF is more strict than web browser
Maybe using
-webkit-backdrop-filterinstead 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
I had an alpha channel as well. So that shouldn't matter
yes. removing the alpha didn't do anythng as well
so the only difference is the border.
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
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 ๐
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
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
okay. yeah if prefixing didn't work either the backdrop-filter is most likely not supported in your BrowserSource version
should i install Chromium thn?
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
alright man! i will try that. Thank you very much ๐ ๐
@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
no problem. you can check browser and version with
console.log(navigator.appVersion);
console.log(navigator.userAgent);```
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
I've got a question about @hushed hazel's credits roll (from this: https://discordapp.com/channels/141203863863558144/457957557470887947/471391075257286657) I wanted to add a list of my mods in there as well to thank them. I've been tinkering with the custom code and added a field to take the mods, but I'm not sure what code I should be using to pull my mods from Twitch (if I can even do that).
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;
} ```
The easiest way is to add a separate section in HTML for mods and type them inside.
or parse chat messages and log every mod that typed during that stream. Unless you always want all mods
@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?
@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.
<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
@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
@viral patrol Thanks that actually works pretty well. Appreciate it 
@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 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
yeah, well if it works, it works 
Right. Sometimes it's great to have things "perfect"... but if it works, why make it harder ๐
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.
There is no eval nor JSON parse on custom command with SE bot, you will need an API that replies with plain text
You need to find a website that will give you just a text instead of JSON object
you mean like this https://developers.faceit.com/docs/auth/api-keys
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
@fervent prawn The easiest way to get a rotator https://streamelements.com/dashboard/overlays/share/5f3d520a2a8883627bd6724f
And you can use data as on https://github.com/StreamElements/widgets/blob/master/CustomCode.md#common but instead of data["tip-latest"]["name"] use {tip-latest.name}
The widget above has all listeners included
@viral patrol thanks bro. I'll look into this now
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
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);
}
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 ๐
does anyone know how to set up a custom bot name for streamelements
How can i send a custom alert with tts using the api?
@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.
@frail wyvern This should show you the way https://twitter.com/streamelements/status/1214612597108084736?lang=en
@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();
thank u
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.
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
@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)
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. ๐
I will prepare something
As this is for default version
And I want to display sum of tips instead of first tip by user.
@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
I updated alternate version of that widget. You can redownload it from widget share channel
There is an option added:
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!
Same setup as previously
I don't see what you sent
Yep
So grab it from here: https://discordapp.com/channels/141203863863558144/457957557470887947/471391075257286657
It is updated there
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 ๐
You can change visibility of it, emulate some events (select "preview live on stream") and they should be visible on OBS too
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.
You can also go to session data tab and change numbers there: https://streamelements.com/dashboard/session
Ok it worked!
So what I don't really like is that it's horizontal.
I would like the name to be vertical like this
It's possible ๐ ?
It's perfect and it's even better.
Thank you for your help, really! ๐
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?
If you check typeof X === "undefined it will return true, x === undefined will throw an error x is not defined
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
It is the best to have a consistency in your code, just to avoid future mistakes
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
@tribal zenith I can recommend you this: https://archive.org/details/wat_destroyallsoftware (there is whole segment on JS)
A lightning talk by Gary Bernhardt from CodeMash 2012. The sarcasm in this talk does not represent anyone's actual...
tried setting up a custom bot name but ground control doesnt seem to show the option
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?
nvm i figured it out
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?
Hi. You need to create an overlay and in top right corner you will have "preview", paste that URL to OBS
ah
as 1920x1080
okay, so i'll try that
Check out the new Overlay manager guide: https://youtu.be/LwAfMIR3Cj0
Create an amazing overlay with StreamElements, watch our video guide to learn how.
Tipping page setup: https://youtu.be/eLzxRkq7tJo
Add KappaGen to your overlay: https://youtu.be/Mlz3pj_gkBM
Overlay...
Except instead of top bar, there's a plus button
okay, got it
now i dump all the stuff in there, and add the overlay as the browser source
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?
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
is there any way to get mic input? i'm trying to do it through js but it's unhappy
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(
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.
As a simple solution, switch scenes with your SD.
ok.
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!
you can add a button to your SE overlay settings and trigger things with that
hey everyone, i was wondering, is there a way to get the {uptime} to give the seconds? like 2h 21m 30s
@tribal zenith Youโre a genius and I love your face! Thank you! That seems to have done the trick for us.
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 
@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
i will test it when im online but it looks like what im looking for. thank you!
when you try to call it while being offline, it will just output Uptime: Name is offline
@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?
Take a look at the channel header of this channel for the overlay editor documentation.
ahh i never new you could click up there to see more links i only saw the first two
thank you
You'd have to go the custom widget -> middleware -> chat route @neat tangle .... assuming Twitch
*overlay not widget
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?
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.
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
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)
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
Is this for like a Twitch overlay, or like a Twitch extension? .... I assumed it was an overlay
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
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
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;
hi! someone know how to integrate streamelements in unity?
I have the Twitch integration, but I would like to make games that instead of running with money work with streamelemens points or bits
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
i am very curious in this Unity to Twitch with S.E. integration ....
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
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?
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
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.
The good thing about http APIs is that you can familiarise yourself with then simply by using like, curl
there is no limit @hard spear that will break your code... but you might get rate limited if you write shitty code.
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
... haha i know.
Thank's @hard spear ๐
that is your limit though. rate limiting.
I meant, misunderstanding boundary conditions
if that makes sense
or edge cases
yw @shell quartz
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
@tribal zenith but those promises aren't an inter-widget semaphore or mutex, are they?
so race conditions remain a possibility AFAIK
Again; @hard spear I think you are overthinking this
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
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.
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
well, you can always just add fields to the Widget Editor ๐
'always' isn't strictly true, but it does cover a lot of use cases, yes
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
It's just curiousity @elfin arch
I do overengineer a lot, but in this case I'm curious.
@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:
- script that does whole logic and emits event to updater including some widget specific data
- script that listens to events emitted by all widgets and aggregates them, checks overwrite conditions, timestamps
- 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
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.
I never really used them, but maybe AWS is for you
I think that heroku free tier should be enough for that
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
and if you don't do client work you can always just test in a local NodeJS environment
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
+1 for heroku it's free tier is now 100% no spinup time Node enviornment
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
does Heroku still go to sleep after inactivity?
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.
If you have just 1 project, no. at least a few months ago they removed that spin up @tribal zenith
oh ok nice
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
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
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
No, the button is in the editor
looks like this for example
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
Fields are read-only. They cannot be changed (saved) via scrript
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
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
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.
well; that's debatable. I'd rather be able to update and override the JSON
the answer to your question is "yes".
design to that. then if you see something off. post your code here.
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
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
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?
Overlay reload event is emitted by save.
excellent
And there's a listener to that event type in overlay
yeye
but it will only refresh if you actually changed something before saving
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
i still have no Idea what you are trying to do or what the struggle is....
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.
I think he tries to control multiple overlays from one editor
but that won't work, since they are sandboxed
but what if you add ```js
{
time: Date.now()
...
...
}
and just compare the store.time
yup. it's sandboxed.
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
just put a date field on every overlay you need it for and update each field if necessary
how can you create an infinite loop with that?
you want to error proof if Date.now() = Date.now() ?? that's always false.
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.
No, they work independent
The other day, in a production environment, this double counting happened about 50% of the time in every batch of gifted subs
each tab will work on it's own queue
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.
why
why what?
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
I think your mixing up some fundamentals of JavaScript here
that's not there is SE, but it's a legit example of a race condition.
not all overlays are made by SE @elfin arch
so you are not using the SE overlay editor?
I'm migrating to it
you'll have to explain @tribal zenith because I don't see how this is language specific
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
haha; ok; phew. you're killing me Cosmo. I'm forehead to keyboard right now.
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)
you also don't have access to localstorage for example
that's the 8 lines of difference, yep
i'd like to know these 8 lines...
and also... if you are breaking outside of the sandbox... then expect shit to break.
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
I still don't get the use-case for this 
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
but why use classes/modules instead of basic alert events?
mainly for custom goal counters.
can you post a jsfiddle of what you got?
okay, but lock is client-sided. So every widget would have it's own copy
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
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?
so if they ever messed up they would raise an error
And I can't JS fiddle it buuuut
hang on
@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
@viral patrol ^ up 4
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
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
you don't have to lock the promise, when using await
@hexed ridge Unfortunately I am not aware of anything that could allow that
@viral patrol okay thank you for the info
await just stops the code execution until it finishes
i know what await does, the 'lock' isn't the actual promise object, hold on
look at the methods "requestDataLock" and "withDataLock"
at no point should either of those be used with the overlay editor.
...... this is an 'easy' editor.
how is this being so hard?
you can use the onSessionUpdate event to check if any counter data has updated
^ right exactly. it's built in for you
remember: this code was almost entirely written prior to my FINDING SE overlays
you don't have create functions for all these things. it's prebuilt functions for you
I'm only migrating to it now
don't worry about any race condition. you will never have it in the overlay editor
Also, I'm not saying it's your fault but you've started to forget things said earlier
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
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.
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
largely the race conditions were due to bugs, and largely the conditions can be eliminated in this context.
Answer is no; 2 widgets can not talk to each other.
they don't have to talk to each other, because the server does by sending events
^
I mean, exactly.
just listen to the same events and you don't have to fear race conditions
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
so you have an external website as the dashboard?
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)
what is incorrect?
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
i think Reboot mention Process that might be better in the Object.
that just makes you more vulnerable to bugs
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
well, I hope you already know this document, but in case you don't maybe this helps you understand the SE API:
https://github.com/StreamElements/widgets/blob/master/CustomCode.md
I do and it did
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.
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
๐คฃ ... if it's an Array ... [1] instead of [0] but seriously no idea
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
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
it's still event based. not sure why that was unclear.
it looked to me like you used the store as proxy for event processing not the actual listeners. But maybe I just misread that
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
onSessionUpdateevent 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?
It is not writeable by custom widget. Only native (session events/aggregates) and bot (counters)
well, you can modify it on the client, but not on the server
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
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
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
But multiple overlays can have access to same SE_API.store key
^
across accounts?
Like you have a one widget that updates data and second, on another overlay (within same account) can access this data
it doesn't need to be cross account
But for data across users - you can use keyvalue.xyz service
But... They did reset my value several times
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
If you need one central front-/backend you have to build your own, yes. But for most cases you can just duplicate code
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?
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
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.
So there is no way to code that in?
It would require widget rewrite, a big rewrite. And the state would be updated every second or lost on widget refresh
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
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!
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
How do I add a tip through the api? The api docs imply this endpoint: https://docs.streamelements.com/reference/tips#tipsbychannelpost, but the docs are also incomplte
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?
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
I'm using LX's excellent Ultimate Text Widget, however I can't find proper syntax for last sub gifter. I've tried {subscriber-alltime-gifter.name} and {subscriber-gifted-latest.name} but can't seem to get a handle on it. JS isn't really my bag so I'm a bit lost in the code ๐ฆ
@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.
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?
Yes; it is possible. But not suggested or supported by either Twitch or SE
oh i see.. ok thank you!
idk how to use the api.... Does anyone know how I could "print" the top coins for example in my chat
have you tried !top command?
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
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?
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
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
I want that my own Bot conneted to the api
I'm using LX's excellent Ultimate Text Widget, however I can't find proper syntax for last sub gifter. I've tried {subscriber-alltime-gifter.name} and {subscriber-gifted-latest.name} but can't seem to get a handle on it. JS isn't really my bag so I'm a bit lost in the code ๐ฆ
@weak creek Make sure you have this data in "Session data" here: https://streamelements.com/dashboard/session as your syntax seems proper
@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
is there a way to add time manually to the stream a thon widget ?
@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
OK. You made me do it as it was a simple fix. Button should is added here: https://discordapp.com/channels/141203863863558144/457957557470887947/463071039765610506
@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?
Data is collected since you registered on SE, there's no backlog on that
Was there a subgift event since you joined SE?
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?
@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?
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!
@hexed ridge what are you trying to do?
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
@ancient fjord I beleive there is an auto incrementing goal bar in #widget-share
Any idea how far in it would be
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?
@cerulean ibex channel topic in #helpdesk-twitch
@hardy walrus thanks
@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
OK. You made me do it as it was a simple fix. Button should is added here: https://discordapp.com/channels/141203863863558144/457957557470887947/463071039765610506
@viral patrol thank you, this is a massive help!!!
@hexed ridge It is not nice, but you if text length is above specified threshold, change padding-right of text container.
height : max-content maybe?
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?
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
will streamelements be adapted for Theta tv ?
Is it possible to use add button press events into streamelements like keydown to control overlays with buttons?
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.
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 ?
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
@steep wagon, I had to make multiple commands. I called them !multi3, !multi4, etc. Up to !multi6
ah okay, thanks
@steep wagon The code I used was like so for !multi - https://www.multitwitch.tv/your_twitch_username/$(touser) !multi3 https://www.multitwitch.tv/your_twitch_username/$(touser)/$(2) !multi4 https://www.multitwitch.tv/your_twitch_username/$(touser)/$(2)/$(3)
You get the idea. Then type in the command as !multi user2, or !multi3 user2 user3, or !multi4 user2 user3 user4. Etc. That is all I could come up with. I have very limited knowledge of this type of stuff.
@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.
Mine actually wouldn't work I think on second thought.
Mine works fine
@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
@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.
@steep wagon the problem is how would it handle placing the names in the link though.
@hardy walrus it would need to know to place a "/" between each name entered.
Which it's not capable of unless you include that in the command used.
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
@mild cipher For your input ^^^^
@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.
Yeah that's the slightly tedious part.
@hardy walrus yea, but it is a lot better than a code for each one. Thanks!
@steep wagon Sidenote: thanks for giving me an idea for a friend and something else from that guy's things.
@hardy walrus welcome! Hopefully @mild cipher does answer though, would help
Well considering he has 2 pings nnow 
@steep wagon @naive forum
Easiest thing to do is just to revisit https://api.thefyrewire.com/twitch/multi/generate to regenerate your links, and pick one of the multitwitch platforms to use ๐
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
Example, se on top, browser source below it
@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?
Also, there are no errors inside the obs debug console
@mild cipher thank you
@hardy walrus how do you mean 90% 
@elder dragon I would clear all the OBS Browser Source cache, just to be sure
@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.
@viral patrol Where can I find that?
Right click on the BrowserSource > Properties > Scroll down a bit > Refresh cache of current page
@elder dragon %AppData%\obs-studio\plugin_config\obs-browser\Cache
Or that.
Half a gb of data lol
@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
Did not fix it
Put an eventlist on same overlay and check if other widgets are receiving events
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
@tribal zenith if you are using this port it is easier to go to chrome://inspect ๐
or that 
And if you start it in browser instead of OBS? Is it acting the same?
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
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?
register the DOM event normally in your overlay and interact with it in OBS
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
where do you trigger the timeline?
It should destroy all the data after event as alertbox is emptied on each call
Found this error
Seems like something internal that breaks queue
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
calls for SE.Police
where do you trigger the timeline?
From the editor and from the obs plugin tested both same result
what if you say let tl = gsap.timeline({ repeat: 0, paused: true }); and then trigger tl.play() after the last tl.to
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
track sounds like the internal playhead of a timeline
Yeah the error comes from se internal code
yo sup mischa
i literally have 5 creators screaming at me right now
any idea if this will be fixed soon
Oh wait this is a problem more people have?
yeah
lol
I have forwarded this issue to devs.
i just got the Mayday call from soo many creators
I can confirm I see those error messages myself too
Can we get a message when it is fixed?
worst thing to happen on a big content drop day ๐
Big oof
YES PLEASE so i can forward this along to the creators
destiny is dropping content in 1h
valhalla is out today

dude im freaking rn lmaooo
all my dms just freaked out at the same time
everyone getting the same problem
๐ฌ sowwwy
you guys got it back by the looks of things
fast reply - AMAZING work guys
@next radish how? restart or is it meant to just work again? mine isnt
just jumped into gladds stream and alerts were working so
yep
omg thank you so much @elder dragon , im freaking out because i know nothing about tech lol โค๏ธ
No worries
Fix has been applied. It should be all fine now, If there are any issues, do not hesitate to ping me
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.
@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
We know it's possible to catch such events with OBS's interact thing of the browser sources
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
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
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.
Seems kindaโ insane that keyboard button presses donโt work.
This websocket and registering key strokes.... it is a keylogger ๐
Ahh yes, over engineering lets goo
what exactly are you trying to do with the streamdeck?
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
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.
can you emit events when you connect to the SE socket? or just listen?
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?
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
I'm not worried about setting that kind of thing up, I'm more worried that other people can't really use it properly
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. ๐
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)
@ivory heath &types=merch
@viral patrol I was hoping it was that simple. Thank you ๐
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? ๐
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")
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?
create your own queue and animate text from there
or use CSS animations. I believe they run separate from JS
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 ๐ค
Guys is there something wrong on hex color?
what do you mean?
what do you mean?
@charred vortex thats for me?
yes
I was trying to choos e a light pink on my alerts
But the hex color isn't choosing the right one
pretty sure the colorpicker is bugged in general. i would suggest you just type the hex you want
It should be like my logo
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
dont click the color circle, put the code as a text next to the circle
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
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
@spice pawn Unfortunately threshold of video transcoding is high. I am not sure if you are able to stream above 480p with that setup.
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
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
Hi guys!
I'm looking for some really basic guide on how to start coding an overlay
I couldn't find anything so far ๐ฆ
I'm looking for some really basic guide on how to start coding an overlay
@upper pollen This will get you started https://github.com/StreamElements/widgets/blob/master/CustomCode.md
Hi, I have a question, how can I take the alerts from one overlay to another one?
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?
look at the pinned messages in this channel
Thank you. Not using Discord usually ๐ Will take a look
but I am not sure if you can create activities by POSTing to the API or just update existing
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. ๐
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
@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?
SLOBS side @steady iron
Have you tried clearing the cache off the source or re-adding it altogether?
where would I clear the cache? I tried deleting it and redoing it all together yes, same result
@steady iron
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?
this is on SE editor
This is in my OBS
While adding the browser source, there's some css that OBS adds, that could be the problem
First try this
Right click on the BrowserSource > Properties > Scroll down a bit > Refresh cache of current page
Gonna try this right now
Same thing @sturdy oak I've restarted OBS too to try and nothing =/
then it's the custom css that OBS adds
Can you go into custom css of those alerts and paste the css here
yeah yeah
@muted dagger Check if clearing custom CSS in OBS fixes it
Okay
Didn't worked =/
@sturdy oak maybe I'm gonna just remove the message below the alert
no wait let me have a look at the css
Okay <3
can you send html and js too so I can set it up localy
@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 โค๏ธ
ooh should have checked with ya before, need the fields
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?
what listener are you using currently?
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
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
{
if(!obj.detail.listener['follower-latest']) return;
if (followers <= follower_goal){
followers++;
}
}```
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);
}
});
No, that wil return 1 all the time
ah ok, that makes sense, I was trying to get latest total amount from some where, but it's not working that way
you can do that
change your listener to onSessionUpdate if you just want the count
let data=obj["detail"]["session"]["data"];
let fieldData=obj["detail"]["fieldData"];
followers = data["follower-total"]["count"]
});```
That will return total followers
but only on load
I got that on load
yeah and onEventReceieved followers will be incremented

But if I use onSessionUpdate can I use ["follower-total"].["count"] there?
without the dot yes
without the . sure
thanks
yea lol you first
you can find more infos here:
https://github.com/StreamElements/widgets/blob/master/CustomCode.md#on-session-update
@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
you can save the last value in a global variable and animate/update from there
it anyhow has to be incremented
Thanks, I'll do some testing, ++ is also good option
people can also unfollow and you would have to decrease the counter
that will be compensated for in onSessionUpdate
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
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
not with this one, but thanks
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?

