Use https://github.com/slimphp/Slim/pull/1872 in order to support popen streams in Slim
This commit is contained in:
parent
fd3aa1d4aa
commit
3370695e9e
3 changed files with 49 additions and 116 deletions
|
@ -16,7 +16,7 @@ use Alltube\VideoDownload;
|
|||
use Alltube\Config;
|
||||
use Symfony\Component\Process\ProcessBuilder;
|
||||
use Chain\Chain;
|
||||
use ProcessStream\PopenStream;
|
||||
use Slim\Http\Stream;
|
||||
|
||||
/**
|
||||
* Main controller
|
||||
|
@ -200,7 +200,7 @@ class FrontController
|
|||
$chain->add('|', $avconvProc);
|
||||
}
|
||||
if ($request->isGet()) {
|
||||
$response = $response->withBody(new PopenStream($chain->getProcess()->getCommandLine()));
|
||||
$response = $response->withBody(new Stream(popen($chain->getProcess()->getCommandLine(), 'r')));
|
||||
}
|
||||
return $response;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue