OLD | NEW |
1 # Audio Focus Handling | 1 # Audio Focus Handling |
2 | 2 |
3 A MediaSession collects all audio-producing objects in one tab. It is usually | 3 A MediaSession collects all audio-producing objects in one tab. It is usually |
4 unpleasant when multiple MediaSessions play sound at the same time. Audio focus | 4 unpleasant when multiple MediaSessions play sound at the same time. Audio focus |
5 handling manages the MediaSessions and mixes them in proper ways. This is part | 5 handling manages the MediaSessions and mixes them in proper ways. This is part |
6 of the default media session on desktop project. | 6 of the default media session on desktop project. |
7 | 7 |
8 [TOC] | 8 [TOC] |
9 | 9 |
10 ## Processing model | 10 ## Processing model |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 Pepper is different from media elements since it has a different model. Pepper | 89 Pepper is different from media elements since it has a different model. Pepper |
90 cannot be paused, but its volume can be changed. When considering Pepper, the | 90 cannot be paused, but its volume can be changed. When considering Pepper, the |
91 above algorithm must be modified. | 91 above algorithm must be modified. |
92 | 92 |
93 When Pepper joins `MediaSession`, it should request persistent focus type. When | 93 When Pepper joins `MediaSession`, it should request persistent focus type. When |
94 AudioFocusManager wants to suspend a `MediaSession`, it must check whether the | 94 AudioFocusManager wants to suspend a `MediaSession`, it must check whether the |
95 session has Pepper instance, and if yes, it should duck the session instead. | 95 session has Pepper instance, and if yes, it should duck the session instead. |
96 | 96 |
97 Also, whenever a session abandons focus, and the next top session is INACTIVE, | 97 Also, whenever a session abandons focus, and the next top session is INACTIVE, |
98 `AudioFocusManager` should find the next session having Pepper and unduck it. | 98 `AudioFocusManager` should find the next session having Pepper and unduck it. |
OLD | NEW |