Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using blobs properly #332

Closed
davePawww opened this issue Jan 13, 2025 · 0 comments
Closed

using blobs properly #332

davePawww opened this issue Jan 13, 2025 · 0 comments

Comments

@davePawww
Copy link

davePawww commented Jan 13, 2025

I have a cdn that is being passed to Video component
and it works fine. However, I wanted to create a blob url so I can mask the actual cdn link I am using so users won't be able to go to dev tools -> get the cdn link -> download the video.

  useEffect(() => {
    const vidLink = async () => {
      let blobUrl: string;
      if (activeVideo) {
        const blob = await getVideoUrl(activeVideo.videoUrl);
        blobUrl = URL.createObjectURL(blob) + "#" + activeVideo?.id;
        setVideoUrl(blobUrl);
      }
    };

    vidLink();

    return () => {
      URL.revokeObjectURL(blobUrl);
    };
  }, [activeVideo]);

I tested the code above on small videos 5-10mins and it was working fine. However when I try to use the actual videos I need 2-3hrs, the video loads significantly longer and I could see that the json files aren't being created in videos/ directory, instead there was a folder blob:https// directory that is being created.

@muxinc muxinc locked and limited conversation to collaborators Jan 29, 2025
@luwes luwes converted this issue into discussion #339 Jan 29, 2025

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant