Custom Button API

If your plan includes the custom button API you may omit the element parameter in the clipchamp(...) call, which will then return a Javascript API object for interacting with the Clipchamp process. Once created, the configured options can be updated using the update function, and the Clipchamp UI can be opened using the open function.

<script type="text/javascript">
    var process = clipchamp(options);
    process.update(options);
    process.update(key, value);
    process.open();
</script>

If there’s no running Clipchamp process associated with this API object when open is called, a new one will be started with the currently configured options. These options will remain in effect until the process completes or is cancelled.

A sample custom button implementation looks as follows:

<script src="https://api.clipchamp.com/YOUR_API_KEY/button.js">
</head>
<body>
<button>My button</button>
<script>
(function() {
   var clipchampProcess = clipchamp({
      output: '...' // your nominated upload target goes here
    });
   document.getElementsByTagName("button')[0].onclick = function() {
      clipchampProcess.open();
   });
})();
</script>

There is no CSS styling for the button set in the example, this can be achieved through a new CSS class. Note that you can also use the enable parameter's no-branding flag (if available in your plan) in order to remove Clipchamp branding from one of our default buttons if that's what you'd like to achieve rather than creating your own button incl. styling from scratch.