Closed WhoMI7 closed 2 years ago
The popup is actually a helper window for activating SMTC (Windows requires a visible window to activate it, so a hidden or zero-sized window won't work). I'm finding a way to hide it out of screen, but haven't got a stable approach to achieve that.
Sorry if it sounds too obvious but can't we somehow use the mpv window to activate SMTC instead of using a helper window? or maybe hide the mpv window and instead stream its contents, input output and all to the helper window so it looks like we are using mpv not the helper window. Sorry it sounds unreasonable.
@NaiveInvestigator Well, Windows seems to limit this a lot (the window must be created by the same process, and it must be visible, i.e. no 0x0 or hidden). But after a little looking into the docs, it seems there are some other methods to create SMTC without the need of a window, so I'm trying that to solve the issue.
THAT IS DOPE! Hope that works too. Btw i think we should also add a way to autostart the executable automatically so it will be easier for ppl to use it. I put up a pull request for as a suggestion on too, please do check it out.
It is in no way complete but I think it does the work admirably.
Edit: looking forward to the update!!
Edit -2 : I forgot to mention u but the script doesn't seem to work when i use mpv to stream youtube. Not that is a big issue but it gives an error Lua error: [string "D:/Program Files (x86)/mpv/portable_config/sc..."]:110: attempt to perform arithmetic on global 'dir' (a string value)
. Just thought to let u know about that.
The legacy window-creating method has been changed to using MediaPlayer API, so the windows won't appear. A new release 0.0.3 has been created.
@NaiveInvestigator For the issue you mentioned when streaming video, this tool used the local file path to guess media type. Replacing it by using information from mpv should fix this (and get better media type guess results), I opened another issue (#4) for tracking this problem.
Annoying popups.