bazukas / obs-linuxbrowser

OBS Linux Browser Plugin
GNU General Public License v2.0
503 stars 47 forks source link

Javascript freezes when soundmanager2 is used to play sounds w/o mp3 support or flash player #16

Closed kitlith closed 7 years ago

kitlith commented 7 years ago

I'm not sure that this is actually obs-linuxbrowser's fault, but nonetheless...

A friend of mine is attempting to setup a bitcup for their stream, having become a Twitch affiliate. They are using the bitcup available from https://muxy.io to accomplish this. However, every time they recieve bits it freezes part-way through, forcing a refresh on our part and leaving the cup empty.

It needs to be noted that their OBS setup isn't quite a standard one. Due to requiring the use of NVENC, they had to recompile ffmpeg, and then recompiled OBS to use the new ffmpeg. As a result of OBS being self-compiled, probably from a non-release commit, obs-linuxbrowser had to be compiled. (An issue was already encountered because of this, turns out that self compiled versions of OBS install header files into /usr/local/include/obs instead of /usr/local/include.) Thankfully, we were able to use the precompiled CEF release.

OS is Ubuntu 16.10. Logs have not been collected yet, but it shouldn't be too difficult to arrange for that. Same with the git commit that was compiled.

Is there something smelly about the configuration?

bazukas commented 7 years ago

Hey there, thanks for reporting this issue. Seems like an error on their side (audio requires mp3), much like with streamlabs. I'll try to get in touch with them to solve this issue.

Meanwhile, there is a workaround. You can either mute audio in their widget or enable flash in the plugin and it should work fine.

Also you mentioned that you needed to compile obs-linuxbrowser yourself, was there any specific reason for that? Errors while using precompiled version?

kitlith commented 7 years ago

Ah, it freezes when it tries to play audio, but can't? Huh, good to know. Is this a common issue, or an issue caused by some widgets with 'interesting' javascript? Either way, thanks. I'll get them to mute it (or install flash) before their next stream.

The reason was that when using the precompiled release of obs-linuxbrowser, our selfcompiled obs crashed (segfault? don't exactly remember). Probably because it wasn't the same commit as the precompiled version of obs you compiled against.

bazukas commented 7 years ago

Yes, you're correct, I've encountered this issue on both streamlabs and muxy and they both use soundmanager2 js plugin for audio playback. Without being able to see source code, my best guess is that soundmanager2 fails to initialize because it can't detect neither mp3 or flash support. Unfortunately, developers don't seem very eager to help me solve this issue.

I see, I would like to solve that issue, cause that shouldn't be happening if libobs major version is the same, I'll try to reproduce this error.

kitlith commented 7 years ago

Have you tried talking to the developers of SoundManager2 directly about what might be causing this? Unlike muxy and streamlabs, it appears to be open source, hosted on github: https://github.com/scottschiller/SoundManager2 Or were those developers the ones you were talking about? Is it definately an issue with how streamlabs and muxy are using the API?

Regardless, it might be good to generalize the statement about streamlabs, and include something about things freezing when sounds are supposed to be played. Could help in the future so that people like me know where the real issue lies.

Renaming the issue to reflect what's going on.

bazukas commented 7 years ago

I'll need to do some tests to see if that plugin could be used at all with linuxbrowser, then I'll contact its developers if needs to be.

I'll update README too, thank you for suggestion.

kitlith commented 7 years ago

going to leave a note here, since I already mentioned it: just reinstalled obs again, and header files got placed in /usr/include/obs -- maybe this is just the thing with newer versions now?

bazukas commented 7 years ago

What do you mean? The plugin build script looks for obs headers in that directory by default.

kitlith commented 7 years ago

... just ignore me then, not a clean build environment.

bazukas commented 7 years ago

Starting with the latest release, I'm providing browser source with mp3 support enabled. I also updated README regarding streamlabs/muxy.io not working with mp3/flash support.

Closing this issue now, if users want those services to work without mp3 support, they'll need to contact those directly in order to show a demand for it.