diff --git a/src/CloudflareStream.php b/src/CloudflareStream.php index 8738096..ee8cb52 100755 --- a/src/CloudflareStream.php +++ b/src/CloudflareStream.php @@ -248,6 +248,20 @@ public function fetchVideo(string $id): array return $this->http->get("{$this->baseUrl}/{$this->accountId}/stream/{$id}")->json(); } + /** + * Update video meta + * + * @param string $id + * @param array $meta + * @return array + */ + public function updateMeta(string $id, array $meta = []): array + { + return $this->http->post("{$this->baseUrl}/{$this->accountId}/stream/{$id}", [ + 'meta' => $meta + ])->json(); + } + /** * Clip a video * @@ -265,7 +279,7 @@ public function clip(string $id, array $options = []): array $payload = array_merge($payload, $options); } - return $this->http->post("{$this->baseUrl}/{$this->accountId}/stream/clip", $payload); + return $this->http->post("{$this->baseUrl}/{$this->accountId}/stream/clip", $payload)->json(); } /**