How to restrict or close the video played in default player of webview for ios when user starts screen recording?
What I have done is!!! In order to achieve data hiding when screen recording is ON,
- Notification center is used to notify the changes for screen recording.
- I have used if else condition to check if the screen recording is ON or OFF.
- Based on above checks i am hiding the window as
window.ishidden = true/false
- With the above condition i am able to restrict user from recording the data present on screen.
Failure case:
- The app is totally on webview.
- When user clicks on a course it shows the list of videos. When clicked on any of the video it plays with the iOS default player on a full screen.
- When the user starts on screen recording the
window.isHidden = true
and user will not be able to see anything on screen. - Like wise when the user taps on a video in webview and it starts playing in a full screen and user taps on screen recording the
window.isHidden = true
but the video still Plays. By showing the window hidden property to true. - When I close the player then as the window.ishiddenproperty is TRUE the screen becomes blank with no content visible.
Please do help me with this as i am using webview which loads up the data and player might be on top of window element.