diff options
-rwxr-xr-x | bin/jsonapi.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/bin/jsonapi.php b/bin/jsonapi.php index a8aa82e..10040cb 100755 --- a/bin/jsonapi.php +++ b/bin/jsonapi.php @@ -68,7 +68,7 @@ function startBroadcast($type, $url, $mode) { $ret = array(); - $ret['session'] = sessioncreate($type, $url, $mode); + $ret['session'] = substr(sessioncreate($type, $url, $mode), strlen("session")); return json_encode($ret); } @@ -77,7 +77,7 @@ function stopBroadcast($session) { $ret = array(); - $ret = sessiondelete($session); + $ret = sessiondelete("session" .$session); return json_encode($ret); } @@ -86,14 +86,16 @@ function getStreamInfo($session) { $ret = array(); - $ret['stream'] = sessiongetinfo($session); + $info = sessiongetinfo("session" .$session); + $info['session'] = substr($info['session'], strlen("session")); + $ret['stream'] = $info; return json_encode($ret); } function getStreamStatus($session) { - $ret = sessiongetstatus($session); + $ret = sessiongetstatus("session" .$session); return json_encode($ret); } |