Repository navigation
Commit f3920d6
fix(core): the preview transport keeps ticking in a hidden tab
A hidden document runs no animation frames, but its media keeps playing.
The transport ticked on requestAnimationFrame only, so syncRuntimeMedia
stopped running: a clip was never paused at the end of its window and the
next clip never started until the tab was shown again.
While document.visibilityState is "hidden", the transport now schedules
its tick on a 16 ms timer instead. A visibilitychange listener moves a
pending tick to whichever scheduler the new state calls for, and teardown
removes it. A paused, hidden transport still parks as before.
Refs #5710 (cause 1)
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>1 parent 8434945 commit f3920d6
2 files changed
Lines changed: 89 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
399 | 399 | | |
400 | 400 | | |
401 | 401 | | |
| 402 | + | |
402 | 403 | | |
403 | 404 | | |
404 | 405 | | |
| |||
4783 | 4784 | | |
4784 | 4785 | | |
4785 | 4786 | | |
| 4787 | + | |
| 4788 | + | |
| 4789 | + | |
| 4790 | + | |
| 4791 | + | |
| 4792 | + | |
| 4793 | + | |
| 4794 | + | |
| 4795 | + | |
| 4796 | + | |
| 4797 | + | |
| 4798 | + | |
| 4799 | + | |
| 4800 | + | |
| 4801 | + | |
| 4802 | + | |
| 4803 | + | |
| 4804 | + | |
| 4805 | + | |
| 4806 | + | |
| 4807 | + | |
| 4808 | + | |
| 4809 | + | |
| 4810 | + | |
| 4811 | + | |
| 4812 | + | |
| 4813 | + | |
| 4814 | + | |
| 4815 | + | |
| 4816 | + | |
| 4817 | + | |
| 4818 | + | |
| 4819 | + | |
| 4820 | + | |
4786 | 4821 | | |
4787 | 4822 | | |
4788 | 4823 | | |
4789 | 4824 | | |
4790 | 4825 | | |
4791 | 4826 | | |
4792 | | - | |
| 4827 | + | |
4793 | 4828 | | |
4794 | 4829 | | |
4795 | 4830 | | |
| |||
4805 | 4840 | | |
4806 | 4841 | | |
4807 | 4842 | | |
4808 | | - | |
| 4843 | + | |
4809 | 4844 | | |
4810 | 4845 | | |
4811 | 4846 | | |
4812 | 4847 | | |
4813 | 4848 | | |
4814 | | - | |
| 4849 | + | |
4815 | 4850 | | |
4816 | 4851 | | |
4817 | 4852 | | |
| |||
5183 | 5218 | | |
5184 | 5219 | | |
5185 | 5220 | | |
5186 | | - | |
5187 | | - | |
| 5221 | + | |
| 5222 | + | |
5188 | 5223 | | |
5189 | 5224 | | |
5190 | 5225 | | |
| |||
5339 | 5374 | | |
5340 | 5375 | | |
5341 | 5376 | | |
5342 | | - | |
5343 | | - | |
5344 | | - | |
5345 | | - | |
| 5377 | + | |
| 5378 | + | |
5346 | 5379 | | |
5347 | 5380 | | |
5348 | 5381 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
| 171 | + | |
171 | 172 | | |
172 | 173 | | |
173 | 174 | | |
| |||
983 | 984 | | |
984 | 985 | | |
985 | 986 | | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
986 | 1033 | | |
0 commit comments