public function drop($control_url, $app, $name, $type = 'publisher', $addr = null, $clientid = null, $srv = null)
    {
        $query = [];
        $query['app'] = $app;
        $query['name'] = $name;

        if ($addr) {
            $query['addr'] = $addr;
        }
        if ($clientid) {
            $query['clientid'] = $clientid;
        }
        if ($srv) {
            $query['srv'] = $srv;
        }

        $client = new Client();
        try {
            $response = $client->request(
                'GET',
                $url .'/control/drop/'.$type,
                [
                    'query' => $query
                ]
            );
        } catch (RequestException $e) {
            return false;
        }
        catch (Exception $e) {
            return false;
        }

        return true;
    }
public function drop($control_url, $app, $name, $type = 'publisher', $addr = null, $clientid = null, $srv = null)
    {
        $query = [];
        $query['app'] = $app;
        $query['name'] = $name;

        if ($addr) {
            $query['addr'] = $addr;
        }
        if ($clientid) {
            $query['clientid'] = $clientid;
        }
        if ($srv) {
            $query['srv'] = $srv;
        }

        $client = new Client();
        try {
            $response = $client->request(
                'GET',
                $url .'/control/drop/'.$type,
                [
                    'query' => $query
                ]
            );
        } catch (RequestException $e) {
            return false;
        }
        catch (Exception $e) {
            return false;
        }

        return true;
    }
public function drop ( $ control_url , $ app , $ name , $ type = 'publisher' , $ addr = null , $ clientid = null , $ srv = null ) { $ query = [ ] ; $ query [ 'app' ] = $ app ; $ query [ 'name' ] = $ name ; if ( $ addr ) { $ query [ 'addr' ] = $ addr ; } if ( $ clientid ) { $ query [ 'clientid' ] = $ clientid ; } if ( $ srv ) { $ query [ 'srv' ] = $ srv ; } $ client = new Client ( ) ; try { $ response = $ client -> request ( 'GET' , $ url . '/control/drop/' . $ type , [ 'query' => $ query ] ) ; } catch ( RequestException $ e ) { return false ; } catch ( Exception $ e ) { return false ; } return true ; }
send a drop command to the rtmp server
@var app the app name
@var name the streamkey
@var type the type for your drop command publisher|subscriber|client
@var addr the optional client adress
@var clientId the optional nginx client id
@var srv optional server{} block number within rtmp{} block. default the first is used (nginx rtmp)
send a drop command to the rtmp server