Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Label of audio input shows disabled but label of camera input doesn't when permissions are denied #11700

@jrieke

Description

@jrieke

Checklist

  • I have searched the existing issues for similar issues.
  • I added a very descriptive title to this issue.
  • I have provided sufficient information below to help reproduce this issue.

Summary

If the microphone permission is denied, we show the label of audio input gray/disabled:

Image

But for camera input we don't do that, the label has the normal text color.

Image

We should make them behave the same. The more I think about it the more I think we should actually change audio input so the label isn't disabled. It looks a bit weird because it seems like the whole component was intentionally disabled, whereas in reality, the component is enabled, it's just that you can't record because the permission isn't there.

Reproducible Code Example

import streamlit as st

st.audio_input("Record your voice")
st.camera_input("Take a photo")

Steps To Reproduce

Open the app, deny microphone and camera permissions.

Expected Behavior

Labels have different colors.

Current Behavior

They should have the same color.

Is this a regression?

  • Yes, this used to work in a previous version.

Debug info

  • Streamlit version: 1.46
  • Python version:
  • Operating System:
  • Browser:

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature:st.audio_inputRelated to the `st.audio_input` widgetfeature:st.camera_inputRelated to the `st.camera_input` widgetpriority:P3Medium prioritystatus:confirmedBug has been confirmed by the Streamlit teamtype:bugSomething isn't working as expected

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions