Kodi Community Forum
JSOn Fullscreen Toggle - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93)
+---- Forum: JSON-RPC (https://forum.kodi.tv/forumdisplay.php?fid=174)
+---- Thread: JSOn Fullscreen Toggle (/showthread.php?tid=191716)



JSOn Fullscreen Toggle - erolosty - 2014-04-08

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

Thanks,
Losty


RE: JSOn Fullscreen Toggle - Montellese - 2014-04-08

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.


RE: JSOn Fullscreen Toggle - erolosty - 2014-04-09

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:

{"id":"folkrule","jsonrpc":"2.0","result":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"}


RE: JSOn Fullscreen Toggle - Montellese - 2014-04-09

Your options are
Code:
"fullscreen": true
"fullscreen": false
"fullscreen": "toggle"
Could you give the "toggle" a go to see if that works?


RE: JSOn Fullscreen Toggle - erolosty - 2014-04-09

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,
Losty


RE: JSOn Fullscreen Toggle - axa88 - 2016-08-26

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...

sent:
{"jsonrpc":"2.0","method":"GUI.SetFullscreen","params":{"fullscreen":"toggle"},"id":"88"}

response:
{"id":"88","jsonrpc":"2.0","result":false}


RE: JSOn Fullscreen Toggle - digiltd - 2017-03-09

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.

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