Closed pointnet closed 8 years ago
Hi,
I tested with the latest XBC release (2.7.1602.2220) and it is working fine for me.
There are two possibilities here:
XjsEx.dll
properly? Try dll.load(['Scriptdlls\\SplitMediaLabs\\xjsEx.dll']);
xsplit.Write
call: dll.callEx('xsplit.Write', 'C:\\test.txt', 'data', '0', '1')
Let me know how it goes.
I also got the same issue when I forgot to specify all of the parameters for xsplit.Write
.
ie. dll.callEx('xsplit.Write', 'C:\\test.txt', 'text');
will not work.
You should specify the value of the other two parameter: overwrite flag and type
dll.callEx('xsplit.Write', 'path\\to\\filename', 'data', 'overwriteflag (0 or 1)', 'type (values 1 ~ 3)')
.
more details is in our tutorials (http://xjsframework.github.io/tutorials.html#/dll) :)
Perfect guys ! Maybe you can update the documentation because it specifies that return values are strings but not parameters, it might be more clear. Here's a working sample to download a file that you might also include:
(function() {
'use strict';
/**
* Hi! Thanks for using XSplit JS Framework :)
*
* XSplit JS Framework exposes useful methods to work with XSplit without
* fiddling too much with the raw core methods exposed to JavaScript, which
* makes developing plugins for XSplit a lot easier.
*
* To get started, you just have to require our library:
* var xjs = require('xjs');
*
* You can read more about it at our documentation:
* http://xjsframework.github.io/quickstart.html
* http://xjsframework.github.io/tutorials.html
* http://xjsframework.github.io/api.html
*/
var xjs = require('xjs');
var IO = xjs.IO;
var dll = xjs.Dll;
xjs.ready().then(function() {
dll.isAccessGranted().then(function(isAccessGranted) {
if (isAccessGranted) {
process();
}
});
dll.on('access-granted', function() {
process();
});
dll.load(['Scriptdlls\\SplitMediaLabs\\XjsEx.dll']);
var process = function() {
IO.getWebContent('http://xjsframework.github.io/assets/img_logo_nav.png').then(function(base64Content) {
dll.callEx('xsplit.Write', 'C:\\test.png', base64Content, '1', '3').then(function(val) {
alert('File writed!');
}).catch(function() { alert(arguments[0]); });
});
};
});
})();
Thanks!
I'm having issues playing around with XjsEx.dll
I always catch a "DLL call not accessible" when trying to use
callEx
withxsplit.Write
.I tried to disable script security checks in advanced settings, launched XBC as administrator etc
Any idea ?