Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duration issue research #155

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

newbdez33
Copy link

Just a theory.

@tanhakabir
Copy link
Owner

what's your theory behind why the duration was off? When I try to follow your edits it seems logically the same as what it was before in terms of how predicted duration and duration is updated

@fingersakimbo
Copy link

@newbdez33 Is this an attempt to solve the problem where you scrub into a file that's streaming (downloaded doesn't appear to have this problem) and it results in the needle exceeding the duration at the end of the file? I was about to dig into that problem, but if you're attempting to address it here, I'll dig into your code instead.

@newbdez33
Copy link
Author

Sorry for late reply. I don't have time to solve this problem so far.
And Yes, the needle is exceeding the duration.
(some hosting provider adding advertise content into mp3 caused this problem.
like this one: https://rss.art19.com/business-wars-daily)

micahjon added a commit to micahjon/SwiftAudioPlayer that referenced this pull request Oct 11, 2022
Changes from PR tanhakabir#155
tanhakabir/SwiftAudioPlayer@master...HKdAlex:SwiftAudioPlayer:master

Also update lines 123-128 of AudioStreamEngine to avoid duration being
overridden by predictedStreamDuration once stream has completed
@micahjon
Copy link

@newbdez33 , thanks a million for your work on this. I made a fork that incorporates your changes.

Additionally, I had to tweak the predictedStreamDuration didSet observer so it didn't set duration back to the stream-predicted value (causing the lock screen duration to constantly switch between 2 values and the needle not to update).

Anyway, just figured I'd post the commit in case any others are running into this. I'll plan on maintaining this fork until some of these PR's are merged.
micahjon@3ff0824

pietrorea pushed a commit to pietrorea/SwiftAudioPlayer that referenced this pull request Dec 10, 2022
Changes from PR tanhakabir#155
tanhakabir/SwiftAudioPlayer@master...HKdAlex:SwiftAudioPlayer:master

Also update lines 123-128 of AudioStreamEngine to avoid duration being
overridden by predictedStreamDuration once stream has completed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants