List of VMRC Events
The VMRC browser plug-in generates some events, such as message events and connection state change events, regardless of the mode you choose when starting the VMRC processes. Events related to changes in the console state, such as screen or input, are generated when the VMRC browser plug-in is started in MKS mode. Events related to changes in device state are generated only when the VMRC browser plug-in is started in Devices mode.
General-Purpose Events
The VMRC browser plug-in generates general-purpose events regardless of the mode you choose when starting the VMRC browser plug-in.
onConnectionStateChange(connectionState, host, datacenter, vmId, userRequested, reason)
The onConnectionStateChange() event is generated in response to a change in the connection state.
New connection state. Can be either VMRC_CS_CONNECTED or VMRC_CS_DISCONNECTED.
String containing information on the connection state change. The reason string contains user-visible information, suitable for a dialog or other alert.
onMessage(type, message)
The onMessage() event is generated in response to messages from the VMRC browser plug-in. The message string included with the onMessage() event contains information and other messages from the VMRC browser plug-in that pertain directly to the user of your web application. Your web application can display the message string to the user using a dialog or other alert.
Message type. Values can include VMRC_MESSAGE_INFO, VMRC_MESSAGE_WARNING, VMRC_MESSAGE_ERROR, or VMRC_MESSAGE_HINT
MKS Mode Events
The VMRC browser plug-in generates MKS mode events in response to changes in the console screen or input state. MKS events are generated only if the VMRC browser plug-in is started in MKS mode.
onScreenSizeChange(width, height)
The onScreenSizeChange() event is generated in response to changes in the screen size of the currently connected virtual machine.
onFullscreenChange(fullscreenState)
The onFullscreenChange() event is generated when the VMRC browser plug-in exits or enters full-screen mode.
If true, the plug-in has entered full-screen mode. If false, the plug-in has exited full-screen mode.
onGrabStateChange(grabState)
The onGrabStateChange() event is generated when the VMRC browser plug-in input grab state, when guest input is either grabbed or released.
VMRC_GS_UNGRABBED_HARD, or VMRC_GS_UNGRABBED_SOFT.
Devices Mode Events
The VMRC browser plug-in generates Devices mode events in response to changes in the state of currently connected devices, or changes in which devices are present either on the physical client or remote virtual machines. Devices mode events are only generated when the VMRC browser plug-in is started in Devices mode.
onDeviceStateChange(deviceState, host, datacenter, vm, virtualKey, physicalKey, userRequested, reason)
The onDeviceStateChange() event is generated in response to a change in the connection state of a virtual machine device.
New device state. Can be either VMRC_DS_CONNECTED or VMRC_DS_DISCONNECTED.
String containing information on the device state change. The reason string contains user-visible information, suitable for a dialog or other alert.
onVirtualDevicesChange()
The onVirtualDevicesChange() event is generated when there is a change to any virtual devices that are present on the target virtual machine, for any reason. This event contains no parameters.
When your Web application receives the onVirtualDevicesChange() event, you can use the getVirtualDevices() API method to obtain the updated list of virtual device keys, and the getVirtualDeviceDetails() API method to obtain updated detailed information on each virtual device. See Calling VMRC API Methods on a Virtual Machine.
onPhysicalClientDevicesChange()
The onPhysicalClientDevicesChange() event is generated when there is a change to any physical devices that are present on the local client machine, for any reason. This event contains no parameters.
When your Web application receives the onPhysicalClientDevicesChange() event, you can use the getPhysicalClientDevices() API method to obtain the updated list of physical device keys, and the getPhysicalClientDeviceDetails() API method to obtain updated detailed information on each physical client device. See Calling VMRC API Methods on a Virtual Machine.