Revision as of 20:11, February 23, 2017 by Byee (talk | contribs) (API Commands)
Jump to: navigation, search

API Commands

start

Start a Co-browse session

Example

oMyPlugin.command('CoBrowse.start').done(function(e){

	// Co-browse started a session successfully

}).fail(function(e){

	// Co-browse failed to start a session
});


Resolutions

Status When Returns
resolved Co-browse API is available and used to start session n/a
rejected Co-browser API is not available n/a

stop

Stop the currently active Co-browse session

Example

oMyPlugin.command('CoBrowse.stop').done(function(e){

	// Co-browse stopped a session successfully

}).fail(function(e){

	// Co-browse failed to stop a session
});


Resolutions

Status When Returns
resolved Co-browse API is available and used to end the active session n/a
rejected Co-browser API is not available n/a

configure

Modify configuration options for CoBrowse. See configuration page for CoBrowse.

Example

oMyPlugin.command('CoBrowse.configure', {

	src: 'http://localhost:8080/foo/sample',
	url: 'http://localhost:8080/foo/bar'

}).done(function(e){

	// Co-browse configured successfully

}).fail(function(e){

	// Co-browse wasn't configured properly
});


Options

Option Type Description
src string URL/Path to the Co-browse JavaScript package. Usually resides on the Co-browse server.
url string URL/Path to the Co-browse server endpoint


Resolutions

Status When Returns
resolved When configuration options are provided and set n/a
rejected When no configuration options are provided 'Invalid configuration'
Comments or questions about this documentation? Contact us for support!