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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow audio components to take a string value #930

Merged
merged 3 commits into from
Apr 7, 2022
Merged

Conversation

pngwn
Copy link
Member

@pngwn pngwn commented Apr 6, 2022

Audio previosuly expect the value to be an object rather thana string. Audio can now take a string.

Closes #896.

@abidlabs
Copy link
Member

abidlabs commented Apr 6, 2022

The demos work, but I'm still getting issues with the examples that I provided later in the issue. For example

bl = gr.Blocks()

with bl:
    gr.Audio("test.mp3")
    bl.launch()

produces a blank webpage (nothing is shown), instead of an embedded audio file that can be played:

image

bl = gr.Blocks()

with bl:
    gr.Video("test.mp4")
    bl.launch()

produces an embedded video, but it cannot be played:

image

Attaching the test files so you can reproduce. test.zip

@pngwn
Copy link
Member Author

pngwn commented Apr 7, 2022

There are some inconsistencies with how file data is passed around, I'm going to address that more comprehensively to avoid these issues (that is the source of all of these issues).

@pngwn
Copy link
Member Author

pngwn commented Apr 7, 2022

@abidlabs I think those issues should be addressed now, feel free to review/test while i deal with conflicts.

@abidlabs
Copy link
Member

abidlabs commented Apr 7, 2022

Yayy! Everything works LGTM.

(FYI if you merge blocks-dev into this branch, circleci tests should now pass)

@pngwn pngwn merged commit 0383857 into blocks-dev Apr 7, 2022
@pngwn pngwn deleted the 896-audio branch April 7, 2022 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants