Memphiz / xbmc

XBMC Main Repository
http://xbmc.org
Other
55 stars 18 forks source link

[JSON]Add Player.SetViewMode and Player.GetViewMode methods #54

Closed DaveTBlake closed 5 years ago

DaveTBlake commented 5 years ago

@Memphiz my take on doing this. It gives the JSON API interface similar limits and control as that available via playercontroller (via Python or event server).

Example JSON calls

Normal mode
{"id":1,"jsonrpc":"2.0","method":"Player.SetViewMode","params":{"viewmode": "normal"}}
Zoom 110 width
{"id":1,"jsonrpc":"2.0","method":"Player.SetViewMode","params":{"viewmode": "zoom110width"}}
Custom with zoom and vertical shift
{"id":1,"jsonrpc":"2.0","method":"Player.SetViewMode","params":{"viewmode": {"zoom": 1.6, "verticalshift": 0.5}}}
Custom with pixel ratio
{"id":1,"jsonrpc":"2.0","method":"Player.SetViewMode","params":{"viewmode": {"pixelratio": 1.01}}}
Step change zoom 
{"id":1,"jsonrpc":"2.0","method":"Player.SetViewMode","params":{"viewmode": {"zoom": "increase"}}}
Memphiz commented 5 years ago

That won‘t work - you should have done the PR against the branch I did my PR with - not against my pretty outdated master branch . Will cherry pick to my PR later then. Thx for doing this :)

DaveTBlake commented 5 years ago

Sorry for PR agianst wrong thing, my Git knowledge is very basic, just enough to get by. But the JSON schema part is right :)