Context Menu

Overview

Adding Items

The following code adds the media item to the context menu, which has a child menu item name audio. If the media item already exists, it is not added again, only the child element will be added to the existing item.

There is a function associated with the key click which specifies what happens when the audio item is clicked.

(function () {
  $context([{
    name: 'media',
      children: [{
        name: 'audio',
        click: function () {

        }
      }]
  }])
})();
					
Typically, the click function implements code that will open up the control box