Some methods in the VMRC API pertain only to the VMRC browser plug-in and can be used at any time, including before startup() has been called. These methods generally provide version information on VMRC and information about the supported APIs.
The getVersion() method retrieves the current complete version number of the installed VMRC browser plug-in.
|
|
|
|
|
string; contains the full version number for the VMRC plug-in
|
|
|
The getConnectionState() method retrieves the current connection state from a VMRC browser plug-in.
The setScreenSize() method commands the VMRC browser plug-in to set the screen resolution of the currently connected virtual machine.
|
|
|
width (int); represents the desired screen width of the console, in pixels
height (int); represents the desired screen height of the console, in pixels
|
|
|
|
|
If the call to setScreenSize() is successful, the VMRC browser plug-in generates an
onScreenSizeChange() event. If the call is unsuccessful, an exception is thrown.
The screenWidth() method retrieves the screen width, in pixels, of the currently connected virtual machine.
|
|
|
|
|
int; represents screen width in pixels
|
|
|
The screenHeight() method retrieves the screen height, in pixels, of the currently connected virtual machine.
|
|
|
|
|
int; represents screen height in pixels
|
|
|
The setFullscreen() method commands the VMRC browser plug-in to enter or exit full-screen mode.
|
|
|
fs (boolean); set to true to enter full-screen mode, false to exit
|
|
boolean; true for success or false for failure
|
|
|
If the call to setFullscreen() is successful, the VMRC browser plug-in generates an
onFullscreenChange() event. If the call is unsuccessful, an exception is thrown.
The getFullscreen() method retrieves the current state of the full-screen mode of the VMRC browser plug-in.
|
|
|
|
|
boolean; true if full-screen mode is set, false if full-screen mode is not set
|
|
|
The sendCAD() method sends a Control-Alt-Delete key sequence to the currently connected virtual machine.
|
|
|
|
|
boolean; true for success or false for failure
|
|
|
The grabInput() method commands the VMRC browser plug-in to “grab” or capture the current mouse and keyboard input and send it to the currently connected virtual machine console.
If the call to grabInput() is successful, the VMRC browser plug-in generates an
onGrabStateChange() event. If the call is unsuccessful, an exception is thrown.
The ungrabInput() method commands the VMRC browser plug-in to discontinue capturing the current mouse and keyboard input.
If the call to ungrabInput() is successful, the VMRC browser plug-in generates an
onGrabStateChange() event. If the call is unsuccessful, an exception is thrown.
The setInputRelease() method commands the VMRC browser plug-in to disable all mouse and keyboard input capture, regardless of the current grab state. You can use this method to lock any input from reaching the connected VM. For example, if your web application displays a modal dialog, or enters a state in which you want to prevent any input from reaching the connected VM, you can call
setInputRelease() with a parameter value of
true.
You can call setInputRelease() with a parameter value of
false to revert the VMRC browser plug-in to normal input behavior. When you have done so, you can change the input grab state using the
grabInput() and
ungrabInput() methods.
|
|
|
release (boolean); set to true to lock input capture, false to revert to normal grab/ungrab behavior
|
|
|
|
|
1
|
Use the getPhysicalClientDevices() API method to obtain a list of device keys for the physical devices on the local machine.
|
The getPhysicalClientDevices() method returns a physical device key for each device that is available for remote connection.
2
|
Use the getPhysicalClientDeviceDetails() API method with the desired physical device key to obtain more information about the specific physical device you want to connect.
|
The getVirtualDevices() method returns a virtual device key for each device that is available for remote connection. You do not provide a virtual device key when you connect a USB device.
4
|
If you are connecting a non-USB device, use the getVirtualDeviceDetails() API method with the appropriate virtual device key to obtain more information about the specific virtual device you want to connect, including the virtual device’s remote backing type.
|
5
|
Use the connectDevice() API method to connect the local physical device to the corresponding remote virtual device.
|
To use the connectDevice() method to connect a non-USB device, you must specify the device key for both the local physical device and remote virtual device, as well as the backing type. For USB devices, you must specify a blank parameter for the virtual device key, the physical device key for the local USB device, and the backing type.
You can use the getVirtualDevices() method and specify
VMRC_DeviceType.VMRC_DEVICE_USB to retrieve only USB devices.
The device detail connectedByMe indicates whether the remote virtual USB device is connected from your local physical machine. If
connectedByMe is
true, the remote virtual USB device corresponds to a local physical USB device. The device detail
backingKey contains the physical device key for the local physical USB device.
If connectedByMe is
false, a different VMRC client has connected a physical USB device to the virtual machine. The device detail
hostName provides the name of the machine that owns the physical USB device.
You use the getPhysicalClientDevices() method to obtain a list of physical device keys. These physical device keys correspond to physical client devices on the local machine, accessing your Web application, that are eligible for remove device connections. When you call the
getPhysicalClientDevices() method, you pass a property value constant that specifies the types of devices for which to obtain device keys.
Note When using the getPhysicalClientDevices() method with the Internet Explorer browser, you must wrap the return value array as a
VBArray. The following example shows how to process the return value of
getPhysicalClientDevices() as a
VBArray.
|
|
|
mask (property value constant); the mask value specifies what types of device keys the method returns. The mask parameter can contain any combination of the values VMRC_DEVICE_FLOPPY, VMRC_DEVICE_CDROM, and VMRC_DEVICE_USB. You can also use VMRC_DEVICE_ALL to specify all device types.
|
|
|
|
|
You use the getPhysicalClientDeviceDetails() method to obtain detailed information about a particular local physical device. The
getPhysicalClientDeviceDetails() method returns a JavaScript object that contains the device information.
|
|
|
physicalKey (string); the physical device key for the specified device, retrieved using the getPhysicalClientDevices() method.
|
|
|
|
|
You use the getVirtualDevices() method to obtain a list of virtual device keys. These virtual device keys correspond to virtual devices on the currently connected virtual machine that are eligible for remote device connections. When you call the
getVirtualDevices() method, you pass a property value constant that specifies the types of devices for which to obtain device keys.
Note When using the getVirtualDevices() method with the Internet Explorer browser, you must wrap the return value array as a
VBArray. The following example shows how to process the return value of
getVirtualDevices() as a
VBArray.
|
|
|
mask (property value constant); the mask value specifies what types of device keys the method returns. The mask parameter can contain any combination of the values VMRC_DEVICE_FLOPPY, VMRC_DEVICE_CDMROM, and VMRC_DEVICE_USB. You can also use VMRC_DEVICE_ALL to specify all device types.
|
|
|
|
|
You use the getVirtualDeviceDetails() method to obtain detailed information about a particular virtual device. The
getVirtualDeviceDetails() method returns a JavaScript object that contains the device information.
|
|
|
virtualKey (string); the virtual device key for the specified device, retrieved using the getVirtualDevices() method..
|
|
hostName (string): Host name of the physical machine that provides the virtual device backing
|
|
|
You use the connectDevice() method to connect a physical client device to the currently connected virtual machine, either directly, for USB devices, or through a remote device backing, for non-USB devices. You must have an active connection to use the
connectDevice() method and you must also have obtained the device keys for the specified physical client and remote virtual device for non-USB devices.
|
|
|
virtualKey (string); The identifier of the target virtual machine’s virtual device, which you can retrieve by using the getVirtualDevices() method. For USB devices, this parameter should be passed as an empty string (““).
physicalKey (string); The identifier of the physical device on the client system, which you can retrieve by using the getPhysicalClientDevices() method. If you are using a physical device with a file backing, the physicalKey string must be the file path.
backingType (property value constant); This parameter indicates whether the physicalKey parameter refers to a physical device or a local file. Valid values include VMRC_DB_FILE and VMRC_DB_PHYSICAL. If you are using VMRC_DB_FILE to represent a CD-ROM or floppy device with a file backing, the physical key must be the absolute file path.
|
|
|
|
|
If the call to connectDevice() is successful, the VMRC browser plug-in generates an
onDeviceStateChange() event. If the call is unsuccessful, the VMRC browser plug-in throws an exception.
You use the disconnectDevice() method to disconnect a physical client device from the currently connected virtual machine. You must have an active connection to use the
disconnectDevice() method. For non-USB devices, you must specify the virtual device key of the remote virtual device to disconnect. For USB devices, you must specify the physical device key of the physical client device to disconnect.
|
|
|
deviceKey (string); The identifier of the device to disconnect. For non-USB devices, this must be the virtual key of the virtual device on the target virtual machine. For USB devices, this must be the physical key of the physical client device.
|
|
|
|
|
If the call to disconnectDevice() is successful, the VMRC browser plug-in generates an
onDeviceStateChange() event. If the call is unsuccessful, the VMRC browser plug-in throws an exception.