Skip to main content

Advanced settings

Advanced settings let you control the player language, inject custom CSS, and wire lifecycle callbacks. Open Customize → Advanced on a video, or configure workspace defaults in Player Studio → Delivery & data → Advanced.

Advanced settings

Player language​

The player UI—tooltips, menus, and control labels—can display in a specific language or match the viewer's browser.

OptionBehavior
This video's languageUses the workspace's default language.
Auto (viewer's browser)Detects the viewer's browser language and uses a matching locale if available.
EnglishForces the player UI to English.
EspañolForces the player UI to Spanish.
PortuguêsForces the player UI to Portuguese.

Select the language, then Save and Publish.

Custom CSS​

Enter CSS rules that style the player container and its elements. The rules are injected into the player's shadow DOM and are CSP-safe. Use this to override colors, spacing, or visibility of specific controls.

.ap-controls { background: rgba(0, 0, 0, 0.8); }
.ap-play-button { color: #ff6600; }

Custom CSS is advanced—test on a staging video before applying to production.

Lifecycle callbacks​

Lifecycle callbacks let you run JavaScript functions when player events fire. Enter a function name that exists in the global scope of the embedding page.

CallbackFires when
On play callbackPlayback starts or resumes.
On pause callbackPlayback pauses.
On complete callbackThe video reaches its end.
On CTA callbackA CTA button is clicked.
On convert callbackA conversion event fires.

The function receives an event object with the player ID and event type:

function myPlayCallback(event) {
console.log('Play event:', event.playerId, event.type);
}

Callbacks require the function to be defined before the player loads. They complement but do not replace the JavaScript API.

Frequently asked questions​

Does the player auto-detect language?

Yes, if you select Auto (viewer's browser). It checks the browser's language setting and uses a matching locale if one exists.

Is custom CSS safe for all browsers?

Yes. The CSS is injected into the player's shadow DOM, so it does not affect the rest of your page. It passes CSP checks.

Can callbacks prevent default behavior?

No. Callbacks fire after the event and cannot cancel it. Use the JavaScript API for more control.

Where do I define my callback function?

In a <script> tag on your page, before the player embed script loads. The function name you enter must exist in the global scope.