Commit 85bf99b
authored
fix(visualizer): reset player to first frame after autoplay completes (#2181)
* fix(visualizer): reset player to first frame after autoplay completes
- Reset currentFrame to 0 instead of staying at the last frame when
playback finishes, so the first frame subtitle and full-screen view
are restored.
- Clear playingTaskId when player is not playing, removing the sidebar
shimmer animation highlight when playback is stopped.
* fix(visualizer): stay at last task frame with full view after autoplay
- Stay at the last frame (duration-1) when playback finishes, then
seek back to the last frame with a taskId to skip the End card.
- Disable autoZoom when player is stopped so the view shows full screen.
- Clear playingTaskId on stop to remove sidebar shimmer animation.
- Extract resetIfAtEnd() to deduplicate play/toggle logic.1 parent 7483f5f commit 85bf99b
File tree
2 files changed
+30
-8
lines changed- packages/visualizer/src/component/player
2 files changed
+30
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
128 | 142 | | |
129 | 143 | | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
130 | 151 | | |
131 | 152 | | |
132 | 153 | | |
133 | 154 | | |
134 | 155 | | |
135 | | - | |
| 156 | + | |
136 | 157 | | |
137 | 158 | | |
138 | 159 | | |
| |||
350 | 371 | | |
351 | 372 | | |
352 | 373 | | |
353 | | - | |
| 374 | + | |
354 | 375 | | |
355 | 376 | | |
356 | 377 | | |
| |||
Lines changed: 6 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
| 79 | + | |
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
84 | 88 | | |
85 | 89 | | |
86 | 90 | | |
| |||
90 | 94 | | |
91 | 95 | | |
92 | 96 | | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
| 97 | + | |
97 | 98 | | |
98 | 99 | | |
99 | 100 | | |
| |||
0 commit comments