Spaces:
Running
Running
JS: play only paused
Browse files
app.py
CHANGED
|
@@ -1515,7 +1515,8 @@ with gr.Blocks() as vote:
|
|
| 1515 |
.then(enable, outputs=[btn, gr.State(), gr.State(), cachedt])\
|
| 1516 |
.then(None, js="() => "+ unblur_js)
|
| 1517 |
nxtroundbtn\
|
| 1518 |
-
.click(
|
|
|
|
| 1519 |
.then(give_cached_sample, inputs=[session_hash], outputs=[*outputs, cachedt])\
|
| 1520 |
.then(enable, outputs=[btn, gr.State(), gr.State(), gr.State()])
|
| 1521 |
|
|
@@ -1536,7 +1537,7 @@ with gr.Blocks() as vote:
|
|
| 1536 |
.then(
|
| 1537 |
None,
|
| 1538 |
inputs=[bplayed],
|
| 1539 |
-
js="(b) => b ? 0 : document.querySelector('.row .gap+.gap button.play-pause-button').click()",
|
| 1540 |
)
|
| 1541 |
# autoplay if unplayed
|
| 1542 |
aud2\
|
|
|
|
| 1515 |
.then(enable, outputs=[btn, gr.State(), gr.State(), cachedt])\
|
| 1516 |
.then(None, js="() => "+ unblur_js)
|
| 1517 |
nxtroundbtn\
|
| 1518 |
+
.click(clear_stuff, outputs=outputs)\
|
| 1519 |
+
.then(disable, outputs=[btn, abetter, bbetter, cachedt])\
|
| 1520 |
.then(give_cached_sample, inputs=[session_hash], outputs=[*outputs, cachedt])\
|
| 1521 |
.then(enable, outputs=[btn, gr.State(), gr.State(), gr.State()])
|
| 1522 |
|
|
|
|
| 1537 |
.then(
|
| 1538 |
None,
|
| 1539 |
inputs=[bplayed],
|
| 1540 |
+
js="(b) => b ? 0 : document.querySelector('.row .gap+.gap button.play-pause-button[aria-label=Play]').click()",
|
| 1541 |
)
|
| 1542 |
# autoplay if unplayed
|
| 1543 |
aud2\
|