Skip to main content


To change the settings of your video and overwrite the configuration from your dashboard, use a configuration object as a third argument to the init method:

videodonut("init", "YOUR-VIDEO-ID", {
// Player settings.
loop: true,
muted: false,
controls: false,
// Donut & Player settings.
theme: "#80ff72,#41bdd3",
width: 450,
expanded: false,
position: "left",
animation: true,
hideOnMobile: false,
ctaButtonTitle: null,
ctaButtonTargetUrl: null,
// Hooks
onLoad: function (video) {},
onOpen: function (video) {},
onPlay: function (video) {},
onClose: function (video) {},
onButtonClick: function (video) {},
onShutdown: function (video) {},
  • loop: Defines if the video plays in loop. Values: true or false.

  • muted: Defines if the video starts playing muted. If the value expanded is set to true, muted must also be true. This is a requirement from some browsers to allow autoplay. Values: true or false.

  • controls: Defines if the video controls (play, pause, volume) are visible. If the value expanded is set to true, it's recommended to also set controls to true for a better user experience. Values: true or false.

  • theme: Defines the hexadecimal code of the two colors that create the gradient of the border of the video-donut. Its format is #hex1,#hex2. Example: #80ff72,#41bdd3. If you want to remove the border, set this value to null.

  • width: The maximum width of the video player (in pixels). Values: 250, 350, 450.

  • expanded: Defines if the video loads expanded and plays automatically. Values: true or false.

  • position: Defines the position of the video-donut. Values: left or right.

  • animation: Animates the video-donut with a bounce effect. Values: true or false.

  • hideOnMobile: Hides the video-donut on small screens. Values: true or false.

  • ctaButtonTitle: Title of the call-to-action button within the video. Default: null.

  • ctaButtonTargetUrl: Destination URL for the call-to-action button within the video. Default: null.


The hooks onLoad, onOpen, onPlay, onClose, onButtonClick, onShutdown are part of the Analytics module only available with a Premium plan. For a detailed guide on how to integrate with Google Analytics, visit the Analytics page.

Ready to Grow Your Business?Start using Video Donut today.

Add a stories-style video to your website to boost engagement and conversions.

Sign up for Free