Fake Theta API Testing it Out

Hey everyone! I am contributing to theta360developers/theta-javascript. I’ve found a limitation that people should be aware of when using the Fake Theta API.

Currently, it seems to me that any wrong inputs do not display errors, or I am not getting any console errors from the Fake Theta API. This makes it a little more difficult to test if I am using the API correctly.

While working on Video Stitching I wanted to test if I was using setOptions correctly and I’ve found that the response is showing that the command executed correctly even though I inserted an incorrect value.

Example Code

const body = {'name': 'camera.setOptions',
              "parameters": {
                "options": {
                    "WrongInput4321": "AnotherWrongValue"
        }   
    }
}

const response = await fetch('https://fake-theta.vercel.app/osc/commands/execute', 
	{method: 'POST', 
	body: JSON.stringify(body),
	headers: {'Content-Type': 'application/json'}
});

const data =  await response.json();

console.log(data);

Response

{ name: 'camera.setOptions', state: 'done' }

I’m going to keep on creating more examples and gather more information about the API so I’ll update this post if I learn any new information.

Update #1

It seems like the Fake Theta API can not switch it’s capture mode to video, so any commands that are only enabled in video mode can’t be tested thoroughly.

Hey everyone, I finished a JavaScript example for videoStitching, make sure to be in Video Mode otherwise the option won’t work. videoStitching is tested and works with the Real Theta Camera. If you want to see the Fake Theta API in action you can see it here fake-theta/options/videoStitching.js. I will update this post to include a link to the Real Theta API and show results.

Link is blank