1
0
Fork 0
forked from mirror/pixelfed

Update LiveStream model

This commit is contained in:
Daniel Supernault 2022-06-09 00:14:40 -06:00
parent feecc06c2a
commit 7c8f76438b
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -22,6 +22,21 @@ class LiveStream extends Model
$host = config('livestreaming.server.host'); $host = config('livestreaming.server.host');
$port = ':' . config('livestreaming.server.port'); $port = ':' . config('livestreaming.server.port');
$path = '/' . config('livestreaming.server.path') . '?'; $path = '/' . config('livestreaming.server.path') . '?';
$query = http_build_query([
'name' => $this->stream_id,
'key' => $this->stream_key,
'ts' => time()
]);
return $proto . $host . $port . $path . $query;
}
public function getStreamRtmpUrl()
{
$proto = 'rtmp://';
$host = config('livestreaming.server.host');
$port = ':' . config('livestreaming.server.port');
$path = '/' . config('livestreaming.server.path') . '/'. $this->stream_id . '?';
$query = http_build_query([ $query = http_build_query([
'key' => $this->stream_key, 'key' => $this->stream_key,
'ts' => time() 'ts' => time()