Disabling Video Cloud Cookies on a Per User Basis

ProductVersionEdition
Video CloudLegacy StudioExpress I, Express II, Express III, Professional, Enterprise

This topic discusses how to disable cookies on a per user basis.

Disabling Video Cloud Cookies on a Per User Basis

Video Cloud players use browser cookies for various purposes related to Brightcove provision of the Video Cloud service. A list of the cookies used by Brightcove players can be found in this document, along with information on how to disable cookies for all users in your account settings. The Brightcove cookies can also be configured on a per user basis using the embed code or using an API.

Setting the privacy mode

The privacy mode can be set by adding the privacyMode parameter to the player publishing code.

<param name="privacyMode" value="true" />        
		

The privacy mode can also be set using the setPrivacyMode()method of the Video Player Module, which is included in the Smart Player and Flash-only Player APIs.

The general syntax is:

setPrivacyMode(pMode)

A possible implementation using the the Smart Player API would be to execute the following code in response to viewers clicking a button indicating that they do not wish to have any cookies generated:

var privacyMode;
var APIModules = brightcove.api.modules.APIModules;
var videoPlayer = experience.getModule(APIModules.VIDEO_PLAYER);
videoPlayer.setPrivacyMode(true);
		

where

Argument Value Comments
true Brightcove cookies and any functionality associated with them will be disabled

You can see a working sample of turning off cookies using the Smart Player API on this page: http://solutions.brightcove.com/bcls/smart-player-api/do-not-track/do-not-track.html

Setting privacy mode with a query string

The privacy mode can also be set using a query string. The format is:

&privacyMode=boolean

A specific example is:

http://link.brightcove.com/services/player/bcpid2041213080001?bckey=AQ~~,AAABjnKM-Ck~,C_Yw07pWMKRKOhRLZ7yCOnp00AmK9wBD&bctid=2737629462001&privacyMode=true

Getting the privacy mode

You can also get the privacy mode.

The privacy mode can also be set using the getPrivacyMode() method of the Video Player Module in both the Smart Player and Flash-only Player APIs.

The general syntax is:

getPrivacyMode()

where

Argument Definition Comments
pMode privacy mode If true, Brightcove cookies will be set based on the publisher's Account settings.

A possible implementation using the Smart Player API would be

var privacyMode;
function privacyModeHandler(result) {
    privacyMode = result;
}

var APIModules = brightcove.api.modules.APIModules;
var videoPlayer = experience.getModule(APIModules.VIDEO_PLAYER);
videoPlayer.getPrivacyMode(privacyModeHandler);

where

Argument Value Comments
true Brightcove cookies will not be set

the getPrivacyMode() would typically be called by plugin that wants to check on the privacy mode before dropping cookies.

If you are building a JS plugin, you can call this method synchronously without the callback parameter (though the callback parameter will still work):

var isPrivacyMode = videoPlayer.getPrivacyMode();