just_audio
just_audio copied to clipboard
Audio play error in http url and m3u8 format
Which API doesn't behave as documented, and how does it misbehave? await player.setAudioSource(HlsAudioSource(Uri.parse( 'http://103.210.73.190:4002/assets/audio/SME/en/SME_en.m3u8'))); just_audio: ^0.9.37
Minimal reproduction project final player = AudioPlayer(); // await player.setUrl( // 'http://103.210.73.190:4002/assets/audio/SME/en/SME_en.m3u8'); await player.setAudioSource(HlsAudioSource(Uri.parse( 'http://103.210.73.190:4002/assets/audio/SME/en/SME_en.m3u8'))); await player.play();
To Reproduce (i.e. user steps, not code) Steps to reproduce the behavior:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
Error messages
I/ExoPlayerImpl(13966): Init 951074a [ExoPlayerLib/2.18.7] [tissot_sprout, Mi A1, Xiaomi, 28]
E/ExoPlayerImplInternal(13966): Playback error
E/ExoPlayerImplInternal(13966): com.google.android.exoplayer2.ExoPlaybackException: Source error
E/ExoPlayerImplInternal(13966): at com.google.android.exoplayer2.ExoPlayerImplInternal.handleIoException(ExoPlayerImplInternal.java:644)
E/ExoPlayerImplInternal(13966): at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:614)
E/ExoPlayerImplInternal(13966): at android.os.Handler.dispatchMessage(Handler.java:102)
E/ExoPlayerImplInternal(13966): at android.os.Looper.loop(Looper.java:193)
E/ExoPlayerImplInternal(13966): at android.os.HandlerThread.run(HandlerThread.java:65)
Expected behavior The url which I given in the example code works fine in the chrome. The issue is only happening in android device.
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: [e.g. MacOS + version]
- Browser [e.g. chrome, safari + version]
Smartphone (please complete the following information):
- Device: Mi A1
- OS: [e.g. iOS8.1]
Flutter SDK version
[√] Flutter (Channel stable, 3.19.5, on Microsoft Windows [Version 10.0.19045.4291], locale en-IN)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[√] Chrome - develop for the web
[X] Visual Studio - develop Windows apps
X Visual Studio not installed; this is necessary to develop Windows apps.
Download at https://visualstudio.microsoft.com/downloads/.
Please install the "Desktop development with C++" workload, including all of its default components
[√] Android Studio (version 2021.2)
[√] Android Studio (version 2022.2)
[√] VS Code (version 1.88.1)
[√] Connected device (4 available)
[√] Network resources
Additional context Add any other context about the problem here.