Skip to content

Commit

Permalink
update the behavior of playback when screen is turned off
Browse files Browse the repository at this point in the history
- previously
  * all playback would stop when screen was turned off
  * no media could begin while screen was in the off state

- now:
  * if the current playlist item has a video track
    - pause when the screen is turned off
    - resume when the screen is turned back on
  * if the current playlist item is audio-only
    - allow playback to continue when the screen is turned off
    - allow playback to begin while screen in in the off state
    - for both cases:
      * set a partial wakelock to prevent deep sleep
      * remove the partial wakelock when screen is turned back on

additional tweaks:
  * spacebar key toggles pause/resume
    - useful with an air-mouse on a set-top box
  • Loading branch information
warren-bank committed Mar 6, 2020
1 parent 173bca3 commit 804018d
Show file tree
Hide file tree
Showing 6 changed files with 366 additions and 32 deletions.
Loading

0 comments on commit 804018d

Please sign in to comment.