Using the SharingServices Package, the Customer can start or stop annotation during active Avaya Co-Browsing session.
To start annotation feature, you must complete the following activities.
To start annotation using a shape, color and stroke size, you must complete the following activity.
To stop annotation feature, you must complete the following activities.
To clear all customer annotations on the Co-Browse enabled webpage
To Hide all agent annotations on the Co-Browse enabled webpage
To UnHide all agent annotations on the Co-Browse enabled webpage
To Hide all Customer annotations on the Co-Browse enabled webpage
To UnHide all customer annotations on the Co-Browse enabled webpage
You must register onSuccess and onFailure callbacks. The onSuccess callback is called to report that customer can Annotate on the active Co-Browse enabled webpage. While annotating on the webpage customer is not allowed to update values for the webpage elements. The onFailure callback is called to report a failure that customer cannot Annotate on the active Co-Browse enabled webpage.
var onSuccess = function () {
// Called to report success for start Annotation
// Add custom GUI code for the customer to use the Annotation feature
//e.g. Display a toolbar which allows customer to select color, shape or stroke size for annotation on webpage
};
var onFailure = function (error) {
// Called to report failure in
// Start Annotation feature
// Add code here to notify customer
};
Call startAnnotation() method to allow customer annotate on the Co-Browse enabled webpage.
_cbinstance.startAnnotation().then(onSuccess.bind(this), onFailure);
You must register onSuccess and onFailure callbacks. The onSuccess callback is called to report that customer can Annotate on the active Co-Browse enabled webpage using the specified annoation shape information obtained from the AnnotationShapeInfo object. The onFailure callback is called to report a failure that customer cannot Annotate on the active Co-Browse enabled webpage.
var onSuccess = function () {
// Called to report success for setting the Annotation object
};
var onFailure = function (error) {
// Called to report failure for setting the Annotation object
};
Call setAnnotation(AnnotationShapeInfo) method to specify the annotation shape type used for annotating on Co-Browse enabled webpage. The supported annotation shape types and the respective variables are as follows:
The default annotation shape type is FreeHand
//Create AnnotationInfo object with default values as
//strokeColor=red, strokeSize=5, annotationShapeType=AvayaCoBrowseClientServices.Services.Cobrowse.Common.AnnotationShapeType.ANNOTATIONSHAPETYPEFREEHAND
var annotationInfo = new AvayaCoBrowseClientServices.Services.Cobrowse.Common.AnnotationShapeInfo();
//Create AnnotationInfo object with user specified values
//Customer annotates on webpage using Rectangle Shape with strokeColor and strokeSize as 'blue' and '11'
var annotationInfo= new AvayaCoBrowseClientServices.Services.Cobrowse.Common.AnnotationShapeInfo('blue','11',AvayaCoBrowseClientServices.Services.Cobrowse.Common.AnnotationShapeType.ANNOTATIONSHAPETYPERECTANGLE);
//Call to setAnnotation method
_cbinstance.setAnnotation(annotationInfo).then(onSuccess.bind(this), onFailure);
You must register onSuccess and onFailure callbacks. The onSuccess callback is called to report that customer can no longer annotate on the webpage. The onFailure callback is called to report a failure in stopping annotation.
var onSuccess = function () {
//Called to report success for stop Annotation.
//Now customer can update the webpage elements
//Customer is not allowed to annotate on the webpage until an api call is made to start the annotation
};
var onFailure = function (error) {
// Called to report failure in
// Stopping Annotation
// Add code here to notify customer
};
Call stopAnnotation() method to disable the annotation mode.
_cbinstance.stopAnnotation().then(onSuccess.bind(this), onFailure);
Call clearAllCustomerAnnotations() method to remove all the customer annotations on the Co-Browse enabled webpage.
_cbinstance.clearAllCustomerAnnotations();
Note - Single click on a specific annotation removes it from the webpage.
Call hideAllAgentAnnotations() method to hide all agent annotations on the Co-Browse enabled webpage.
_cbinstance.hideAllAgentAnnotations().then(onSuccess.bind(this), onFailure);
Call unHideAllAgentAnnotations() method to unHide agent annotations on the Co-Browse enabled webpage.
_cbinstance.unHideAllAgentAnnotations().then(onSuccess.bind(this), onFailure);
Call hideAllCustomerAnnotations() method to hide all customer annotations on the Co-Browse enabled webpage.
_cbinstance.hideAllCustomerAnnotations().then(onSuccess.bind(this), onFailure);
Call unHideAllCustomerAnnotations() method to unHide customer annotations on the Co-Browse enabled webpage.
_cbinstance.unHideAllCustomerAnnotations().then(onSuccess.bind(this), onFailure);