Hi,
I'm creating a subscriber alert for Twitch (a streaming platform for gamers). Basically, I have the animation all playing, and if anyone has ever used Open Broadcaster Software (OBS), I have the animation added to it using CLR Browser.
It sets text inside my textbox to the username of the subscriber, and plays the animation.. But the problem is the sound I have. When the animation triggers for the first time, the sound plays, but any time after that the audio will not play. To get it to play, I have to stop the preview stream and start it again in OBS each time the animation plays (which is not really possible while streaming to Twitch). I'd rather not have the partnered streamer have to untick the source every time someone subscribes.
I've tested the animation in Chrome (by opening the HTML file), and the sound plays every time, so it's just CLR Browser that doesn't. But every other follow/subscriber alert made for OBS (such as TwitchAlerts) work properly, so it leads me to believe it's something in my project, rather than the OBS plugin. Just in case anyone has experience in the CLR Browser or OBS, I will be able to provide the log. I can't find how to attach the log file, and I don't want to make this message super long for a log if it isn't needed.
I'll also include the part of my JS script that actually triggers the animation when someone subscribes (obviously because I'm not partnered myself, I can't test when someone subscribes, so I have it checking for a specific message of "1234" at the moment.)
var message = event.data.substring(event.data.indexOf('#madmikegamerxl1 :') + 18, event.data.indexOf('\r')); var username = event.data.substring(1, event.data.indexOf("!")); if (message.toString() == "1234") { console.log("Someone just subscribed!"); AdobeEdge.getComposition("subAnim").getStage().play("subalert"); AdobeEdge.getComposition("subAnim").getStage().$("subalert")[0].play(); AdobeEdge.getComposition("subAnim").getStage().play("Stage"); AdobeEdge.getComposition("subAnim").getStage().play(); AdobeEdge.getComposition("subAnim").getStage().$("Text2").html(username); } console.log("Message received in chat 'madmikegamerxl1' : \r\n" + message);
Thanks in advance,
Mike