GET STARTED

Media Platform Runtime API (rtAPI) Documentation

rtAPI is a simple set of Javascript APIs that offers access to manipulate and track a gallery on client side.

Use the following set of rtAPI to preform :



Register to receive events

Register events :

For example


cincopa.registerEvent("cp_evt_mediaplay", "runtime.*");

function cp_evt_mediaplay(name, data, gallery) {
	if (name == "runtime.on-load-html")
			gallery.args.allow_search = "yes";
}

Register to receive hooks

Hooks can be used to manipulate gallery at any given stage. List of hooks :



For example
	_cp_go_hooks["before-building-upper-panel"] = function(go) {
			go.args.allow_search = "yes";
			return "[this is a link]";
		};