1
0
mirror of https://github.com/r4sas/recastin-panel synced 2025-08-31 07:52:13 +00:00

Use stream name as nginx application name, fixes #1

This commit is contained in:
Shyim 2018-04-25 20:44:52 +02:00
parent 72383abbe3
commit d0dce24305
2 changed files with 2 additions and 2 deletions

View File

@ -95,7 +95,7 @@ rtmp {
$configPush[] = "\t\t\tpush " . $this->buildUrl($endpoint) . ';';
}
$applicationName = sprintf('%s_%s', $stream->getUser()->getUsername(), $stream->getId());
$applicationName = sprintf('%s/%s', $stream->getUser()->getUsername(), $stream->getName());
$vhost .= sprintf(self::VHOST, $applicationName, implode("\n", $configPush));
}
}

View File

@ -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->getId());
$data['streamUrl'] = sprintf('rtmp://%s/%s', $host, $stream->getUser()->getUsername() . '_' . $stream->getName());
return new JsonResponse($data);
}