wildyeast / sadiss

A socially aggregated distributed sound system.
GNU Affero General Public License v3.0
10 stars 2 forks source link

iOS re-starts playback after unlocking Screen-Lock #25

Closed KlienVo closed 2 years ago

KlienVo commented 2 years ago

iPad goes into screen-lock during a performance. After the end of the performance the iPad is unlocked by user and starts playing back of the rest of the performance that was left when it fell asleep. -> is there a way of preventing this?

matbind commented 2 years ago

As described in https://github.com/wildyeast/sadiss/issues/1#issuecomment-1207889464, screen lock should now have no impact on a running track. What needs testing though is if you let an iOS device re-register while the screen is locked, then the track starts (and you can't hear anything on iOS), and then you unlock, does it start out of sync still, or doesn't start at all (the latter would be preferable).

matbind commented 2 years ago

Further testing shows that the solution mentioned above does not work for TTS. So, as it stands, it seems we have to force users to stop their phones from locking. This means NoSleep can probably be removed again, and the solution preventing phones from starting where they left off after unlocking needs to be implemented again.

matbind commented 2 years ago

Should be fine now. On focus loss, we stop partial and TTS playback and we re-register. On some phones (most tested Androids) this works just fine. On iOS this only seems to work if the screen lock was only for a short time. In the worst case, users have to re-register themselves.