src/interfaces/recordings.php
public function live($action = NULL, $recordingName = NULL)
        {
            try {

                $uri = "/recordings/live";

                if (is_null($action))
                    throw new Exception("action not specified or is null", 503);

                switch ($action) {
                    case "show":
                        $uri .= (!is_null($recordingName)) ? "/" . $recordingName : "";
                        $result = $this->pestObject->get($uri);
                        break;
                    default:
                        if (is_null($recordingName))
                            throw new Exception("recording name not specified or is null", 503);

                        $uri = "/recordings/live/" . $recordingName;
						$postData = array();

                        switch ($action) {
                            case "start":
                                throw new Exception("Starting a recording is done via channels interface - have you forgotten?", 503);
                                break;
                            case "stop":
                                $uri .= "/stop";
                                $result = $this->pestObject->post($uri, $postData);
                                break;
                            case "discard":
                                $result = $this->pestObject->delete($uri);
                                break;
                            case "pause":
                                $uri .= "/pause";
                                $result = $this->pestObject->post($uri, $postData);
                                break;
                            case "unpause":
                                $uri .= "/pause";
                                $result = $this->pestObject->delete($uri);
                                break;
                            case "mute":
                                $uri .= "/mute";
                                $result = $this->pestObject->post($uri, $postData);
                                break;
                            case "unmute":
                                $uri .= "/mute";
                                $result = $this->pestObject->delete($uri);
                                break;
                            default:
                                throw new Exception("unknown action specified", 503);
                                break;
                        }
                        break;
                }

                return $result;

            } catch (Exception $e) {
                $this->phpariObject->lasterror = $e->getMessage();
                $this->phpariObject->lasttrace = $e->getTraceAsString();

                return FALSE;
            }
        }
public function live($action = NULL, $recordingName = NULL)
        {
            try {

                $uri = "/recordings/live";

                if (is_null($action))
                    throw new Exception("action not specified or is null", 503);

                switch ($action) {
                    case "show":
                        $uri .= (!is_null($recordingName)) ? "/" . $recordingName : "";
                        $result = $this->pestObject->get($uri);
                        break;
                    default:
                        if (is_null($recordingName))
                            throw new Exception("recording name not specified or is null", 503);

                        $uri = "/recordings/live/" . $recordingName;
						$postData = array();

                        switch ($action) {
                            case "start":
                                throw new Exception("Starting a recording is done via channels interface - have you forgotten?", 503);
                                break;
                            case "stop":
                                $uri .= "/stop";
                                $result = $this->pestObject->post($uri, $postData);
                                break;
                            case "discard":
                                $result = $this->pestObject->delete($uri);
                                break;
                            case "pause":
                                $uri .= "/pause";
                                $result = $this->pestObject->post($uri, $postData);
                                break;
                            case "unpause":
                                $uri .= "/pause";
                                $result = $this->pestObject->delete($uri);
                                break;
                            case "mute":
                                $uri .= "/mute";
                                $result = $this->pestObject->post($uri, $postData);
                                break;
                            case "unmute":
                                $uri .= "/mute";
                                $result = $this->pestObject->delete($uri);
                                break;
                            default:
                                throw new Exception("unknown action specified", 503);
                                break;
                        }
                        break;
                }

                return $result;

            } catch (Exception $e) {
                $this->phpariObject->lasterror = $e->getMessage();
                $this->phpariObject->lasttrace = $e->getTraceAsString();

                return FALSE;
            }
        }
public function live ( $ action = NULL , $ recordingName = NULL ) { try { $ uri = "/recordings/live" ; if ( is_null ( $ action ) ) throw new Exception ( "action not specified or is null" , 503 ) ; switch ( $ action ) { case "show" : $ uri .= ( ! is_null ( $ recordingName ) ) ? "/" . $ recordingName : "" ; $ result = $ this -> pestObject -> get ( $ uri ) ; break ; default : if ( is_null ( $ recordingName ) ) throw new Exception ( "recording name not specified or is null" , 503 ) ; $ uri = "/recordings/live/" . $ recordingName ; $ postData = array ( ) ; switch ( $ action ) { case "start" : throw new Exception ( "Starting a recording is done via channels interface - have you forgotten?" , 503 ) ; break ; case "stop" : $ uri .= "/stop" ; $ result = $ this -> pestObject -> post ( $ uri , $ postData ) ; break ; case "discard" : $ result = $ this -> pestObject -> delete ( $ uri ) ; break ; case "pause" : $ uri .= "/pause" ; $ result = $ this -> pestObject -> post ( $ uri , $ postData ) ; break ; case "unpause" : $ uri .= "/pause" ; $ result = $ this -> pestObject -> delete ( $ uri ) ; break ; case "mute" : $ uri .= "/mute" ; $ result = $ this -> pestObject -> post ( $ uri , $ postData ) ; break ; case "unmute" : $ uri .= "/mute" ; $ result = $ this -> pestObject -> delete ( $ uri ) ; break ; default : throw new Exception ( "unknown action specified" , 503 ) ; break ; } break ; } return $ result ; } catch ( Exception $ e ) { $ this -> phpariObject -> lasterror = $ e -> getMessage ( ) ; $ this -> phpariObject -> lasttrace = $ e -> getTraceAsString ( ) ; return FALSE ; } }
Perform actions on live recordings. Start, Stop, Pause, Unpause, Mute, Unmute

@param null $action
@param null $recordingName

@return mixed
Perform actions on live recordings . Start Stop Pause Unpause Mute Unmute