Repository navigation
Commit b168d0b
fix(core): the preview transport keeps ticking in a hidden tab (#5872)
* 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]>
* docs(core): note the hidden-tab timer clamp for silent media
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
* docs(core): shorten the hidden-tab transport comments to hold the comment share
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
---------
Co-authored-by: Claude Sonnet 5.5 <[email protected]>1 parent cea0bad commit b168d0b
2 files changed
Lines changed: 87 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 | + | |
4786 | 4819 | | |
4787 | 4820 | | |
4788 | 4821 | | |
4789 | 4822 | | |
4790 | 4823 | | |
4791 | 4824 | | |
4792 | | - | |
| 4825 | + | |
4793 | 4826 | | |
4794 | 4827 | | |
4795 | 4828 | | |
| |||
4805 | 4838 | | |
4806 | 4839 | | |
4807 | 4840 | | |
4808 | | - | |
| 4841 | + | |
4809 | 4842 | | |
4810 | 4843 | | |
4811 | 4844 | | |
4812 | 4845 | | |
4813 | 4846 | | |
4814 | | - | |
| 4847 | + | |
4815 | 4848 | | |
4816 | 4849 | | |
4817 | 4850 | | |
| |||
5183 | 5216 | | |
5184 | 5217 | | |
5185 | 5218 | | |
5186 | | - | |
5187 | | - | |
| 5219 | + | |
| 5220 | + | |
5188 | 5221 | | |
5189 | 5222 | | |
5190 | 5223 | | |
| |||
5339 | 5372 | | |
5340 | 5373 | | |
5341 | 5374 | | |
5342 | | - | |
5343 | | - | |
5344 | | - | |
5345 | | - | |
| 5375 | + | |
| 5376 | + | |
5346 | 5377 | | |
5347 | 5378 | | |
5348 | 5379 | | |
| |||
| 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