Let's Chat?

Cobrowse Agent Events


Agent Events are the events included within the agent side behavior of Cobrowse, in alphabetical order:


The accessdenied method means the agent attempted to use a Glance feature without the appropriate privilege. The object passed to the event handler describes the access violation.

It may include the rcrequested property when an agent requested remote control without having the remote-control privilege.


The addguestaccepted event fires when the visitor grants permission to add a guest.


The addguestdeclined event fires when the visitor denies permission to add a guest.


The agents event announces agents joining or leaving the session. See the visitor-side agents event for more information.


The connectfailed event occurs if the viewer is unable to connect to the Cobrowse service.

{ detail: <message indicating the reason for connect failure> }


Information about document sharing.

{"sharedBy": "visitor|agent", "name": "name.xyz" }


Information about the files downloaded from document sharing.

{"sharedBy": "visitor|agent", "downloadedBy": "visitor|agent","name": "name.xyz" }


The enddocshare event occurs when document sharing has ended.


The enddocsharepreview event occurs when the preview for document sharing has ended.

The navigate event occurs when a visitor navigates to a new page. The object passed to the event handler includes information about the browser and URL.


The pagevisibility event occurs when the visitor's page visibility is changed by opening a new tab, minimizing the window, or returning the page. It can have a value of visible or hidden.


The rc event occurs when the remote control state changes. The enabled property of the object indicates whether remote control is currently enabled. The suspended property indicates whether control is temporarily suspended due to visitor mouse or keyboard activity. See the visitor side rc event for more information.

{  enabled : [true | false],
   suspended : [true | false]}    


The rcrequest event occurs when the visitor responds to a request for remote control. The object passed to the event handler shows whether the visitor accepted or declined the request.

{response:["accepted" | "declined"]}    


The sessionend event occurs when the session ends. The object passed to the event handler may be undefined, or may contain a reason code. See reason codes.

{msg : [a description of the error]}    


A session posts sessionpaused when the session is paused or unpaused. It includes an object describing the current state of the session. It will include the message displayed to the agent, if one is provided.

{paused: true|false[, message: '']}


The screenshare event occurs on the agent side when a visitor accepts, declines, joins, or ends a Screen Share session. The object passed to the event handler shows the view and the state of the screenshare session.

{screenshareView : "[glance_agentvideo|glance_screenshare]",
 state: "[accepted|declined|joined|ended]"


The screensharedeclined event occurs when an agent sends a request to the visitor to share their screen but the visitor declines.


The startdocshare event occurs when document sharing has started.


The startdocsharepreview event occurs when the preview for document sharing has started.


The userstate event occurs whenever the visitor side sets user state by calling the GLANCE.Cobrowse.Visitor.setUserState() method. It includes the user state object passed into that method call on the user side.


The viewerclosing event occurs when participants in a multiway video session are unable to play videos due to their browser/network.

{ closereason: "PlayerTooSlow"}


The visitorscreensharenotsupported event occurs when the visitor's environment does not support clientless screenshare (e.g. visitor is on a mobile device).


The visitorscreensharestarted event occurs when the visitor accepts a screen share request and starts sharing their screen


The visitorscreensharestopped event occurs when a visitor or agent ends the visitor's screenshare.


The visitor has responded to a request to turn on video.accepted or declined.


The visitorvideorequested event occurs when the agent requests to add video to a session when the participants include a guest.


Information about the visitor video session

{ agentviewerelementid: [id of the element where visitor video should be displayed],
  camerastatus: ["available"|"blocked"|"nocamera"|"error"],
  descriptor : [internal use only],
  paused : [true|false],
  previewelementid [id of the element containing the visitor's video preview],
  sessionkey : [], video: [small|large]

visitorvideo occurs when the visitor's video session first starts, and again if there is a change in the video session state.

Session End Reason Codes

Error Reason
UnsupportedBrowser Agent's browser is not supported for Cobrowse.
SSOError SSO authentication failed.
NoSession Session Key is invalid or the session has not started yet.
InvalidCobrowseSub Authenticated user does not have a valid subscription for viewing Cobrowse sessions.
ExpiredCreditCard Credit card on the account has expired.
DeclinedInvoice Credit card for the account was declined.
ConnDrop Agent’s connection to the Glance Cobrowse server dropped.
AgentRefresh Agent refreshed the browser.
AuthError Authentication with the Cobrowse service failed.
LookupFailed Agent was unable to connect to the Glance web service to lookup the session.
VisitorLeft Visitor left the session.
AgentLeft Agent left the session. If the agent was the last agent in the session, the session ends.

By continuing to use the site, you agree to the use of cookies. Learn More