> For the complete documentation index, see [llms.txt](https://docs.apryse.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.apryse.com/web/video/watermark-videos.md).

# Watermark videos using JavaScript

Watermark videos effortlessly with JavaScript using WebViewer Video. Learn how to add custom watermarks to your videos with the setWatermark API. Explore the guide now! The Apryse Web SDK streamlines

{% hint style="info" %}
New licenses for WebViewer Video are no longer offered.
{% endhint %}

WebViewer Video allows you to place your own custom watermark on top of the video.

![](https://3532544125-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX9YnTSKIHvV7m0A36LbO%2Fuploads%2Fgit-blob-f015f112a9090684842d30907db597b37092e5c6%2F03285c0e7d8bd126411c1cb6192aa31193355702-1112x854.png?alt=media)

You can use the WebViewer setWatermark API. Please see the [WebViewer watermark guide](/web/edit-page-content/watermarks.md) for more.

Option shouldDrawOverAnnotations must be passed in when setting the watermark, in order to show up on the video canvas.

{% tabs %}
{% tab title="JavaScript" %}
{% code lineNumbers="true" %}

```js
WebViewer(...)
    .then(function(instance) {
      const license = '---- Insert commercial license key here after purchase ----';
      initializeVideoViewer(instance, { license });

      const { documentViewer } = instance.Core;

      documentViewer.setWatermark({
        shouldDrawOverAnnotations: true, // Enable watermarks for video
        // Draw diagonal watermark in middle of the document
        diagonal: {
          fontSize: 25, // or even smaller size
          fontFamily: 'sans-serif',
          color: 'red',
          opacity: 50, // from 0 to 100
          text: 'Test Watermark'
        },
        // Draw header watermark
        header: {
          fontSize: 10,
          fontFamily: 'sans-serif',
          color: 'red',
          opacity: 70,
          left: 'left watermark',
          center: 'center watermark',
          right: ''
        }
      });
    });
```

{% endcode %}
{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.apryse.com/web/video/watermark-videos.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
