Posts: 13
Joined: Dec 2011
Reputation:
0
belese
Junior Member
Posts: 13
2016-04-26, 15:43
(This post was last modified: 2016-04-26, 20:42 by belese.)
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
Posts: 3,077
Joined: Jun 2009
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.
Posts: 13
Joined: Dec 2011
Reputation:
0
belese
Junior Member
Posts: 13
2016-04-27, 14:21
(This post was last modified: 2016-04-28, 11:26 by belese.)
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
Posts: 2
Joined: Sep 2014
Reputation:
0
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