Version: 2.67.0

How to change the Context Menu?

This question is typically asked by developers who want to change the logo in the context menu, change the default text or add some items.

The snippet below does exactly that.

function customizeContextMenu(container) {
var contextMenu = container.querySelector(".theo-context-menu");
// change context menu text
var contextMenuFirstItem = contextMenu.querySelector(".theo-context-version");
contextMenuFirstItem.innerText = "Brand X";
// change mini logo
var contextLogo = contextMenu.querySelector(".theo-context-menu-logo"); =
"url('')"; = "cover";
contextLogo.querySelector("svg").style.visibility = "hidden";
// add a line
var contextMenuSecondItem = document.createElement("li");
contextMenuSecondItem.innerText = "24/07/2018";
var element = document.querySelector(".video-container");
var player = new THEOplayer.Player(element, playerConfig);

It's important to note that customizeContextMenu is immediately called after initializing a THEOplayer instance.

Another common question is to remove the context menu altogether. The context menu can be disabled as it is one of the Add-Ons. You can manage your THEOplayer configuration via THEOportal

To verify whether this add-on is enabled you can execute the query below.

var contextMenuEnabled = THEOplayer.features.indexOf("contextmenu") > -1;