Skip to content

Error is thrown when initial screen is disabled and theme is "modern" #105

@eduardoportilho

Description

@eduardoportilho

Issue Description

When ZiggeoRecorder is rendered with the properties allowrecord={false}, allowupload={false}, and theme="modern" an error is thrown and the component doesn't work. When theme="modern" prop is removed, the component works as expected.

image

Context

My company is integrating Ziggeo into a web app with the following requirements:

  1. Only uploading videos is allowed (no recording)
  2. A file "drop-zone" component (example) should be used to select the file and we don't want to show the initial Ziggeo component screen (the one with "Record Video" and "Upload Video" buttons)

Here is our approach to achieve that:

  1. We render a file dropper component
  2. When the user selects a file, we render ZiggeoRecorder with allowrecord={false} and allowupload={false} in order to hide the initial screen.
  3. Once ZiggeoRecorder is initialized, we use the JS API to call upload_video(file) and then Ziggeo handles the rest

Steps to reproduce

  1. Clone this fork of react-ziggeo: https://github.com/eduardoportilho/react-ziggeo-uploader-modern
  2. Run the demo app as described in README (add API_KEY to src/constants.js, npm install, and npm start)
  3. On the app, choose a video file and check the error in the console

This problem happens only with theme="modern", so if the line where it is passed is commented, the component works as expected.

Metadata

Metadata

Assignees

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