![]() |
#1 |
Junior Member
Join Date: Aug 2012
Posts: 3
|
SHOUTcast Transcoder AJAX api
My server is up and streaming no problem, but I do have a gap in my knowledge about the transcoder api. Correct me if I am wrong, but I am assuming to POST to the api you simply create a URL something like:
http://local_ip ![]() or something like that. Could you correct my syntax as I am in out of my depth here and I think I am missing something important in the form of the URL. I know to use the port that is configured in section 3.1 of trans conf, but I am unsure of the rest of it. I can successfully use URLs such as: http://local_ip ![]() That one works great. I am just unsure how to format the api URL. Thanks |
![]() |
![]() |
![]() |
#2 |
Junior Member
Join Date: Aug 2012
Posts: 3
|
Okay, that's too funny. It changed all my typing of "colon p" to a smiley that sticks out it's tongue. Let's try:
http://local_ip:4444/api?op="getstatus"&seq=45 and http://local_ip:4444/rotatelogs as my examples. Now just to be clear, the local_ip:4444 are replaced with my server info. I am just using these as examples here. |
![]() |
![]() |
![]() |
#3 |
Forum King
|
The examples you provided above are "GET"s, not "POST"s. If you want to use "POST" with the XMLHTTPRequest(AJAX) object in the browser, you need to specify it. It requires more coding using "POST" than "GET".
I found an example from a Google search: http://www.openjs.com/articles/ajax_...using_post.php |
![]() |
![]() |
![]() |
#4 |
Junior Member
Join Date: Aug 2012
Posts: 3
|
Wow. Lot's of reading for me as this is new, but very exciting.
So what is referred to in the documents as the api page then? If I go to http://local_ip:4444/api nothing is displayed and the log says timeout waiting for password. (again I am using stand-ins for the actual IP and port #) |
![]() |
![]() |
![]() |
#5 |
Join Date: Sep 2003
Posts: 27,873
|
nothing will be displayed when accessing the /api url directly - it's not like /rotatelogs and other 'api' methogs.
the documentation is weak for /api since it's just low down on my todo list (as sc_trans tends to be). the best thing is to get an older version of the sc_trans installer with the 'testui' folder and use that (which was removed since it was buggy and unsupported but it shows enough in most cases for how to use the sc_trans /api). -daz |
![]() |
![]() |
![]() |
|
Tags |
ajax, api, shoutcast, transcoder |
Thread Tools | Search this Thread |
Display Modes | |
|
|