Discussions
How to use the request_url inside the video HTML element as src?
3 months ago by mona.entwicklung
When I send a POST request to the talks endpoint, I receive the following URL as the request_url:
I cannot directly use this URL as the src of the HTML element. How can I change my request so that the URL I receive is directly usable or at least tell me how to fetch the video from the URL and store it?
async uploadVideoFromUrl(requestUrl: string): Promise<string | void> {
try {
// Step 1: Fetch the video from the request URL
const response = await fetch(requestUrl);
const blob: Blob = await response.blob();
..............the rest of the code to extract the blob as mp4 and store it in the storage
}
But the fetch fails and exits the try block, and directly goes to the catch error.