jscall() cannot call js functions from xml file
Error Thrown: jscall() - calling Javascript "videocall()" failed: ReferenceError: videocall is not defined
This a bizarre problem considering my embedpano({}) call sits right next to the functions I want called. I even reference the jsfile inside the embed. Check it out.
File Name: webvrCtrl.js
embedpano({swf:"../../krpano/krpano.swf", html5:"prefer", initvars:{panoId:singleResponse.data.id} , xml:"../../krpano/krpano.xml", js:"webvrCtrl.js", target:"spherekrpano" , onready:krpanoReady});
//videocall() not called
function videocall()
{
krpano = document.getElementById("krpanoReady");
krpano.call("plugin[video].playvideo(/panorama/77/video-1920x960.mp4); ");
console.log('videocall() called');
}
//onready:krpanoReady is Called but videocall() is Not
function krpanoReady()
{
krpano.call("set(hotspot[panoThumbnail].onclick, jscall('videocall()'););");
console.log("I'm working right now.");
}
Yet every time I onclick the hotspot[panoThumbnail] that I set() to have 'videocall(), I get the error:jscall() - calling Javascript "videocall()" failed: ReferenceError: videocall is not defined