Comments (10)
I believe this is still an issue on ios. Getting position update in playing state with no sound first. Then position is reseted when audio starts a playback. Some logs:
flutter: 2020-03-02T16:07:01.188939 I new AudioService.<ac>: state changed: AudioPlaybackState.stopped
flutter: 2020-03-02T16:07:01.190283 I new AudioService.<ac>: state changed: AudioPlaybackState.playing
flutter: 2020-03-02T16:07:01.392662 I AudioControlListenBloc._updatePosition: state: PlayerState.playing position: 0:00:00.203000
flutter: 2020-03-02T16:07:01.596361 I AudioControlListenBloc._updatePosition: state: PlayerState.playing position: 0:00:00.407000
flutter: 2020-03-02T16:07:01.710461 I AudioControlListenBloc._updatePosition: state: PlayerState.playing position: 0:00:00.000000
flutter: 2020-03-02T16:07:01.710859 I new AudioService.<ac>: state changed: AudioPlaybackState.playing
flutter: 2020-03-02T16:07:01.711824 I AudioControlListenBloc._updatePosition: state: PlayerState.playing position: 0:00:00.002000
Let me know if I could help with that. And thank you for this library @ryanheise !
from just_audio.
Currrently as a temporary fix, before I update my UI with the current time, I first make sure the audioplayer is in playing
state (and not buffering
)
from just_audio.
Ah, yes. I assume you're using getPositionStream()
which in turn uses the position
getter In AudioPlaybackEvent
:
/// The current position of the player.
Duration get position => state == AudioPlaybackState.playing
? updatePosition +
(Duration(milliseconds: DateTime.now().millisecondsSinceEpoch) -
updateTime) *
speed
: updatePosition;
That state == AudioPlaybackState.playing
condition should be followed by && !buffering
.
Just fixed. Do you want to try the latest commit?
from just_audio.
Sure, lemme check it out now
from just_audio.
Perfect, fixed. All good.
from just_audio.
@ryanheise Please fix this issue ASAP
from just_audio.
I've reopened this issue, as the iOS side will need to be investigated.
@nomyzs apologies for not seeing your comment sooner.
However, I'm in the process of moving apartments, so it may be a while before I can take a look.
from just_audio.
Can you confirm whether this is solved in the latest release? If not, can you test the media-source branch?
from just_audio.
Closing due to inactivity. I believe this is now working in the latest release but if not, please open a new issue with a minimal reproduction project.
from just_audio.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs, or use StackOverflow if you need help with just_audio.
from just_audio.
Related Issues (20)
- [Android] Sound stops playing when backgrounding app and letting phone go to sleep HOT 2
- Track completes too eary HOT 10
- "Getting 'type 'Null' is not a subtype of type 'MediaItem' error with Just Audio Background package' HOT 2
- 22 kHz mono mp3s have wrong duration and seek behavior HOT 7
- Error during file preparation on Android 6 when playing MP3 files: "setConfig(1 .mp3.decoder, ConfigPriority(0x6f800002)) ERROR: Undefined(0x80001001)" HOT 2
- Error during file preparation on Android 6 when playing MP3 files HOT 4
- Compile WEB release plugin dosent work HOT 2
- Compile WEB release plugin dosent work HOT 6
- Sound is not played on iOS 17.5.1 in background HOT 2
- PlatformException(561017449, The operation couldn't be completed. (OSStatus error 561017449.), null, null) π IOS HOT 2
- Support rxdart 0.28.0 HOT 1
- PlatformException(561017449, The operation couldn't be completed. (OSStatus error 561017449.), null, null) //IOS BUG HOT 2
- Incorrect AudioPlayer Position data on Android HOT 1
- Command failed for android_media_AudioSystem_error_callback: -32, AudioFlinger server died & AudioPolicyService server died. HOT 2
- Error when streaming on iOS or MacOS HOT 2
- AudioSource.uri does not set dynamically headers HOT 1
- Pause ,Stop or any other functions not working while play function called HOT 2
- No longer maintained packages in the readme HOT 6
- sound cuts out HOT 2
- How can get the current playing position? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from just_audio.