Yup, documentation is a little bit scarce... Right now my HTML template code looks like this (the {{ variables }} are being filled by the web framework I'm using).
<link re...
See more...
Yup, documentation is a little bit scarce... Right now my HTML template code looks like this (the {{ variables }} are being filled by the web framework I'm using).
<link rel="stylesheet" type="text/css" href="https://communities.vmware.com/static/css/wmks-all.css" />
<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.16/jquery-ui.min.js"></script>
<script type="text/javascript" src="/static/js/wmks.js" type="text/javascript"></script>
<a href="javascript:void(wmks.sendKeyCodes([17,18,46]))">send Ctrl+Alt+Del</a>
//
<a onClick="goFullScreen()" href="#">go full screen</a>
//
<a href="javascript:void(disconnect())">disconnect</a>
//
<a href="javascript:void(wkms.showKeyboard())">show keyboard</a>
//
<a href="javascript:void(wkms.hideKeyboard())">hide keyboard</a>
<div id="wmksContainer" style="position:absolute; width:800px; height:600px;"/>
<script>
function goFullScreen() {
wmks.enterFullScreen();
wmks.setRemoteScreenSize(screen.height, screen.height);
wmks.updateScreen();
}
function disconnect() {
wmks.disconnect();
wmks.destroy();
}
</script>
<script>
var wmks = WMKS.createWMKS("wmksContainer",
{
enableUint8Utf8: true,
{# changeResolution: false,#}
{# enableVVC: false,#}
VCDProxyHandshakeVmxPath: "{{ vmx }}",
});
console.log(wmks.getConnectionState());
wmks.register(WMKS.CONST.Events.CONNECTION_STATE_CHANGE,
function(event,data){
if(data.state == WMKS.CONST.ConnectionState.CONNECTED){
console.log("connection state change : connected");
}
}
);
wmks.register(WMKS.CONST.Events.ERROR,
function(event,data){
console.log("PLAF");
}
);
wmks.connect("{{ vmware_link }}");
console.log(wmks.getConnectionState());
window.onbeforeunload = function(){
wmks.disconnect();
};
</script >
It's working more or less OK, although Windows is not changing it's resolution when going full screen. Also, the mobile devices are not showing the keyboard when pressing the link... Cheers.