711b079 Fix: Extra timeListening when player initializes
📊 Changes
1 file changed (+11 additions, -5 deletions)
View changed files
📝ios/App/Shared/player/AudioPlayer.swift (+11 -5)
📄 Description
There was an edge case where extra timeListening would be added to the playback session.
This turned out to be the PeriodicTimeObserver firing on initialization of the audio player, which was marking the first update as including playback progress, thus adding the time since player was last opened to the playback session.
This PR adds an extra check that the player is actually playing something instead of marking all progress updates from the PeriodicTimeObserver as including playback progress.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/advplyr/audiobookshelf-app/pull/338
**Author:** [@ronaldheft](https://github.com/ronaldheft)
**Created:** 8/30/2022
**Status:** ✅ Merged
**Merged:** 8/30/2022
**Merged by:** [@advplyr](https://github.com/advplyr)
**Base:** `master` ← **Head:** `ios-fix-playback-timer`
---
### 📝 Commits (1)
- [`711b079`](https://github.com/advplyr/audiobookshelf-app/commit/711b07996324f5dae514e5edf62ed5e6acbdd01a) Fix: Extra timeListening when player initializes
### 📊 Changes
**1 file changed** (+11 additions, -5 deletions)
<details>
<summary>View changed files</summary>
📝 `ios/App/Shared/player/AudioPlayer.swift` (+11 -5)
</details>
### 📄 Description
There was an edge case where extra `timeListening` would be added to the playback session.
This turned out to be the `PeriodicTimeObserver` firing on initialization of the audio player, which was marking the first update as including playback progress, thus adding the time since player was last opened to the playback session.
This PR adds an extra check that the player is actually playing something instead of marking all progress updates from the `PeriodicTimeObserver` as including playback progress.
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/advplyr/audiobookshelf-app/pull/338
Author: @ronaldheft
Created: 8/30/2022
Status: ✅ Merged
Merged: 8/30/2022
Merged by: @advplyr
Base:
master← Head:ios-fix-playback-timer📝 Commits (1)
711b079Fix: Extra timeListening when player initializes📊 Changes
1 file changed (+11 additions, -5 deletions)
View changed files
📝
ios/App/Shared/player/AudioPlayer.swift(+11 -5)📄 Description
There was an edge case where extra
timeListeningwould be added to the playback session.This turned out to be the
PeriodicTimeObserverfiring on initialization of the audio player, which was marking the first update as including playback progress, thus adding the time since player was last opened to the playback session.This PR adds an extra check that the player is actually playing something instead of marking all progress updates from the
PeriodicTimeObserveras including playback progress.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.