playto dlna player with json
#1
Hello,

i'm running a pi headless, with a nfc reader,
when i put some nfc tag,i want to start a video on a dlna renderer (smart tv)

is it a way to know if a remote dlna player is present, and launch a video on that player instead of kodi video player with Json or maybe python api?

When i look at JSON-API,
player_id could be a remote player?
if yes, how can i get that id?

Thanks

Belese
Reply
#2
Player.GetPlayers
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.
Reply
#3
Be aware that this API changes with Kodi 17 (names instead of IDS)

And that you can't control the playback after from JSON, only event server can stop / pause media.
Reply
#4
Thanks both for yours answers,

for others, as it's not documented (or don't find it):

xbmc.Player.getPlayers()

return

{'jsonrpc': '2.0', 'id': 51, 'result': [{'name': 'DVDPlayer', 'playercoreid': 1, 'playsvideo': True, 'playsaudio': True, 'type': 'internal'}, {'name': 'PAPlayer', 'playercoreid': 3, 'playsvideo': False, 'playsaudio': True, 'type': 'internal'}, {'name': '[TV]Samsung LED32', 'playercoreid': 4, 'playsvideo': True, 'playsaudio': True, 'type': 'remote'}]}

and

Player.Open use "playercoreid" and not "playerid" like others Player calls

an example :

Player.Open({"item":{"directory":"/home/xbian/Mediatheque/Musique/Hot"},"options":{"playercoreid":4}})

to control playback, as i only need stop, i'll try to open a fake file as workaround, not the best way, but should stop the current playback,
or if i understand right, with event server i should be able to control play/pause even on remote player?

probably look at that too


EDIT :

to control dlna remote player with Json, as Tolriq explain, Namespace Player won't work, but to continue in Json,
i use
Input.ExecuteAction({"action":"skipnext"})

and you can control to remote player

Belese
Reply
#5
belese > have you been able to play a video on the remote player?

I have my playercoreid but when I call Player.Open with it, nothing happens: the video is not played into Kobi nor in the remote player.

Any help will be appreciated!

Thanks
Reply

Logout Mark Read Team Forum Stats Members Help
playto dlna player with json0