cobalt: Add dual Picture-in-Picture demo#11526
Conversation
🤖 Gemini Suggested Commit Message💡 Pro Tips for a Better Commit Message:
|
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces a dual Picture-in-Picture (PiP) demo for Cobalt, consisting of an HTML file and a JavaScript file that manage side-by-side and PiP/fullscreen video transitions. The review feedback is highly constructive and focuses on improving robustness and compatibility for TV environments. Key recommendations include restricting the keydown event listener to specific keys (like 'Enter' or 'Space') to prevent breaking device navigation, merging duplicate CSS declarations for .video-container, refactoring the async Promise executor anti-pattern in bootstrapVideo, and adding safety checks for network responses and the availability of the Picture-in-Picture API.
187f19e to
7706fcb
Compare
There was a problem hiding this comment.
Code Review
This pull request introduces a dual Picture-in-Picture (PiP) demo for Cobalt, featuring an HTML layout and a JavaScript controller that manages a texture-mode video and an overlay-mode video. The review feedback highlights a few key issues in the JavaScript implementation: an error-handling bug where a failed PiP request still triggers a fullscreen transition, an inline style override on the second video that prevents it from correctly sizing to 100% in fullscreen, and an unused currentStage variable that should be removed.
7706fcb to
49a9e48
Compare
| } | ||
|
|
||
| // Use local file for PiP texture to ensure EGL stability, and Sintel for the overlay! | ||
| const url1 = 'vp9-720p.webm'; |
There was a problem hiding this comment.
Consider to replace with another video that is more vivid. This one has a static white screen, making PiP window less vivid.
49a9e48 to
a232f1a
Compare
Add a demonstration of simultaneous video playback using both texture-
and overlay-based decoders. This demo showcases Cobalt's ability to
manage multiple media streams and transitions between side-by-side
layouts and native Picture-in-Picture modes.
The application provides a reference for handling mixed rendering paths
and ensuring compositor stability during layout changes. This helps
validate multi-video support and rendering behavior when switching
between display modes.
Issue: 445194225