public function getRecieveStream($id)
    {
        $deferred = new Deferred();

        if (isset($this->recieveStreams[$id])) {
            $deferred->resolve($this->recieveStreams[$id]);

            return $deferred->promise();
        }

        foreach ($this->speakingStatus as $status) {
            if ($status->user_id == $id) {
                $deferred->resolve($this->recieveStreams[$status->ssrc]);

                return $deferred->promise();
            }
        }

        $deferred->reject(new \Exception("Could not find a recieve stream with the ID \"{$id}\"."));

        return $deferred->promise();
    }
public function getRecieveStream($id)
    {
        $deferred = new Deferred();

        if (isset($this->recieveStreams[$id])) {
            $deferred->resolve($this->recieveStreams[$id]);

            return $deferred->promise();
        }

        foreach ($this->speakingStatus as $status) {
            if ($status->user_id == $id) {
                $deferred->resolve($this->recieveStreams[$status->ssrc]);

                return $deferred->promise();
            }
        }

        $deferred->reject(new \Exception("Could not find a recieve stream with the ID \"{$id}\"."));

        return $deferred->promise();
    }
public function getRecieveStream ( $ id ) { $ deferred = new Deferred ( ) ; if ( isset ( $ this -> recieveStreams [ $ id ] ) ) { $ deferred -> resolve ( $ this -> recieveStreams [ $ id ] ) ; return $ deferred -> promise ( ) ; } foreach ( $ this -> speakingStatus as $ status ) { if ( $ status -> user_id == $ id ) { $ deferred -> resolve ( $ this -> recieveStreams [ $ status -> ssrc ] ) ; return $ deferred -> promise ( ) ; } } $ deferred -> reject ( new \ Exception ( "Could not find a recieve stream with the ID \"{$id}\"." ) ) ; return $ deferred -> promise ( ) ; }
Gets a recieve voice stream.

@param int|string $id Either a SSRC or User ID.

@return React\Promise\Promise
Gets a recieve voice stream .