JWT signed to use in the player to show a watermark
An alternative is for you to create your own signed JWT to use in our player to use Watermark. For that, you need some information to be able to generate, such as the id and secret of your watermark group that you can fetch through this request.
You need to be aware of the expiration of this JWT if it is expired, it cannot be used again.
Below is the attributes that go inside the JWT payload:
Atribute name | Type | Description | Required |
---|---|---|---|
drm_group_id | uuid | Watermark Group id | Yes |
exp | timestamp | Timestamp expire jwt token | Yes |
string1 | string | First label | No |
string2 | string | Second label | No |
string3 | string | Third label | No |
Below is an example in NodeJS of how to create the JWT using the jsonwebtoken library:
const JWT = require('jsonwebtoken');
const jwtObj = {
drm_group_id: "", // id from watermark group
string1: "", // First Label
string2: "", // Second Label
string3: "" // Third Label
}
const expiresIn = 86400; // 24h
const secret = "" // secret from watermark group
const token = JWT.sign(jwtObj, secret, { expiresIn })
After generating the JWT, you can use it in the embed code with the following parameters watermark and drm_group_id. For example: ?watermark={jwt}
Follow the link to check the parameters available in the player.