QuickMark forensic watermarking
The NexGuard library forensic watermarking tool embeds a unique, invisible serial number onto video/audio content.
You can configure a visible watermark for integration purposes.
Prerequisites
A Watermarking server to generate the watermarked surface. Associated with this:
Tenant Id - you may use TEST_TENANT during integration
- Service endpoint URL
- Secret key
- API to authenticate with the service endpoint if required (optional)
A system to generate 24-bit Watermark IDs (contained within the token) to identify the user, session and/or device.
Initialisation
The NMPWatermark class needs to be instantiated and configured by calling initWithUrl:withToken:withTenant:withSecret:
providing the configuration parameters in one go.
Alternatively, you can achieve piecemeal configuration by calling initWithSecret:
followed by setUrl:,
setToken:
and setTenant:.
setApiKey:
also exists if required.
Binding the player and view
The UIView and AVPlayerLayer need to be bound together to allow the presentation of the watermark. Call bind:withAVPlayerLayer:
passing references to your UIView and AVPlayerLayer.
@interface PlayerView()
@property (nonatomic) NMPWatermark* watermark;
@end
- (void)setPlayer:(AVPlayer *)player {
[(AVPlayerLayer *)[self layer] setPlayer:player];
if (player) {
_watermark = [[NMPWatermark alloc] initWithSecret: AUTH_SECRET];
[_watermark setToken: AUTH_TOKEN];
[_watermark setTenant: AUTH_TENANT];
[_watermark setApiKey: AUTH_APIKEY];
[_watermark setUrl: AUTH_SERVICE_URL];
[_watermark bind: self withAVPlayerLayer:self.layer];
} else {
[_watermark unbind];
}
}
Feedback loop
You should create an NMPWatermarkDelegate
to handle messages and error events from the watermarking system
The callbacks to implement for this delegate are:
onWatermarkError:withMessage:
onWatermarkMessage:
Make sure the delegate for the NMPWatermark
instance is set; for example:
_watermark.delegate = self;