Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mux Uploader Server Component #913

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Apr 25, 2024

  1. Mux Uploader Server Component

    ## How it works
    ### Defaults
    If no `endpoint` is specified, will use `@mux/mux-node` to create a direct upload with the following configuration:
    ```ts
    {
      cors_origin: '*',
      new_asset_settings: {
        playback_policy: ['public'],
        encoding_tier: 'baseline',
    }
    ```
    ### How to configure
    Accepts all the same params as Mux Uploader, as well as
    ```ts
    interface MuxUploaderServerProps extends MuxUploaderProps {
      clientOptions?: ClientOptions;
      uploadCreateParams?: Partial<Mux.Video.Uploads.UploadCreateParams>;
      uploadRequestOptions?: Partial<Mux.RequestOptions>;
    }
    ```
    `uploadCreateParams` will be deep-merged with the default options described above
    
    ## TODO items:
    - [ ] get some feedback
    - [ ] answer some questions 馃憞
    - [ ] documentation
    
    ## Outstanding questions:
    for those of you who know esbuild and bundlers better than I do:
    - [ ] why is @mux/mux-uploader-react/rsc giving me a red squiggle in the nextjs example? why can't typescript find it?
    - [ ] is it correct to external:server-only even though it's not a peer dependency?
    decepulis committed Apr 25, 2024
    Configuration menu
    Copy the full SHA
    fa968c6 View commit details
    Browse the repository at this point in the history