Conversation
…ntation, and sample Co-authored-by: haavamoa <2527084+haavamoa@users.noreply.github.com>
|
@copilot I notice you did not implement ios. Use this guide to do it: https://dev.to/sylar/ios-picture-in-picture-pip-implementation-guide-3b56 |
…ferDisplayLayer Co-authored-by: haavamoa <2527084+haavamoa@users.noreply.github.com>
Implemented iOS PiP in commit
Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
| using Foundation; | ||
| using UIKit; | ||
|
|
||
| namespace DIPS.Mobile.UI.API.PictureInPicture; |
There was a problem hiding this comment.
@copilot we wont actually use it for audio purposes, but to simply display a custom view. Remove all overhead with AVCaptureSession
There was a problem hiding this comment.
Done in 375652c. Removed SetupAudioSession(), the AVAudioSession call in Enter(), the DIPS.Mobile.UI.Internal.Logging import, and the UIBackgroundModes: audio entry from Info.plist. The iOS PiP implementation now only uses AVPictureInPictureController + AVSampleBufferDisplayLayer to display a snapshot of the current window.
…needed Co-authored-by: haavamoa <2527084+haavamoa@users.noreply.github.com>
Exploration/draft of PiP mode support, allowing the app to float in a small window so users can continue work (notes, forms) while browsing other parts of the journal.
Description of Change
Library —
DIPS.Mobile.UI.API.PictureInPicture.PipServiceIsSupported— device/platform capability checkEnter()— enters PiP with default 9:16 portrait ratioEnter(int ratioWidth, int ratioHeight)— configurable aspect ratioPipModeChangedevent — subscribe to enter/exit transitionsNotifyPipModeChanged(bool)— call from host app'sMainActivity.OnPictureInPictureModeChanged(Android)Android: Uses
PictureInPictureParams.Builder; seamless resize enabled on API 31+.iOS (15+): Uses
AVPictureInPictureControllerwithAVSampleBufferDisplayLayer. OnEnter(), captures a snapshot of the current window and displays it in the PiP overlay. No audio session setup is required — this is a display-only implementation.Host app wiring required (Android)
Sample app
Added
PictureInPictureSamplesto the Components app demonstrating a notes field entering PiP mode with live status feedback. Registered inREGISTER_YOUR_SAMPLES_HERE.Todos
View original Slack conversation
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.