Skip to main content
Skip table of contents

QuickMark forensic watermarking

The  Nexguard library forensic watermarking tool QuickMark, embeds a unique, invisible serial number onto video/audio content. The QuickmarkInterface class abstracts the NexGuard-QuickMark library functionality that provides watermarking technology to the SDK.

Example code

The otvplayer instantiates and operates the QuickMark service. The calling application provides the compulsory and optional configuration elements via the player options before otvplayer setup.

Enabling QuickMark

The QuickMark watermarking feature is enabled by the inclusion of the QuickMark configuration in the OTVToolkit configuration. The configuration options are provided by the application.

JS
// note: QuickMarkMessage and QuickMarkError are callback functions

let playerInstance = otvplayer(
    plugins: {
        otvtoolkit: {
            QuickMark: {
            QuickMarkConfig: {
                token: "400000000",
                tenant: "TEST_TENANT",
                apikey: "<Contact NAGRA for your key>",
                service: "<Contact NAGRA for your URL>",
                secret: "<Contact NAGRA for your secret>"
                },
                message: QuickMarkMessage,
                error: QuickMarkError
            }
        }
    }
});

The QuickMark API is accessed via the player instance, for example player.otvtoolkit().QuickMarkInterface.

JS
const QuickMark = player.otvtoolkit().QuickMarkInterface;
QuickMark.setURL("https:\\www.your_url.com\");
console.log("The QuickMark version is: " + QuickMark.getVersion());

Prior to otvplayer setup, only the secret parameter is mandatory (there is no API to set the secret). QuickMark however requires the token, service, and secret to start. On successful loading of the QuickMark service, QuickMark sends the message  jswbw <version> initialised.

Disabling QuickMark

Remove QuickMark configuration in the OTVToolkit configuration and reinitialise the otvplayer object.

Starting and stopping the service

  • start( )
    This method starts retrieval of the QuickMark Surface.
  • stop( )
    This method stops retrieval of the QuickMark Surface.

Other methods

An API is provided to set or change all the other elements post-setup, and also to get the QuickMark version.

  • getVersion() {returns string}
    This method gets the version of the QuickMark library.
    Return: the version string.
  • setApiKey(apiKey)
    This method sets the optional API key of the QuickMark surface server.
    Parameter: apiKey - the QuickMark service API Key.
  • setTenant(tenant)
    This method sets the optional tenant in the service URL.
    Parameter: tenant - the tenant string.
  • setToken(token)
    This method sets the token embedded in the QuickMark surface.
    Parameter: token - the token string
  • setURL(URL)
    This method sets the service URL of the QuickMark server.
    Parameter: URL - a string representing the URL of the QuickMark server

Callbacks

To subscribe to information messages, two callback functions must be defined and set up either at player initialisation time via the configuration options, or by the QuickmarkInterface API methods. The callback prototypes are:

  • message(message):
    A string that contains message information.
  • error(id, message):
    id is the error identifier, message is the error string.

To set them via the API:

  • setMessageCallback(messageCallback)
    This method sets the callback to receive QuickMark messages.
    Parameter: messageCallback - the message function callback
  • setErrorCallback(errorCallback)
    This method sets the callback to receive QuickMark errors.
    Parameter: errorCallback - the error function callback

Error messages

QuickMark may report the following errors:

Error numberDescription
0No error
1Token not valid
2URL or Tenant not valid
3Server request failed
4Invalid server answer
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.