Spaces:
Running
on
Zero
Running
on
Zero
faster autoplay
Browse files- app/ui_vote.py +3 -1
app/ui_vote.py
CHANGED
@@ -54,6 +54,7 @@ with gr.Blocks() as vote:
|
|
54 |
show_label=False,
|
55 |
show_download_button=False,
|
56 |
show_share_button=False,
|
|
|
57 |
# waveform_options={'waveform_progress_color': '#EF4444'},
|
58 |
# var(--color-red-500)'}); gradio only accepts HEX and CSS color
|
59 |
)
|
@@ -76,6 +77,7 @@ with gr.Blocks() as vote:
|
|
76 |
show_download_button=False,
|
77 |
show_share_button=False,
|
78 |
waveform_options={'waveform_progress_color': '#3C82F6'},
|
|
|
79 |
# var(--secondary-500)'}); gradio only accepts HEX and CSS color
|
80 |
)
|
81 |
bbetter = gr.Button(
|
@@ -161,7 +163,7 @@ with gr.Blocks() as vote:
|
|
161 |
.then(
|
162 |
None,
|
163 |
inputs=[bplayed if autoplay else True],
|
164 |
-
js="(b) => b ? 0 : document.querySelector('
|
165 |
)
|
166 |
# autoplay if unplayed
|
167 |
aud2\
|
|
|
54 |
show_label=False,
|
55 |
show_download_button=False,
|
56 |
show_share_button=False,
|
57 |
+
elem_id="vote-a-audio",
|
58 |
# waveform_options={'waveform_progress_color': '#EF4444'},
|
59 |
# var(--color-red-500)'}); gradio only accepts HEX and CSS color
|
60 |
)
|
|
|
77 |
show_download_button=False,
|
78 |
show_share_button=False,
|
79 |
waveform_options={'waveform_progress_color': '#3C82F6'},
|
80 |
+
elem_id="vote-b-audio",
|
81 |
# var(--secondary-500)'}); gradio only accepts HEX and CSS color
|
82 |
)
|
83 |
bbetter = gr.Button(
|
|
|
163 |
.then(
|
164 |
None,
|
165 |
inputs=[bplayed if autoplay else True],
|
166 |
+
js="(b) => b ? 0 : document.getElementById('vote-b-audio')?.querySelector('button.play-pause-button')?.click()",
|
167 |
)
|
168 |
# autoplay if unplayed
|
169 |
aud2\
|