Commit 890c0fd
committed
feat(studio): audition a preset from the playhead while paused
Hovering a preset writes it to the running graph — which is silent while
the transport is paused. So the whole affordance only worked mid-playback:
a paused author hovering the shelf heard nothing at all and had no way to
know the feature existed.
Hovering now starts playback from wherever the playhead sits, and leaving
stops it and returns the playhead to exactly where it was found. Browsing
the shelf is not an edit and must not cost the author their place.
Two guards, each with a test:
- **A transport the author started is left alone**, in both directions.
Stopping their playback because they passed over a preset would be the
panel taking a decision nobody offered it.
- **Every path that ends an audition stops the transport** — leaving,
applying, and the panel unmounting. A click means "keep this", not "and
carry on playing from wherever the audition reached".
Order matters at both ends: the chain goes into the graph before playback
starts, or the first moment heard is the un-auditioned mix; and playback
stops before the chain reverts, so the last thing heard is the preset
rather than a frame of the old chain coming back.
`playbackRequest` on the player store follows `requestedSeekTime`: the
panel cannot reach `useTimelinePlayer`, which is a single instance owned
by the shell. It carries a nonce because two hovers in a row both want
play, and without one the second is indistinguishable from the first
already having been served.
Falsified: not returning the playhead, and hijacking a transport the
author started, each fail a test.
studio 3716 passing, 18 todo.1 parent bbaa6b1 commit 890c0fd
6 files changed
Lines changed: 187 additions & 7 deletions
File tree
- packages/studio/src
- components/editor
- player
- hooks
- store
Lines changed: 39 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
435 | 435 | | |
436 | 436 | | |
437 | 437 | | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
438 | 477 | | |
439 | 478 | | |
440 | 479 | | |
| |||
Lines changed: 35 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
574 | 574 | | |
575 | 575 | | |
576 | 576 | | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
577 | 611 | | |
578 | 612 | | |
579 | 613 | | |
| |||
808 | 842 | | |
809 | 843 | | |
810 | 844 | | |
| 845 | + | |
811 | 846 | | |
812 | 847 | | |
813 | 848 | | |
| |||
Lines changed: 47 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| 93 | + | |
93 | 94 | | |
94 | 95 | | |
95 | 96 | | |
| |||
695 | 696 | | |
696 | 697 | | |
697 | 698 | | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
698 | 745 | | |
699 | 746 | | |
700 | 747 | | |
| |||
Lines changed: 30 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
114 | 122 | | |
115 | 123 | | |
116 | 124 | | |
| |||
156 | 164 | | |
157 | 165 | | |
158 | 166 | | |
| 167 | + | |
159 | 168 | | |
160 | 169 | | |
161 | 170 | | |
| |||
228 | 237 | | |
229 | 238 | | |
230 | 239 | | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
231 | 243 | | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
232 | 247 | | |
233 | 248 | | |
234 | 249 | | |
235 | 250 | | |
236 | | - | |
| 251 | + | |
237 | 252 | | |
238 | 253 | | |
239 | 254 | | |
| |||
253 | 268 | | |
254 | 269 | | |
255 | 270 | | |
| 271 | + | |
| 272 | + | |
256 | 273 | | |
257 | 274 | | |
258 | | - | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
259 | 279 | | |
260 | 280 | | |
261 | 281 | | |
| |||
272 | 292 | | |
273 | 293 | | |
274 | 294 | | |
| 295 | + | |
275 | 296 | | |
276 | 297 | | |
277 | 298 | | |
278 | 299 | | |
279 | 300 | | |
280 | 301 | | |
281 | | - | |
| 302 | + | |
282 | 303 | | |
283 | 304 | | |
284 | 305 | | |
| |||
322 | 343 | | |
323 | 344 | | |
324 | 345 | | |
| 346 | + | |
325 | 347 | | |
326 | 348 | | |
327 | 349 | | |
328 | 350 | | |
329 | | - | |
| 351 | + | |
330 | 352 | | |
331 | 353 | | |
332 | 354 | | |
333 | 355 | | |
334 | 356 | | |
| 357 | + | |
335 | 358 | | |
336 | 359 | | |
337 | 360 | | |
338 | 361 | | |
339 | | - | |
| 362 | + | |
340 | 363 | | |
341 | 364 | | |
342 | 365 | | |
| |||
458 | 481 | | |
459 | 482 | | |
460 | 483 | | |
| 484 | + | |
461 | 485 | | |
462 | 486 | | |
463 | 487 | | |
464 | 488 | | |
465 | | - | |
| 489 | + | |
466 | 490 | | |
467 | 491 | | |
468 | 492 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
383 | 383 | | |
384 | 384 | | |
385 | 385 | | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
386 | 398 | | |
387 | | - | |
| 399 | + | |
388 | 400 | | |
389 | 401 | | |
390 | 402 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
166 | 182 | | |
167 | 183 | | |
168 | 184 | | |
| |||
336 | 352 | | |
337 | 353 | | |
338 | 354 | | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
339 | 362 | | |
340 | 363 | | |
341 | 364 | | |
| |||
0 commit comments