Cannot see Share menu QR codes #4

Open opened by ternarykitten.bsky.social

When I try to Share a video and it pops up a QR code, it's not visible on screen. I think the problem is that TizenTube triggers YouTube's built-in QR code renderer with style QR_CODE_RENDERER_STYLE_ATA_SIDESHEET, and attempts to nest a ytlr-thumbnail-details with height: 100% in a div with height 14 rem. When I paste TizenTube into a userscript on desktop and change my user agent to a TV, the inner ytlr-thumbnail-details (with background image) has window.getComputedStyle($0, null).height equal to the parent div's computed height. When I write JS code to log this on the Switch, the ytlr-thumbnail-details has computed height 100%, which I think means the engine is failing to calculate the element's height.

This is an incompatibility between Google's served markup, TizenTube invoking an otherwise-unused(?) CSS style, and the Switch app's outdated renderer. I don't see an easy fix (perhaps TizenTube could add a workaround?), but I want to report it here anyway.

EDIT: The Help menu also has a QR code with height: 100% inside a height: rem div, but renders properly (despite the computed height being 100%). I do not know why this happens. I need to check clientHeight too.

I've pushed my debugging code to https://github.com/nyanpasu64/TizenTube/tree/fix-qr-share. I used CSS background colors to debug element visibility, as well as an on-screen console to log properties.

The problem is the QR code overwrites the background and makes the element look zero-sized. The clientHeight/Width are correct.

When I replace the QR code with a magenta PNG's data URI it renders. The same image saved as a GIF fails to load. I think the problem is a video share QR code is encoded as GIF, which Cobalt doesn't support. (The login and settings page QR codes have rounded dots and a YouTube logo in the center, and are encoded as PNG which is supported.)

         // Is the QR code invalid? Replace with purple image.
-        imag.style.backgroundImage = 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAIAAAD91JpzAAAABGdBTUEAALGPC/xhBQAAABBJREFUCFtj+M/wH4hAEIgAN9YH+erNEqEAAAAASUVORK5CYII=")';
+        imag.style.backgroundImage = 'url("data:image/gif;base64,R0lGODdhAgACAIABAP8A/////ywAAAAAAgACAAACAoRRADs=")';
Sign up or Sign in to add to the discussion.