Hi Guys,
We work on HLS+Fairplay, and found isCaptured can not be observerd in playback Fairplay content.
Nevertheless, if play clear content, it can work.
Could anyone have idea to workaround this issue?
We know even it can be recorded but just black screen, but we focus on better ux, want to show dialog
to remind user can not record video content
Code snippet :
[[UIScreen mainScreen] addObserver:self forKeyPath:@"captured" options:NSKeyValueObservingOptionNew context:nil];
- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context {
// observe well when play clear content, but failed in HLS+FairPlay (Please note video should be playback, it can work before ckc verified)
if ([keyPath isEqualToString:@"captured"]) {
BOOL isCaptured = [change[NSKeyValueChangeNewKey] boolValue];
//blablabla
}
}
Another notification still can not get event in fairplay mode
[[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(screenDidChangeNotification:) name:UIScreenCapturedDidChangeNotification object:nil];