signalapp / Signal-iOS

A private messenger for iOS.
https://signal.org
GNU Affero General Public License v3.0
10.77k stars 3.02k forks source link

Screen record for view one time media #5879

Open darkCavalier11 opened 6 days ago

darkCavalier11 commented 6 days ago

First time contributor checklist

Contributor checklist

https://github.com/user-attachments/assets/a09a9678-ef36-48fb-bdeb-b97cdbb446b9

PS: I needed help for these two blockers. If anybody can comment anything that'd be great.

Description

Fixing #5843 When view loaded now the check is done if the screen is being recorded. If thats the case a restrictScreenCapturePlaceholderView shown on top of once media to block user from seeing the content. A notification observation when UI screen capture value change setup is done to perform the same thing. Before, if the view once content is a video it automatically played when user opens the media and video still plays when user dismisses the once media view. Fixed that here by playing the video based on the UI screen capture status of the app and stop the video player when view dismissed.