This repository was archived by the owner on Apr 18, 2024. It is now read-only.
Commit ca3586f
fix: LSDV-3012: Syncable with new simple approach (#1201)
New Syncable mixin to provide new and very simple and nice approach:
- don't send event back
- sync the whole state (time, speed, playing)
- group tags into syncing groups
- lock current sync window for any back-stream events
- sync is pluggable thing, tag should work without sync methods (Audio is still tied with Sync)
All tags are muted except Audio tags or the tag triggered even if no Audio is presented. That's because Audio is the only tag with controllable volume. May be changed in the future.
Things done:
- sync speed
- sync play when audio restarted after reaching the end
- sync time shortly after play? can be helpful for overloaded browser
* fix: LSDV-3012: Syncable with new simple approach
First try with some debugging and thoughts.
New Syncable mixin to provide new and very simple and nice approach:
- don't send event back
- sync the whole state (time, speed, playing)
- group tags in syncing groups
- lock current frame for any back-stream events
* Fix annoying react error about missing key
* Fix types in SyncableMixin
* adding some of the sync tests, fixing audio pause time sync
* make sync optional, otherwise it breaks everything else
* remove debug wait
* adding test for synced looping audio
* Sync Video; remove excess sync deps; use sync window
- Implement Syncable for Video as well
- Remove some dependencies on sync methods from usual flow
- Add sync window to suppress all excess events in it
- Sync states, not events
* Do nothing if tag is not synced
* Sync Paragraphs
- rename model and view to be more consistent
- use Syncable, implement just a few methods, required minimum
- remove bunch of old code with sync misuse
- Paragrpahs mostly sync other tags, and on external actions it only pauses
* Fix time displaying during synced seek
* Clean up; comments; data is main parameter
* update test usage of helper dragAudioElement
* fixing audio paragraphs test
* not sure why this file was suddenly uppercase, putting back to lower
* use a local file for test
* allow alternative chromium to be used, otherwise the default install from playwright contains no media codecs to support mp4 files
* put back the correct defaults for examples
* use video file for example
* use video for file ref in audio,video,paragraphs example config data
* Fix backward compatibility for video<->audio sync
Old way of referring each other names works!
* Sync speed as well
* fix video and audio references in sync tests, ensure video is not leaving leftover video elements
* use only audio v3 for all tests and development
* fixing audio config tests
* fix paragraph syncing of playback, and end time handling along with test fixes
* Mute other tags on play. And unmute the current one.
Paragraphs tag doesn't react on play, so should not be muted.
And when it's the origin of event it's not muted and others are.
So no handlers there.
* Fix muted for Video
* Fix Paragraphs sync handling
React on seek if the time within the current phrase.
Also helps with late back-sync from video tag.
* Fix renamed test helper dragAudioElement
* Fix Audio -> Video sync misteriously broken
* fix DomException when looping playback which also caused tests to fail
* ensure fields are cleared before input is sent for audio controls
* playback speed needs to visually update
* Fix tests for Audio v3
* Record video of weird readonly test failure
* Fix readonly audio regions test
Behaviour was changed, so let it check the new one.
Also fix for hotkeys enabled for tests.
* Raise tests timeout
* Ignore errors temporarily
* Return back usual codecept values
* Fix sync not triggerring when speed is 1
Because of early static handlers on waveform, rate was fixed at 1 in it.
* Fix speed input change in test
* Add threshold to time comparisons
* Ignore DOMException, it won't affect UX
This error should've been fixed, but stayed in some cases :(
* Move synced time assert to fragment; fix test
* Fix case for default overrides in flags.json
* Trigger play only after it actually started to play
This fixes problems with sync of region looped playing
* Actually, DEV is correct one for old Audio FF
* Fix sync for Audio v1/v2
* Clean up Paragraphs code, simplify and add comments
* Add tests for Paragraphs mst model methods
* Fix audio when synced tag jumped to the beginning
* Fix muted state
Only Audio has volume controls, so they should not be muted,
while other synced tags should be muted, otherwise volume can't
be controlled.
But if there are no Audio tags in group, the tag triggered sync
should be the main tag with volume active, and others should be muted.
* Fix Paragraphs UX: play/pause synced and natural
If you press pause and then play it will continue playing current region,
even if that was triggered from other tag.
Seek is synced inside current region.
* Fix Paragraphs with overlapping times
* Add feature flag
All methods are groupped even in old code, so these groups are extracted
to separate small models and composed conditionally by ff value.
* Add more comments about setMuted behavior
* Fix wrong flags combination
* Use new FF in e2e tests
* Move assertTimesInSync to Assertion helper
* Fix unit test with some weird FF mock
---------
Co-authored-by: Brandon Martel <brandonmartel@gmail.com>
Co-authored-by: Sergey <sergey.koshevarov@heartex.com>1 parent 284f27e commit ca3586f
File tree
41 files changed
+1800
-244
lines changed- e2e
- fragments
- helpers
- setup
- tests
- audio
- readonly-tests/readonly-results
- regression-tests
- sync
- examples/audio_video_paragraphs
- annotations
- public/files
- src
- components
- Timeline/Controls
- VideoCanvas
- core/feature-flags
- env
- lib/AudioUltra
- Controls
- react
- mixins
- tags/object
- AudioNext
- AudioUltra
- Paragraphs
- __tests__
- Video
- utils
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
41 files changed
+1800
-244
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
29 | 32 | | |
30 | 33 | | |
31 | 34 | | |
| |||
96 | 99 | | |
97 | 100 | | |
98 | 101 | | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
99 | 108 | | |
100 | 109 | | |
101 | 110 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
38 | 39 | | |
39 | | - | |
40 | | - | |
41 | | - | |
| 40 | + | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
76 | 87 | | |
77 | 88 | | |
78 | 89 | | |
| |||
87 | 98 | | |
88 | 99 | | |
89 | 100 | | |
90 | | - | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
91 | 104 | | |
92 | 105 | | |
93 | 106 | | |
| |||
119 | 132 | | |
120 | 133 | | |
121 | 134 | | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
122 | 160 | | |
123 | 161 | | |
124 | 162 | | |
| |||
193 | 231 | | |
194 | 232 | | |
195 | 233 | | |
| 234 | + | |
196 | 235 | | |
197 | 236 | | |
198 | 237 | | |
| |||
210 | 249 | | |
211 | 250 | | |
212 | 251 | | |
| 252 | + | |
213 | 253 | | |
214 | 254 | | |
215 | 255 | | |
| |||
226 | 266 | | |
227 | 267 | | |
228 | 268 | | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
229 | 272 | | |
230 | 273 | | |
231 | 274 | | |
| |||
256 | 299 | | |
257 | 300 | | |
258 | 301 | | |
| 302 | + | |
259 | 303 | | |
260 | 304 | | |
261 | 305 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
3 | 5 | | |
4 | 6 | | |
5 | 7 | | |
| |||
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
19 | 26 | | |
20 | 27 | | |
21 | 28 | | |
| |||
25 | 32 | | |
26 | 33 | | |
27 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
28 | 51 | | |
29 | 52 | | |
30 | 53 | | |
| |||
70 | 93 | | |
71 | 94 | | |
72 | 95 | | |
73 | | - | |
| 96 | + | |
74 | 97 | | |
75 | 98 | | |
76 | 99 | | |
| |||
79 | 102 | | |
80 | 103 | | |
81 | 104 | | |
82 | | - | |
| 105 | + | |
83 | 106 | | |
84 | | - | |
| 107 | + | |
85 | 108 | | |
86 | 109 | | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
87 | 126 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
5 | 8 | | |
6 | 9 | | |
7 | 10 | | |
| |||
17 | 20 | | |
18 | 21 | | |
19 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
20 | 32 | | |
21 | 33 | | |
22 | 34 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | 70 | | |
74 | 71 | | |
75 | 72 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | 85 | | |
89 | 86 | | |
90 | 87 | | |
91 | 88 | | |
92 | 89 | | |
93 | 90 | | |
94 | | - | |
| 91 | + | |
95 | 92 | | |
96 | 93 | | |
97 | 94 | | |
| |||
100 | 97 | | |
101 | 98 | | |
102 | 99 | | |
103 | | - | |
| 100 | + | |
104 | 101 | | |
105 | 102 | | |
106 | 103 | | |
| |||
115 | 112 | | |
116 | 113 | | |
117 | 114 | | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | 115 | | |
122 | 116 | | |
123 | 117 | | |
124 | 118 | | |
125 | 119 | | |
126 | | - | |
| 120 | + | |
127 | 121 | | |
128 | 122 | | |
129 | 123 | | |
| |||
155 | 149 | | |
156 | 150 | | |
157 | 151 | | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | 152 | | |
162 | 153 | | |
163 | 154 | | |
164 | 155 | | |
165 | | - | |
| 156 | + | |
166 | 157 | | |
167 | 158 | | |
168 | 159 | | |
169 | 160 | | |
170 | 161 | | |
171 | 162 | | |
172 | | - | |
| 163 | + | |
173 | 164 | | |
174 | 165 | | |
175 | 166 | | |
| |||
195 | 186 | | |
196 | 187 | | |
197 | 188 | | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | 189 | | |
202 | 190 | | |
203 | 191 | | |
204 | 192 | | |
205 | 193 | | |
206 | | - | |
| 194 | + | |
207 | 195 | | |
208 | 196 | | |
209 | 197 | | |
| |||
221 | 209 | | |
222 | 210 | | |
223 | 211 | | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | 212 | | |
228 | 213 | | |
229 | 214 | | |
230 | 215 | | |
231 | | - | |
| 216 | + | |
232 | 217 | | |
233 | 218 | | |
234 | 219 | | |
235 | 220 | | |
236 | 221 | | |
237 | | - | |
| 222 | + | |
238 | 223 | | |
239 | 224 | | |
240 | 225 | | |
| |||
0 commit comments