Skip to content
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

added support for watching streams #3222

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

fourtf
Copy link
Member

@fourtf fourtf commented Sep 4, 2021

Pull request checklist:

  • CHANGELOG.md was updated, if applicable

Description

Allows watching streams from Chatterino. Only works on windows since it uses webview2.
image
image

Testing it

  1. Be on Windows.
  2. Install webview2 or MS Edge Beta
  3. Download StreamView. You can use the prebuilt one from here: fourtf.com/StreamView-0.zip
  4. Put it into the Chatterino folder so the StreamView folder is on the same level as chatterino.exe.
    image
  5. Run Chatterino or StreamView/StreamView.exe

@fourtf fourtf changed the title added support for running StreamView for a split added support for watching streams Sep 4, 2021
@sebm253
Copy link

sebm253 commented Sep 4, 2021

the chat embedding section just goes gray after a while of watching (max 30 seconds), without chatterino crashing or basically doing anything at all. I have no idea how to debug this, so debugging steps would be appreciated

@fourtf
Copy link
Member Author

fourtf commented Sep 4, 2021

the chat embedding section just goes gray after a while of watching (max 30 seconds), without chatterino crashing or basically doing anything at all. I have no idea how to debug this, so debugging steps would be appreciated

There is a mechanism to close the chatterino embed after 30s if it doesn't have a parent window, so that may be going wrong. That should be the issue if it's precisely 30s every time. Which version of windows are you using, and are you using any special settings?

@Void48
Copy link

Void48 commented Sep 4, 2021

the chat embedding section just goes gray after a while of watching (max 30 seconds), without chatterino crashing or basically doing anything at all. I have no idea how to debug this, so debugging steps would be appreciated

Same for me LULE
I'm using Windows 11 btw. apu

@sebm253
Copy link

sebm253 commented Sep 4, 2021

the chat embedding section just goes gray after a while of watching (max 30 seconds), without chatterino crashing or basically doing anything at all. I have no idea how to debug this, so debugging steps would be appreciated

There is a mechanism to close the chatterino embed after 30s if it doesn't have a parent window, so that may be going wrong. That should be the issue if it's precisely 30s every time. Which version of windows are you using, and are you using any special settings?

it seems to be around 30 seconds, yeah. I use Windows 10 19043.1202, and no, I don't have any special settings - though I don't really know what kind of settings you may be referring to, but I still don't think so

@fourtf
Copy link
Member Author

fourtf commented Sep 4, 2021

the chat embedding section just goes gray after a while of watching (max 30 seconds), without chatterino crashing or basically doing anything at all. I have no idea how to debug this, so debugging steps would be appreciated

There is a mechanism to close the chatterino embed after 30s if it doesn't have a parent window, so that may be going wrong. That should be the issue if it's precisely 30s every time. Which version of windows are you using, and are you using any special settings?

it seems to be around 30 seconds, yeah. I use Windows 10 19043.1202, and no, I don't have any special settings

Actually that's my fault, I was using the stable Chatterino when testing it. I'll fix it asap.

@Void48
Copy link

Void48 commented Sep 4, 2021

I also noticed that when I open the player my Chatterino gets really big/small and blurry Screenshot 2021-09-04 200425
smallchatterino

edit: ok I noticed it changed the zoom level in settings for some reason
1440p screen btw. apu

@sebm253
Copy link

sebm253 commented Sep 4, 2021

I also noticed that when I open the player my Chatterino gets really big/small and blurry Screenshot 2021-09-04 200425
smallchatterino

edit: ok I noticed it changed the zoom level in settings for some reason
1440p screen btw. apu

locate the StreamView executable -> right click, Properties -> Compatibility -> Change high DPI settings -> check both boxes (Use this setting..., Override high DPI...)

@Void48
Copy link

Void48 commented Sep 4, 2021

I also noticed that when I open the player my Chatterino gets really big/small and blurry Screenshot 2021-09-04 200425
smallchatterino
edit: ok I noticed it changed the zoom level in settings for some reason
1440p screen btw. apu

locate the StreamView executable -> right click, Properties -> Compatibility -> Change high DPI settings -> check both boxes (Use this setting..., Override high DPI...)

Just did that and Chatterino still gets big/small (blurry) and the Chatterino StreamView is blurry too

@fourtf
Copy link
Member Author

fourtf commented Sep 4, 2021

I also noticed that when I open the player my Chatterino gets really big/small and blurry Screenshot 2021-09-04 200425
smallchatterino
edit: ok I noticed it changed the zoom level in settings for some reason
1440p screen btw. apu

locate the StreamView executable -> right click, Properties -> Compatibility -> Change high DPI settings -> check both boxes (Use this setting..., Override high DPI...)

Workarounds like this have no business here since they don't help getting the feature out at all.

@fourtf
Copy link
Member Author

fourtf commented Sep 4, 2021

I also noticed that when I open the player my Chatterino gets really big/small and blurry Screenshot 2021-09-04 200425
smallchatterino

edit: ok I noticed it changed the zoom level in settings for some reason
1440p screen btw. apu

I can reproduce this on all the builds from the CI. It didn't happen to me while developing it but I think I know how to fix it.

@ALazyMeme
Copy link
Collaborator

Not sure if it's possible to hide the "Expand Chat" button. I assume not:

image

cds.lpData = json.data();

::SendMessage((HWND)handle, WM_COPYDATA,
reinterpret_cast<WPARAM>(handle),
Copy link
Contributor

@TETYYS TETYYS Sep 4, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This (wParam) should be handle of the window that is passing the data, as per winapi docs

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch

@ALazyMeme
Copy link
Collaborator

In addition to the above, when running the StreamView exe directly, it appears to bug out when you switch channels. Then when I try to type in those bugged channels, the chatbox appear to just move down a little more. As shown in the screenshot, it seems this is now permanently bugged after testing the first time:

lamo.mp4

@fourtf
Copy link
Member Author

fourtf commented Sep 5, 2021

Not sure if it's possible to hide the "Expand Chat" button. I assume not:

image

I feel like the user would still want the normal chat so he can do stuff like sending the sub renew message. Also messing with the website is just a giant headache that's not worth getting into.

@goldbattle goldbattle mentioned this pull request Sep 12, 2021
1 task
@goldbattle
Copy link
Contributor

I tried linking to the webview/webview directly.
Which worked on windows, but on linux I ran into issues with GTK conflicting with the QT signal .
After fixing this I ran into issues with player being not supported by the twitch player (same one as below).
https://github.com/goldbattle/chatterino2/tree/test-webview-webview

I also experimented with the QT webenginewidgets / qtwebengine, but this has issues both on windows and other platforms.
It does make compiling easier, but I don't think video decoding is supported unless you build it from scratch with the correct encoders (I didn't look into this as I already was very deep down the rabit hole).
https://github.com/goldbattle/chatterino2/tree/test-webview-linking
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants