Automattic / Automattic/pocket-casts-android

Unable to skip forward or back `.aac` files

Open
#1,706 0 comments 0 reactions 0 assignees View on GitHub
[Area] Playback [Priority] Low [Type] Bug
Dominant language
Kotlin
Stars
2.8k
Forks
308
Avg merge
1d 13h
Merged PRs (30d)
143

Description

### Description

When `.aac` files are imported the app cannot skip them in time. When I import an `.aac` file through the app I expect I will be able to control the playback via skip buttons. However app fails to do so with the `Unable to seek. File headers appear to be invalid.` toast message.

The code responsible for displaying the message is here.

https://github.com/Automattic/pocket-casts-android/blob/15292ca4da3f6848701e517d9681aad5469fc1f6/modules/services/repositories/src/main/java/au/com/shiftyjelly/pocketcasts/repositories/playback/SimplePlayer.kt#L130-L137

Also, there are [reports on Stack](https://serverfault.com/questions/1108600/nginx-byte-range-requests-are-enabled-but-pocket-casts-still-reports-invalid-hea) of our app not functioning well in the similar manner.

### Step-by-step reproduction instructions

Have some `.aac` files on a device or in the cloud where you can access them from a device. You can use sample `.aac` files from [here](https://filesamples.com/formats/aac) or use [this sample](https://github.com/Automattic/pocket-casts-android/files/13950090/sample1.zip).

1. Go to `Profile`.
2. Go to `Files`.
3. Import an `.aac` file.
4. Play it back.
5. Try to control it with the skip buttons.

### Screenshots or screen recording

https://github.com/Automattic/pocket-casts-android/assets/30936061/d7f41201-6989-4156-a4a7-4ea76f3181a1

### Did you search for existing bug reports?

- [X] I have searched for existing bug reports.

### Device, Operating system, and Pocket Casts app version

Google Pixel 6, Android 13, Pocket Casts `7.54 (9180)`.

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue with the linked sample .aac file by following the Profile > Files import and playback steps. Start at modules/services/repositories/src/main/java/au/com/shiftyjelly/pocketcasts/repositories/playback/SimplePlayer.kt lines 130-137, then trace the failed seek path. Done means the skip buttons seek within imported .aac files without showing the invalid-headers toast.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
audio-video-rtc, mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.