-
-
Notifications
You must be signed in to change notification settings - Fork 17
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
Usage Example #44
Comments
You just need to add |
Yes, I agree with you, but the package has an issue. It didn't work the first time you tried to play. On the second click, it works. in the beginning, I thought it was an issue I searched on it and I thought it was #30 the main project uses examples like issue #39 // This is OK
final _playList = ConcatenatingAudioSource(
children: [
AudioSource.uri(Uri.parse("http://localhost:5000/song1")),
AudioSource.uri(Uri.parse("http://localhost:5000/song2")),
AudioSource.uri(Uri.parse("http://localhost:5000/song3")),
AudioSource.uri(Uri.parse("http://localhost:5000/song4")),
]);
// This has NOT OK : progressbar lost position and got frozen when hit next song.
final _playList = ConcatenatingAudioSource(
children: [
AudioSource.uri(Uri.parse("asset:///assets/songs/song1.mp3")),
AudioSource.uri(Uri.parse("asset:///assets/songs/song2.mp3")),
AudioSource.uri(Uri.parse("asset:///assets/songs/song3.mp3")),
AudioSource.uri(Uri.parse("asset:///assets/songs/song4.mp3")),
]); I attempted something similar, but it didn't work. Nothing plays and no errors appear. I searched extensively for an example of how to use it on Windows. Maybe I did something wrong, but as you said, it's the same implementation. So, I created a new project with only a button in the center and used this code. body: Center(
child: ElevatedButton(
onPressed: () async {
final player = AudioPlayer();
await player.setFilePath(
"C:\\$dir\\$dir\\$dir\\Documents\\muhammad_siddeeq_al-minshaawee\\100.mp3");
player.play();
},
child: Icon(Icons.play_arrow)),
), this was printed [just_audio_windows] Called setVolume
[just_audio_windows] Called setSpeed
[just_audio_windows] Called setPitch
[just_audio_windows] Called setSkipSilence
[just_audio_windows] Called setLoopMode
[just_audio_windows] Called setShuffleMode
[just_audio_windows] Called load
[ERROR:flutter/shell/common/shell.cc(1065)] The 'com.ryanheise.just_audio.events.85e74c38-141f-440f-8b62-c28dac5193d3' channel sent a message from native to Flutter on a non-platform thread. Platform channel messages must be sent on the platform thread. Failure to do so may result in data loss or crashes, and must be fixed in the plugin or application code creating that channel.
See https://docs.flutter.dev/platform-integration/platform-channels#channels-and-platform-threading for more information.
[ERROR:flutter/shell/common/shell.cc(1065)] The 'com.ryanheise.just_audio.data.85e74c38-141f-440f-8b62-c28dac5193d3' channel sent a message from native to Flutter on a non-platform thread. Platform channel messages must be sent on the platform thread. Failure to do so may result in data loss or crashes, and must be fixed in the plugin or application code creating that channel.
See https://docs.flutter.dev/platform-integration/platform-channels#channels-and-platform-threading for more information. After clicking again, it prints the same response and an additional line.
The whole point is, if there is an issue that takes a lot of time to resolve, you can add a warning to the Windows readme to let us know about it instead of wasting a lot of time searching why it's not working. |
If you still see this and it doesn't matter, please close the issue. Thanks for listening 🙏 |
Can you run the app with Visual Studio and get the stacktrace from there? Thanks. |
hmm it works like that and this is Stacktrace [just_audio_windows] Called setVolume
[just_audio_windows] Called setSpeed
[just_audio_windows] Called setPitch
[just_audio_windows] Called setSkipSilence
[just_audio_windows] Called setLoopMode
[just_audio_windows] Called setShuffleMode
[just_audio_windows] Called play
[just_audio_windows] Called load
[ERROR:flutter/shell/common/shell.cc(1065)] The 'com.ryanheise.just_audio.events.018c9958-268d-48e8-beec-1a263d2053df' channel sent a message from native to Flutter on a non-platform thread. Platform channel messages must be sent on the platform thread. Failure to do so may result in data loss or crashes, and must be fixed in the plugin or application code creating that channel.
See https://docs.flutter.dev/platform-integration/platform-channels#channels-and-platform-threading for more information. maybe the issue appear only with the audio source I will test it and update u |
@moha-b apparently I did some checking and |
facing the same issue but it didn't work at all
any hint would be really appreciated |
I have the same problem. |
To which pages does your suggestion apply?
Quote the sentences(s) from the documentation to be improved (if any)
Describe your suggestion
I need an example or guide on how to use this package on Windows. I tried using it like
just_audio
, but it didn't work. There was no error or exception of any kind thrown, so it would be helpful to have an example to follow and improve the Windows section in thejust_audio
package.The text was updated successfully, but these errors were encountered: