Hi,
I am currently working on a lg app, using a lg tv with the proper webcam and microphone plugged into the usb port and usb type while working in developer mode. Whenever I try to make any calls using the api calls for camera2, from com.webos.service.camera2 | webOS Open Source Edition and running dev mode on my tv while trying to use both the webOSTV-dev.js and/or webOSTV.js files in my project, I am consistently returned the following:
``
Camera List Response:
1. {returnValue: false, errorCode: -1, errorText: "Denied method call "getCameraList" for category "/""}
1. returnValue: false
2. errorCode: -1
3. errorText: "Denied method call "getCameraList" for category "/""
4. __proto__: Object
I have properly set up an appinfo.json file as well as a service.json file, and am using the WebOSServiceBridge() WebOSServiceBridge API Reference | webOS Open Source Edition as recommended. I have also set up all my functions as recommended.
ex:
function fetchCameraList() {
const bridge = new WebOSServiceBridge();
bridge.onservicecallback = function (response) {
const parsedResponse = JSON.parse(response);
console.log("Camera List Response:", parsedResponse);
if (parsedResponse.returnValue && parsedResponse.deviceList) {
console.log(
"Available Cameras: " +
parsedResponse.deviceList.map((d) => d.id).join(", ")
);
} else {
console.log("No cameras available.");
}
};
bridge.call(
`luna://com.webos.service.camera2/getCameraList`,
JSON.stringify({})
);
}
I have gone through all the documentation numerous times and can't figure out why. Can someone please explain to me why I am getting the current response I am receiving? And also how I may get proper access/ability to be able to make the proper api calls?
Thank you