Closed xshiwei closed 5 months ago
Hi there, Use https://www.aconvert.com/analyze.html
It states that the file size is 0
I extracted these audio addresses from Youtube. It works smoothly on Android, and the duration is increased by 2 times on iOS, and the second half is empty and no sound is playing.
Hi there, Use https://www.aconvert.com/analyze.html
It states that the file size is 0
You can run my sample code to see it. If the test link is expired or invalid, please contact me.
As said, the link you provided in your issue description references a source which is empty. Therefore the player cannot work. Plz provide a valid url that also fulfills the requirements in the troubleshooting guide.
This issue was closed by the changes-requested bot due to inactivity.
@xshiwei did you find any solution ,i am also facing same issue!!
Checklist
Current bug behaviour
在 iOS 上播放本地 (.m4a) 文件时使用 AudioPlayer.getDuration 方法会给出持续时间(以毫秒为单位),该持续时间比曲目的实际持续时间长 2 倍。在 Android 上使用相同的代码和相同的音乐文件会给出正确的持续时间。
由于给出的持续时间不正确,因此播放器的 onPlayerCompletion 事件不会在曲目结束时触发,而是会晚得多。
这可能是由于库错误地读取 iOS 上的 .m4a 文件元数据造成的。
Expected behaviour
Duration should be consistent
Steps to reproduce
flutter run
on the code sampleCode sample
Code sample
```dart void main() { } import 'package:audioplayers/audioplayers.dart'; import 'package:flutter/material.dart'; class DebugMediaTestPage extends StatefulWidget { const DebugMediaTestPage({super.key}); @override StateAffected platforms
iOS
Platform details
No response
AudioPlayers Version
5.2.1
Build mode
No response
Audio Files/URLs/Sources
https://rr5---sn-i3belnll.googlevideo.com/videoplayback?expire=1702644364&ei=LPZ7Zd33EvuM1d8PtrCy-Ao&ip=199.182.234.20&id=o-AACxtQ6WCufMClTnw5shWgf9KLqJJW9ejkg0NOzncM9R&itag=139&source=youtube&requiressl=yes&xpc=EgVo2aDSNQ%3D%3D&gcr=hk&vprv=1&mime=audio%2Fmp4&gir=yes&clen=1004767&dur=164.467&lmt=1633610990078612&keepalive=yes&fexp=24007246&c=ANDROID_TESTSUITE&txp=2311222&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cxpc%2Cgcr%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AJfQdSswRQIgUQQ_Uv3eJ9X05ka8CzOuu2VmxlzwqAFHjYn3pRVzMp0CIQCoqE7BivyHJYEUtfSCoY1yNd0P5U98GPXIot1vq8SbRA%3D%3D&redirect_counter=1&rm=sn-i3bds76&req_id=53801a152221a3ee&cms_redirect=yes&cmsv=e&ipbypass=yes&mh=jB&mip=58.84.54.80&mm=31&mn=sn-i3belnll&ms=au&mt=1702623697&mv=m&mvi=5&pl=24&lsparams=ipbypass,mh,mip,mm,mn,ms,mv,mvi,pl&lsig=AAO5W4owRQIgUMFgsiJGzB7PjMf84eui6aHsV15dmC5a-gIbM82RYMsCIQCfUKxc_MITE7t2mVn5K8VBCT_s18nlBgOMonP_bIgxiA%3D%3D
Screenshots
Logs
Full Logs
``` my full logs or a link to a gist ``` Flutter doctor: ``` Output of: flutter doctor -v ```Related issues / more information
376
Working on PR
no way