-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose provider name #45
Comments
You cannot get it directly, but you can obtain the account ID and then fetch an endpoint that will show with platform that user is from: window.addEventListener('onWidgetLoad', async (obj) => {
const accountId = obj.detail.channel.id
const accountFetch = await fetch(`https://api.streamelements.com/kappa/v2/channels/${accountId}`)
const account = await accountFetch.json()
console.log(account.provider) // twitch / youtube / trovo / etc
}) |
Ok but I feel like sending an HTTP request to fetch an information that already is present in memory is a bad idea and this would introduce potential errors and latency for no reason. |
Other than that, only on |
Yes but I am implementing a solution for multi streaming so I need to know the source/provider for every event being |
Unfortunately, there is no way. The only place you will have that information is either from |
Well the provider won’t change so we can assume having this info once in |
That's an excellent question that we will never know the answer. I also wouldn't expect that will be changed soon, given how hard is to reach SE devs or have good suggestions rolled out. |
Fingers crossed 🤞 |
Hello
I would like to access the provider name (twitch, youtube, …) and found out that this information is stored in the AngularJS code of the parent frame but don’t seem to be exposed to the custom code one. Or maybe it is somehow? Only the provider ID seems to be available but I sadly can’t do much with it.
Thanks 😊
The text was updated successfully, but these errors were encountered: