Straw phase M-1: tap-thumbnail-to-play + hi-res thumbs + Picture-in-Picture
Cobb's real-use feedback: "playing a video is a button under a very pixelated thumbnail, no playing in window mode, ... where are all the features." This is the visible-UX pass. Thumbnails: - New util/Thumbnails.kt#bestThumbnail picks the highest-res image from NewPipeExtractor's List<Image> by w*h pixel area. Was firstOrNull() which is the smallest in the sorted list. Applied across Search, Channel video rows, Channel avatar + banner, VideoDetail. Tap-to-play: - VideoDetail thumbnail is now wrapped in a clickable Box that fires onPlay(). Centered semi-transparent black circle with a white play triangle overlay so the affordance is obvious. The standalone "Play" button below stays for accessibility (tap target consistency). Picture-in-Picture: - Manifest: android:supportsPictureInPicture="true" on StrawActivity + added screenLayout|smallestScreenSize|screenSize to configChanges so rotation into PiP doesn't recreate. - PlayerScreen: top-right floating button enters PiP with 16:9 aspect. - Lifecycle ON_STOP observer now checks isInPictureInPictureMode and skips pausing when we're in PiP (was killing playback on PiP entry). Phase M-2 next: MediaSession + background audio + foreground service (the "play with screen off / lock screen controls" feature).
This commit is contained in:
parent
2fd439cac8
commit
1578de5dbb
7 changed files with 108 additions and 13 deletions
|
|
@ -16,7 +16,8 @@
|
|||
android:name=".StrawActivity"
|
||||
android:exported="true"
|
||||
android:launchMode="singleTask"
|
||||
android:configChanges="orientation|screenSize|keyboardHidden">
|
||||
android:supportsPictureInPicture="true"
|
||||
android:configChanges="orientation|screenSize|smallestScreenSize|screenLayout|keyboardHidden">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue