129
In the next example you could see how to obtain the player stats and how to parse it using cjson library.
output
{"title":"The White Stripes - Seven Nation Army","counter":"52:52","txtSource":"NET","status":1,"SourceList":
["","MMC","USB","DLNA","AIRPLAY","rock
alternativo"],"source":5,"preset":1,"volume":100,"txtVolume":"0dB","stereo":1,"repeat":2,"playmode":0,"fade":1,"
bootpreset1":0,"sp":1,"bitrate":"192","duration":"--:--","freq":"44.1","playlist_index":" 0001 /
0001","playlist_url":"mmc://radiobob-alternativerock-mp3-hq?
sABC=5n6s2sr8%230%23no8617362n29q2o435p17n54928n16s5%23gharva&amsparams=playerid:tunein;skey:15
17236200","priority":""}
SourceList[3]=USB
Function:
Description:
Add next playlist item. Using this function you can compose your own playlist. In order to do a continous
play it is necessary to queue next item prior to the end of the current one.
Arguments:
urlNextElem
–
url of the item to add
Function:
Description:
Use this function to play priority sounds over the normal playlist. It apply
Return:
String
–
url of the priority element
Function:
Description:
If the player is paused or stopped use this function to start current loaded item reproduction, otherwise
the player is paused.
Function:
Description:
Use this function to stop the current player reproduction.
Function:
ep=ePLAYER1.new()
json_text=ep.PLAYER_getStats()
print(json_text)
cjson=require "cjson"
value=cjson.decode(json_text)
print(“SourceList[3]=” .. value.SourceList[3])
PLAYER_queue(urlNextElem)
PLAYER_priority(urlElemePriority)
PLAYER_play()
PLAYER_stop()
PLAYER_next()
require "ePLAYER1"
Summary of Contents for PLAYER ONE
Page 54: ...54 Figure 32 The action of loading and playing the specified stream is configured Figure 33 ...
Page 85: ...85 Figure 76 accessing the network configuration Figure 77 editing network parameters ...
Page 90: ...90 Figure 83 editing WiFi password ...
Page 95: ...95 A wireless connection to your WiFi network will be established Figure 88 ...
Page 112: ...112 In this example su hotels Figura 107 ...
Page 114: ...114 Figura 109 Copy from here To here ...
Page 118: ...118 THIRD PARTY CONTROL PROTOCOL PLAYER ONE JSON Commands USUER MANUAL ...
Page 153: ...HOW TO IDENTIFY INTERNET RADIO URL STREAMS 153 ...