stream_id}/index.m3u8"); return url($path); } public function getStreamServer() { $proto = 'rtmp://'; $host = config('livestreaming.server.host'); $port = ':' . config('livestreaming.server.port'); $path = '/' . config('livestreaming.server.path'); return $proto . $host . $port . $path; } public function getStreamKeyUrl() { $path = $this->getStreamServer() . '?'; $query = http_build_query([ 'name' => $this->stream_key, ]); return $path . $query; } public function getStreamRtmpUrl() { return $this->getStreamServer() . '/' . $this->stream_id; } }