Skip to content

feat: Picture-in-Picture mode for touch devices#283

Merged
ProdigyV21 merged 1 commit into
ProdigyV21:mainfrom
chillpill244:pip_mode
May 31, 2026
Merged

feat: Picture-in-Picture mode for touch devices#283
ProdigyV21 merged 1 commit into
ProdigyV21:mainfrom
chillpill244:pip_mode

Conversation

@chillpill244
Copy link
Copy Markdown
Contributor

@chillpill244 chillpill244 commented May 30, 2026

Summary

  • PiP button added to the player controls row (touch devices only, Android 8+), positioned right after the aspect ratio button
  • Three overlay action buttons (Replay 10s, Play/Pause, Forward 10s) rendered from the app's existing Material icon pack via CanvasDrawScope → Bitmap — no new XML drawables
  • Icons scale proportionally to the PiP window size (estimated at 35% of screen width × 16:9), floored at 48dp
  • BroadcastReceiver handles the three overlay actions tied to ExoPlayer's lifetime, registered as RECEIVER_NOT_EXPORTED
  • Play/pause icon stays in sync with playback state via LaunchedEffect
  • Subtitle text scaled to 40% when in PiP mode to stay readable in the small window
  • ON_PAUSE lifecycle guard skips pausing ExoPlayer when entering PiP so video keeps playing
  • Controls overlay hidden while in PiP mode
  • All PiP logic gated on isTouchDevice() — TV devices are completely unaffected

Test plan

  • Open any movie/show on a phone or tablet and tap the PiP button in the controls row
  • Verify video continues playing in the PiP window
  • Tap rewind / play-pause / forward in the PiP overlay and confirm ExoPlayer responds
  • Tap the system expand button and confirm full-screen player is restored
  • Verify subtitles appear smaller inside the PiP window
  • Open on an Android TV device and confirm PiP button is absent and no PiP behaviour is triggered

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@ProdigyV21 ProdigyV21 merged commit a19f8e2 into ProdigyV21:main May 31, 2026
1 check passed
chillpill244 added a commit to chillpill244/ARVIO that referenced this pull request Jun 1, 2026
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

2 participants