In-Page Configuration Properties Specific To Connector Script For Video Players

While most In-Page Configuration Properties can be used to configure both forms of Connector Script, some In-Page Configuration Properties are specific to Connector Script For Video Players.

Video-specific In-Page Configuration Properties are nested in the video namespace.

Mode

Defines the mode that the plugin should operate in. Read more about modes in chapter Connector Script For Video Players.

This property is optional, it defaults to sell-video.

Possible values:

Mode Value Note
Sell Video sell-video This is the default value
Skip Ad Pre-Roll skip-ad-pre-roll  
Skip Ad Pre-Play skip-ad-pre-play  

Note

Support for the modes listed above varies by player. Currently, modes other than “Sell Video” are only supported for JW Player and Flowplayer. Refer to Connector Script For Video Players for a complete support matrix.

Example for JW Player:

jwplayer('video-container').setup({
    file: 'video-file.mp4',
    laterpayConnector: {
        video: {
            mode: 'sell-video' // This is the default value
        }
    }
})

Example for Flowplayer:

flowplayer('#video-container', {
    clip: {
        sources: [
            { type: 'video/mp4', src: 'video-file.mp4' }
        ]
    },
    laterpayConnector: {
        video: {
            mode: 'sell-video' // This is the default value
        }
    }
})

Example for Video.js:

videojs('video-container', {
    sources: [
        { type: 'video/mp4', src: 'video-file.mp4' }
    ],
    plugins: {
        laterpayConnector: {
            video: {
                mode: 'sell-video' // This is the default value
            }
        }
    }
})

Example for 3Q:

var player = new js3q({
    'data-id': 'your-video-data-id',
    container: 'video-container',
    laterpayConnector: {
        video: {
            mode: 'sell-video' // This is the default value
        }
    }
})
player.init()

The examples above create a new player instance and set the mode to “Sell Video”.

Sell Video Offset

This property applies to mode “Sell Video” only. It defines the length in seconds of a teaser that can be viewed before the video is stopped and the Purchase Overlay appears.

This property is optional, it defaults to 0 (seconds).

Example for JW Player:

jwplayer('video-container').setup({
    file: 'video-file.mp4',
    laterpayConnector: {
        video: {
            mode: 'sell-video', // This is the default value
            sellVideoOffset: 10
        }
    }
})

Example for Flowplayer:

flowplayer('#video-container', {
    clip: {
        sources: [
            { type: 'video/mp4', src: 'video-file.mp4' }
        ]
    },
    laterpayConnector: {
        video: {
            mode: 'sell-video', // This is the default value
            sellVideoOffset: 10
        }
    }
})

Example for Video.js:

videojs('video-container', {
    sources: [
        { type: 'video/mp4', src: 'video-file.mp4' }
    ],
    plugins: {
        laterpayConnector: {
            video: {
                mode: 'sell-video', // This is the default value
                sellVideoOffset: 10
            }
        }
    }
})

Example for 3Q:

var player = new js3q({
    'data-id': 'your-video-data-id',
    container: 'video-container',
    laterpayConnector: {
        video: {
            mode: 'sell-video', // This is the default value
            sellVideoOffset: 10
        }
    }
})
player.init()

The examples above create a new player instance, set the mode to “Sell Video” (which is the default) and set the length of the visible teaser to 10 seconds.

Viewers will be able to watch 10 seconds of the video before it stops and the Purchase Overlay appears.

Skip Ad Pre-Roll Offset

This property applies to mode “Skip Ad Pre-Roll” only. It defines a delay in seconds before the skip-ad button appears while an ad is playing.

This property is optional, it defaults to 2 (seconds).

Note

Support for modes varies by player. Currently, mode “Skip Ad Pre-Roll” is only supported for JW Player. Refer to Connector Script For Video Players for a complete support matrix.

Example for JW Player:

jwplayer('video-container').setup({
    file: 'video-file.mp4',
    laterpayConnector: {
        video: {
            mode: 'skip-ad-pre-roll',
            skipAdPreRollOffset: 0
        }
    }
})

Skip Ad Pre-Roll OneClick

This property applies to mode “Skip Ad Pre-Roll” only.

By default, when the user has clicked the skip-ad button, the Purchase Overlay which lists one or more purchase options is presented.

This property allows you to opt-in to a “OneClick” experience that redirects the viewers directly to the LaterPay purchase dialogs when they click on the skip-ad button.

Only one purchase option can be offered when “OneClick” is enabled. If multiple purchase options are available, the first one is selected.

This property is optional, it defaults to false.

Note

Support for modes varies by player. Currently, mode “Skip Ad Pre-Roll” is only supported for JW Player. Refer to Connector Script For Video Players for a complete support matrix.

Example for JW Player:

jwplayer('video-container').setup({
    file: 'video-file.mp4',
    laterpayConnector: {
        video: {
            mode: 'skip-ad-pre-roll',
            oneClick: true
        }
    }
})

The examples above create a new player instance, set the mode to “Skip Ad Pre-Roll” and enable “OneClick”. When a viewer clicks on the skip-ad button, they will be redirected directly to the LaterPay purchase dialogs.

Global Player ID

This property is only needed in certain edge cases in the context of the “Resume Playback” feature.

Connector Script stores the current playback position of a user in the browser’s Session Storage. In order to differentiate between all players on a site, Connector Script generates “Global Player ID”s based on the page URL and the player’s element ID by default.

On some sites, this default may not suffice: For example, if the URLs of your pages contain a dynamic parameter for tracking. In these cases, Connector Script will not be able to recognize the same player after a user comes back to your site after a purchase.

To make the “Resume Video” feature work under the circumstances described above, you can assign each player on your site a custom “Global Player ID”.

Note

Each “Global Player ID” needs to by unique in the global scope of your site.

Example for JW Player:

jwplayer('video-container').setup({
    file: 'video-file.mp4',
    laterpayConnector: {
        video: {
            globalPlayerId: 'player-0815'
        }
    }
})

Example for Flowplayer:

flowplayer('#video-container', {
    clip: {
        sources: [
            { type: 'video/mp4', src: 'video-file.mp4' }
        ]
    },
    laterpayConnector: {
        video: {
            globalPlayerId: 'player-0815'
        }
    }
})

Example for Video.js:

videojs('video-container', {
    sources: [
        { type: 'video/mp4', src: 'video-file.mp4' }
    ],
    plugins: {
        laterpayConnector: {
            video: {
                globalPlayerId: 'player-0815'
            }
        }
    }
})

Example for 3Q:

var player = new js3q({
    'data-id': 'your-video-data-id',
    container: 'video-container',
    laterpayConnector: {
        video: {
            globalPlayerId: 'player-0815'
        }
    }
})
player.init()

The examples above create a new player instance and set the “Global Player ID” to player-0815.