Closed bronzegoddess closed 1 year ago
I pushed an update. Not entirely sure it fixes the issue, but hopefully it does. Please let me know either way I suppose. Thank you.
Thank you. Appreciate it very much. Will test it out soon and let you know.
Also had an off topic question and wanted to pick your mind. My goal is to integrate the chat messages from Amazon, twitch, youtube and facebook with my stream using OBS websockets and my own overlays. In other words, I want to use your SocialStream to scrape messages, and then pipe them to my own websocket server to build around.
Questions
Thank you in advance for all the responses, and your amazing work on this.
I do have socket server support added, custom and hosted.
https://github.com/steveseguin/social_stream/blob/main/README.md#server-api-support https://socialstream.ninja/dock.html?server=socketserveraddress https://socialstream.ninja/sampleapi.html
The server support can be used currently as a remote API controller, or you can use it to publish selected featured-chat messages to a server, so highlighted will appear as JSON on your socket server.
If you want "all" messages published to the API server, I can add that option, but it hasn't been requested. I can add this support to the dock page or within the extension itself via the background, if you don't intend to have the dock page open.
If you want to add your own custom websocket logic, you can see the custom_sample.js file. You can send all messages , in whatever format, you want this way. https://github.com/steveseguin/social_stream/blob/main/custom_sample.js
To use it, rename the file to custom.js and add your Websocket logic there. custom.js won't sync back to the main repo, and won't be over-written in the future. This file requires the dock.html page to be open, as that is where it is loaded.
something like this would go in the custom.js page
var myServer= false;
function setupMySocket(){
myServer= new WebSocket("wss://xxxxxxx.com");
myServer.onclose = function (){
setTimeout(function(){
setupMySocket();
},500);
};
}
function applyCustomActions(data){
try {
myServer.send(JSON.stringify(data));
} catch(e){console.error(e)}
}
If you want a custom.js option available for the background page, I can do that too, so you don't need the dock open. It would be easy enough for me to support that.
If the goal is to support OBS websockets directly, I can do that too so others can access that feature; any details though on how you'd want it to work though would be helpful here.
As per followers, I can add a new data field, so data.streamEvents or something, and then add that those events to the amazon.js and twitch.js scripts. I can make their inclusion in the stream/dock output optional to others. I do see a lot of these action-events in the amazon.com/live streams -- it's not something I see with many other platforms normally though.
Cheers
It seems like with Amazon live the profile photos disappear after a few minutes or after a few chats. Refreshing the browser seems to fix the issue.
Would a workaround be to write some timeout to automatically refresh the page if amazon? If yes, where would be the best place for me to include this function?