DynTube Help Center
  • Welcome to our Help Center
  • Videos
    • How To Upload & Embed Videos
    • Playing DynTube Videos in Native Mobile Apps
    • How to Embed Videos in WordPress
    • How to create a video feed for Roku & Fire Tv
    • How to live stream on DynTube using OBS
    • How to Change Video Thumbnail
    • How to Change the Video Player Skin
    • How to Download Oirignal Videos
    • How to Use Original MP4 Without Transcoding
    • Use your own domain for videos and channels
    • Automatically Import Videos from Google Drive using Zapier
    • Move videos to a different project
    • How to add call-to-action on a video
    • How to enable white-label video links
    • Tracking Video Viewers with Custom User IDs/Emails
  • Security
    • How to secure your videos on DynTube
    • How to Add Login Protection on My Videos
    • How To Turn On Video Encryption
    • How To Create Plans & Subscriptions
  • Channels
    • How to Create Video Channels
    • How To Sort Videos in a Channel
    • Custom Video Order in Your Channel
  • Projects
    • How to create a project
    • How to Edit Project Settings
    • How To Save Original Source Files
  • AI Features
    • How does the AI-powered transcription and translation pricing work?
  • TV Apps
    • How to Add Your DynTube Roku Feed to a Roku Channel
    • How to Add Your DynTube Fire TV Feed to an Amazon Fire TV Channel
  • Account
    • How to Upgrade My Plan?
    • How to Update My Credit Card Details?
    • How to Check My Payment History?
    • How To Download the Invoices?
    • How to add more users to my DynTube account?
    • How to Cancel My Plan?
  • FAQs
    • How to Choose Between Plans?
    • Video Options
    • Video Player
    • Bandwidth
    • Video Uploads
    • HLS Streaming & Storage
    • Screen Recording & Download prevention
    • Video Playback Issues
    • Billing
  • Tips & Tricks
    • Embed videos using the new video player
    • How to make rounded big play button
    • How to Embed DynTube Videos in LearnDash
    • How to Embed DynTube Video Channel in WordPress/LearnDash
    • How to add dynamic watermark to the video player
    • Control Video Player using URL
    • How to use your own videos as Ads
    • How to embed DynTube player in Next.Js
    • How to embed the DynTube player in React
    • How to embed videos & channels dynamically
Powered by GitBook
On this page
  • Demo of Dynamic Watermark
  • 1. How to add a dynamic watermark in Javascript embed code
  • Turn off IP Watermark
  • 2. Watermark on iframe-based embed code
  • 3. Adding Dynamic Watermark with Current WordPress Username
  1. Tips & Tricks

How to add dynamic watermark to the video player

PreviousHow to Embed DynTube Video Channel in WordPress/LearnDashNextControl Video Player using URL

Last updated 1 year ago

Demo of Dynamic Watermark

You can view the demo of our watermark here:

1. How to add a dynamic watermark in Javascript embed code

Step 1.

Edit your project and go to the "Video Options" tab or click on a video title in the dashboard and find the "Options" tab. Please enable the option "Dynamic watermark".

Step 2.

To add a dynamic watermark to the video player, you just need to add an attribute `data-watermark` to the DIV of your embed code.

<div data-watermark="Dynamic Watermark" data-dyntube-key="abcd1234"></div>

This will show you an animated watermark on the video player

Turn off IP Watermark

Please remember to turn off the "IP Watermark" option in the dashboard in order for the dynamic watermark to work. Only one of these watermarks can work at a time.

2. Watermark on iframe-based embed code

Step 1.

Edit your project and go to the "Video Options" tab or click on a video title in the dashboard and find the "Options" tab. Please enable the option "Dynamic watermark".

Step 2

If you are using iframe-based embe code then you can add the watermark in the URL of iframe.

https://videos.dyntube.com/iframes/AHCWERUYER387?watermark=MY-WATERMARK

3. Adding Dynamic Watermark with Current WordPress Username

Enhance user experience on your WordPress website by adding a dynamic watermark that displays the current username of logged-in users. Follow these quick steps to implement this feature:

  1. Access User Data: Utilize the wp_get_current_user() function to retrieve the logged-in user's information, specifically the username.

    <?php
    $current_user = wp_get_current_user();
    $username = $current_user->user_login;
    ?>
  2. Display Watermark: Insert the obtained username into the data-watermark attribute of a designated HTML element. Ensure security by using the esc_attr() function to escape the username.

    <div data-watermark="<?php echo esc_attr($username); ?>" data-dyntube-key="abcd1234"></div>
  3. Implementation: Add the provided PHP code and HTML element to your WordPress templates or pages for the watermark to appear.

By following these steps, you'll create a personalized touch on your website, engaging users with a dynamic watermark displaying their usernames.

https://www-demos.s3.us-east-1.amazonaws.com/dynamic-watermark.html
Logo