Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Fix password protected videos in embed

Chocobozzz64baa00edf16
diff --git a/client/src/standalone/videos/shared/video-fetcher.ts b/client/src/standalone/videos/shared/video-fetcher.ts
index 862a55ebcc..80769d0219 100644
--- a/client/src/standalone/videos/shared/video-fetcher.ts
+++ b/client/src/standalone/videos/shared/video-fetcher.ts
@@ -27,10 +27,12 @@ export class VideoFetcher {
if (videoResponse?.status === HttpStatusCode.NOT_FOUND_404) {
throw new Error('This video does not exist.')
}
- if (videoResponse?.status === HttpStatusCode.FORBIDDEN_403) {
+
+ if (videoResponse?.status === HttpStatusCode.UNAUTHORIZED_401) {
const res = await videoResponse.json()
throw new PeerTubeServerError(res.message || res.detail, res.code)
}
+
throw new Error('We cannot fetch the video. Please try again later.')
}