Skip to content

Add runtime validation for plugin props using Zod #792

@Harishvishwa01

Description

@Harishvishwa01

Currently, the withTwilioVideoWebrtc config plugin does not validate the props passed to it at runtime. This may lead to unexpected build-time errors if invalid values are provided.

I propose adding Zod-based schema validation to:
path : plugin/src/index.ts
Ensure cameraPermission and microphonePermission are valid strings

Provide meaningful error messages for invalid inputs

Optionally support default permission values

This would improve:

Developer experience

Plugin reliability

Type safety beyond TypeScript (runtime validation)

I can submit a PR implementing this enhancement.

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