mirror of
https://github.com/r4sas/recastin-panel
synced 2025-08-31 16:02:07 +00:00
Fixed stream events
This commit is contained in:
parent
2851620f40
commit
d30b5ba234
@ -103,9 +103,9 @@ class Events extends Controller
|
||||
*/
|
||||
private function getStreamByRequest(array $data): ?Streams
|
||||
{
|
||||
$streamId = explode('_', $data['app'])[1];
|
||||
$streamName = explode('/', $data['app'])[1];
|
||||
|
||||
$stream = $this->repository->find($streamId);
|
||||
$stream = $this->repository->findOneBy(['name' => $streamName]);
|
||||
|
||||
if ($stream !== null && $stream->getStreamKey() === $data['name']) {
|
||||
return $stream;
|
||||
|
@ -73,7 +73,7 @@ class Streams extends Controller
|
||||
|
||||
$host = parse_url($this->container->getParameter('appHost'), PHP_URL_HOST);
|
||||
$data = $stream->jsonSerialize();
|
||||
$data['streamUrl'] = sprintf('rtmp://%s/%s', $host, $stream->getUser()->getUsername() . '_' . $stream->getName());
|
||||
$data['streamUrl'] = sprintf('rtmp://%s/%s', $host, $stream->getUser()->getUsername() . '/' . $stream->getName());
|
||||
|
||||
return new JsonResponse($data);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user