Using Methods

Methods allow you to execute certain actions on your video background instance. Current methods provide the ability to play, pause, mute, unmute, and resize a video background.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Be sure to use your own container!
var container = '.your-container'

// Method to play a video background
jQuery(container).data('vidbgpro').playVidbg();

// Method to pause a video background
jQuery(container).data('vidbgpro').pauseVidbg();

// Method to mute a video background
jQuery(container).data('vidbgpro').muteVidbg();

// Method to unmute a video background
jQuery(container).data('vidbgpro').unMuteVidbg();

// Method to resize a video background
jQuery(container).data('vidbgpro').resizeVidbg();

It is important to make sure you call these methods after Video Background Pro has initialized.