-
-
Notifications
You must be signed in to change notification settings - Fork 52
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
Fix shorts #235
Fix shorts #235
Conversation
Whoops. Had a brain fart when refactoring the screensaver fix. |
Thanks for working on this problem! |
@cremor can you take a picture? |
How did you take this picture? It looks more like the video is in the correct spot but the entire UI is offset |
It's just a photo I took with my phone. The short video was paused there, but that doesn't make a difference. |
You are right. The white border isn't in the center of the screen. The video itself seems to be in the center. |
Do you know how to use the web inspector tool? Can you check the computed styles of the top-most element that's offset incorrectly? |
No, but I think I could figure it out with a few hints. What software would I use to do that? I've only used WebOS Device Manager to install the app on the TV. |
You need node.js 22 LTS installed. Then download a copy of this repository and open the folder in terminal. Then run:
|
It was a bit more complicated than that 😅 I had to install the WebOS CLI tools and setup the device connection for my TV with it. Only then I could use the But even then, how do I continue? I opened the shown "Application Debugging" URL in a browser and it showed YouTube under "Inspectable WebContents". But after clicking it I only get an empty page and the browser dev tools only show an empty body tag. |
Do you have the app launched on ur TV? If you don't, it's not going to work well. |
Yes, the app was running. I even had a short opened (in paused state). |
It might be because you're using the CLI tools provided by LG. Try uninstalling it and use the CLI tools that are included by this project. Your terminal must be opened to the project directory and you need to prefix |
Same result. Seems like this is a deprecated function which is not supported in modern browsers any more: https://webostv.developer.lge.com/faq/2020-05-20-debugging-web-inspector-not-working-chrome-v80 |
You can always try a portable version. https://google-chrome-portable.en.uptodown.com/windows/download/2171677 |
That "portable installer" doesn't work. It seems like that portable Chrome version isn't available any more (the error message contains a 404). |
Ok, I found a working version at https://portapps.io/app/ungoogled-chromium-portable/#download This seems to be the top element of the border around the short video: And here are its computed styles: The computed styles of the video element might also be interesting: |
Can you take a pic of your TV just like last time again but with the edges of your TV clearly visible? |
Your Can you show me the computed styles for the |
Show me the computed styles for the |
Your computed styles match up exactly with mines so the offset theoretically shouldn't be possible. Lemme know when you get back and feel like jumping on this problem again. I appreciate your help. Happy holidays. |
I tested this on a LG C1 (using webOS 6.4.0) and now shorts are working fine, with the previous version (v0.3.5-rc1) shorts looked bad, the video was out of frame and stretched horizontally. |
Nothing happens when I do this. |
I built my IPK from this PR on both [v0.3.5] and [v0.3.4] and shorts worked perfectly in my case on both versions. Thanks for this. I am using LG C2 42 inch (OLED42C2PSA). By the way, would you know if its safe to update my TV to the latest version of WebOS if I want to retain this app? A new update just dropped and its a major one and big (1440 MB). It will be from 13.30.85 upgrading to 23.20.56. |
OLED55C6V Edit: typo |
@cremor does |
If this additional border is indeed the fix I suggest to do it with black. That way it is nearly invisible. |
To be honest, it makes absolutely no sense how adding a border would correct the position of the video player. So I might just do the dirty border hack just for shorts to save my sanity. |
Can you try: document.head.appendChild((function(){var x=document.createElement("style");x.innerHTML="* > video { transform: translateZ(0); }";return x;})()) |
Yeah, I don't understand it either. First I thought it's just the process of adding a style and that that somehow triggers a re-layout of the page. But the fact that applying the style with a
That doesn't seem to do anything. |
Try |
Also does nothing. |
|
Again nothing. |
Try: document.head.appendChild((function(){var x=document.createElement("style");x.innerHTML=".WEB_PAGE_TYPE_SHORTS #html5-video-container { border-bottom: black 1px solid; border-image: url('data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7') 30%;}})()) |
There is a syntax error with this. I assume you meant the following? But that also doesn't have any visible effect. document.head.appendChild((function(){var x=document.createElement("style");x.innerHTML=".WEB_PAGE_TYPE_SHORTS #html5-video-container { border-bottom: black 1px solid; border-image: url('data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7') 30%;}";return x;})()) |
Yes I did. Replace the |
Still no visible effect. |
Try with |
Like that? Still has no visible effect. document.head.appendChild((function(){var x=document.createElement("style");x.innerHTML=".WEB_PAGE_TYPE_SHORTS video { border-bottom: black 1px solid; border-image: url('data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7') 30%;}";return x;})()) But the following works (moves the video): document.head.appendChild((function(){var x=document.createElement("style");x.innerHTML=".WEB_PAGE_TYPE_SHORTS video { border: black 1px solid; border-image: url('data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7') 30%;}";return x;})()) I tested all 4 individual border sides, none work. Only the full border works. |
This makes absolutely no sense 😭. Thanks for testing. |
@cremor One final thing. Try: document.head.appendChild((function(){var x=document.createElement("style");x.innerHTML=".WEB_PAGE_TYPE_SHORTS video { display: block;}";return x;})()) |
No effect. |
Pushed the fix. Can you re-build on this branch again and see if it works? |
Doesn't work because you added |
Ahh fuck. I swear I used |
Try now. |
I can't see it directly because of the force-push, but you only changed So in my opinion this can now be merged. |
This PR is built on top of #234. That should be dealt with before this one.#234 is merged.Re-based onto main.Fixes #210, fixes #211, fixes #219
Changes
Allow using TypeScript in app code by adding TypeScript support to babel.Cherry-picked into Misc dev changes #238.