Kodi Community Forum

Full Version: JSOn Fullscreen Toggle
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Can anyone tell me why this isn't setting the app to be fullscreen?

curl -u $username:$password --data-binary '{ "jsonrpc": "2.0", "method": "GUI.SetFullscreen", "params": {"fullscreen": true }, "id": "folkrule"}' -H 'content-type: application/json;' http://$hostport/jsonrpc

The below works fine:

curl -u $username:$password --data-binary '{ "jsonrpc": "2.0", "method": "VideoLibrary.Scan", "id": "folkrule"}' -H 'content-type: application/json;' http://$hostport/jsonrpc

It would be useful to see the response you are getting. And a Debug log (wiki) of XBMC while you do the request would help as well.
04:04:41 T:140395065358080 DEBUG: Thread JobWorker 140395065358080 terminating (autodelete)
04:04:41 T:140395728021248 DEBUG: Thread JobWorker 140395728021248 terminating (autodelete)
04:04:41 T:140395090536192 DEBUG: Thread JobWorker 140395090536192 terminating (autodelete)
04:04:41 T:140395181926144 DEBUG: Thread JobWorker 140395181926144 terminating (autodelete)
04:04:41 T:140396478334912 DEBUG: SECTION:UnloadDelayed(DLL: special://xbmcbin/system/ImageLib-x86_64-linux.so)
04:04:41 T:140396478334912 DEBUG: Unloading: ImageLib-x86_64-linux.so
04:04:43 T:140395181926144 DEBUG: webserver: request received for /jsonrpc
04:04:44 T:140396143277824 DEBUG: CecLogMessage - unregistering all CEC clients

Is all that shows up in the debug log, the response i get returns false:


The output I get if i mess around seems to lead me to believe i could POST a string instead of a boolean true, but when I wrap true in quotes i get:

{"error":{"code":-32602,"data":{"method":"GUI.SetFullscreen","stack":{"message":"Received value does not match any of the union type definitions","name":"fullscreen","type":["string","boolean"]}},"message":"Invalid params."},"id":"folkrule","jsonrpc":"2.0"}
Your options are
"fullscreen": true
"fullscreen": false
"fullscreen": "toggle"
Could you give the "toggle" a go to see if that works?
Thanks a lot Montellese, true, false and toggle, all work as expected. I actually wanted to use the "other" full screen (backslash key) - that's why I didn't see it working for me. It would be good if json rpc supported the fulcrum window option, and I could query it's state exactly as I can do with full window video.

However I've got most of what I need through the event sever.

Thanks again,
why might this not t this work for me...

i get a response to a valid toggle command, but the result is always the same, with the widow doing nothing...


GUI.SetFullscreen is not togglefullscreen

Took a while for this to click for me. But GUI.SetFullscreen is not going to toggle the application window fullscreen, it just toggles the Kodi interface (menus etc) over what is playing.

You need to use Input.ExecuteAction if you want to toggle between windowed and fullscreen mode.

{"jsonrpc": "2.0", "method": "Input.ExecuteAction", "params": {"action":"togglefullscreen"}}