Skip to content

Hide default capture sources whose output can never pass allowedFileTypes #340

Description

@BSalaeddin

In 3.1.0 the default sources are:

DEFAULT_SOURCES = ["camera", "local", "microphone", "screen", "url"]

(@upupjs/core/dist/internal.cjs)

v1's default surface was effectively local + url. After migrating one of our apps (which never passed a sources prop because the v1 default was fine), the widget suddenly showed camera / microphone / screen-record buttons. Their output (webm) wasn't in the app's allowedFileTypes, so a user could record a clip and then hit a validation dead end.

We fixed it with sources={['local', 'url']}, but it shipped as a regression first and only got caught in review.

Two suggestions:

  1. call this out in the migration guide's gotchas — anyone relying on the v1 default gets three new capture sources silently
  2. longer term, consider hiding capture sources whose output can never pass the configured allowedFileTypes — a mic button that always produces a rejected file is never what anyone wants

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions