Forensic Watermarking with Brightcove Player
Introduction
With Forensic Watermarking, you can protect your premium content from piracy and unauthorized content sharing. This feature adds an invisible watermark to your videos, allowing you to track any content leaks.
For more information, see the Overview: Forensic Watermarking document.
Requirements
The following requirements are needed to support this feature:
Setup
There are setup requirements in addition to configuring your player. For details, see the Overview: Forensic Watermarking document.
Configuring Brightcove Player
To configure a player to use Forensic Watermarking, follow these steps:
-
The player must be integrated with your registration system so that a Viewer ID is passed on the analytics web beacon (in the
user
field).To do this, use the
setUser()
method. For example:myPlayer.bcAnalytics.client.setUser('viewer id');
-
Before you get your video, set a string token with the value of your Nagra watermark token as part of the player catalog object.
myPlayer.catalog.setWatermarkingToken()
-
After setting the watermarking token, you are ready to request data from the Brightcove Playback API and load it into the player.
Here is an example of fetching a single video:
HTML
<div style="max-width: 960px;"> <video-js id="myPlayerID" data-embed="default" controls="" data-application-id="" class="vjs-fluid"> </video-js> </div> <script src="https://players.brightcove.net/your account id/your player id_default/index.min.js"></script>
JavaScript
<script> // +++ Add the player attributes +++ var myPlayer, myPlayerEl = document.getElementById("myPlayerID"); myPlayerEl.setAttribute('data-account', your account id); myPlayerEl.setAttribute('data-player', 'your player id'); // +++ Create the player +++ myPlayer = bc(myPlayerEl); // Set the viewer id for Brightcove analytics myPlayer.bcAnalytics.client.setUser('viewer id'); // Set the watermarking key myPlayer.catalog.setWatermarkingToken(your watermark token); myPlayer.catalog.get({id: 'your video id', type: 'video'}). then(function(data) { myPlayer.catalog.load(data); myPlayer.muted(true); myPlayer.play(); }). catch(function(error) { throw new Error(error); }); </script>
Using a data attribute
Alternatively, you can pass a string token as part of the player catalog object, using the property name data-watermarking-token
.
- Retrieve the Advanced embed code for your player.
-
Include your watermarking token with the player embed code. To do this, you will add the data-watermarking-token as an attribute of the
tag. <video-js id="myPlayerID" data-account="1752604059001" data-player="default" data-embed="default" controls="" data-video-id="5550679964001" data-playlist-id="" data-application-id="" data-watermarking-token="your watermark token" width="960" height="540"> </video-js>
-
The player must be integrated with your registration system so that a Viewer ID is passed on the analytics web beacon (in the
user
field).To do this, use the
setUser()
method. For example:myPlayer.bcAnalytics.client.setUser('viewer id');
JavaScript
<script> videojs.getPlayer('myPlayerID').ready(function() { var myPlayer = this; // Set the viewer id for Brightcove analytics myPlayer.bcAnalytics.client.setUser('viewer id'); }); </script>
Limitations
For details about the limitations for this feature, see the Overview: Forensic Watermarking document.
Brightcove Player version 6.55 is required; latest version recommended