JSOn Fullscreen Toggle

  Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
erolosty Offline
Junior Member
Posts: 27
Joined: Nov 2010
Reputation: 0
Post: #1
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
find quote
Montellese Offline
Team Kodi Developer
Posts: 4,804
Joined: Jan 2009
Reputation: 66
Location: Switzerland
Post: #2
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.

Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
find quote
erolosty Offline
Junior Member
Posts: 27
Joined: Nov 2010
Reputation: 0
Post: #3
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"}
find quote
Montellese Offline
Team Kodi Developer
Posts: 4,804
Joined: Jan 2009
Reputation: 66
Location: Switzerland
Post: #4
Your options are
Code:
"fullscreen": true
"fullscreen": false
"fullscreen": "toggle"
Could you give the "toggle" a go to see if that works?

Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
find quote
erolosty Offline
Junior Member
Posts: 27
Joined: Nov 2010
Reputation: 0
Post: #5
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
find quote
axa88 Offline
Senior Member
Posts: 132
Joined: Mar 2015
Reputation: 5
Location: NY USA
Post: #6
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}
find quote
digiltd Offline
Senior Member
Posts: 103
Joined: Feb 2015
Reputation: 4
Location: London UK
Post: #7
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"}}
find quote