question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[HELP]: About when to display the audio file duration in SoundPlayerUI

See original GitHub issue

Here is my question :

First of all, thank you for creating a nice plugin.

What I would like to do this time is to call the fromTrack method of SoundPlayerUI and display how long the audio file is when the track is loaded. Is there any way to do this?

In the current situation, the duration is updated after the play button is pressed, so I want to change it when the track is loaded.

                  SoundPlayerUI.fromTrack(
                    track,
                    enabled: true,
                    showTitle: false,
                    audioFocus: AudioFocus.requestFocusAndDuckOthers,
                  ),

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:12

github_iconTop GitHub Comments

3reactions
Larpouxcommented, Jan 31, 2022

I have just decided to delay Taudio during several weeks because I think that this change will be great for Flutter Sound. That’s a shame because I really think that Taudio will be a great project. But I cannot leave Flutter Sound dying without maintenance. Very soon we will have 777 likes on pub.dev. This means that I am working for 777 people who like what I am doing. It makes me feel good. Very good.

This will be Flutter Sound 10.x : it will be major breaking changes in the API

1reaction
Larpouxcommented, Jan 24, 2022

I am not sure that we can know the duration before starting the playback. @Alvarocda : can you look to this issue ? It seems that we really need to open the sound during the openPlayer(). If we do that, we will know the duration after openPlayer() and before startPlayer()

Read more comments on GitHub >

github_iconTop Results From Across the Web

Need to find the duration of audio file. - CodeProject
C#. Expand ▽. using System; using System.Text; using System.Runtime.InteropServices; namespace Sound { public static class SoundInfo ...
Read more >
How to get length of audio file without playing it in Flutter/Dart
I'm trying to display the length of audio files in my Flutter application. I've used both the flutter_sound and audioplayers plugins but I'm ......
Read more >
SoundPlayer.Play Method (System.Media) | Microsoft Learn
Plays the .wav file using a new thread, and loads the .wav file first if it has not been loaded.
Read more >
The Embed Audio element - HTML - MDN Web Docs - Mozilla
metadata : Indicates that only audio metadata (e.g. length) is fetched. auto : Indicates that the whole audio file can be downloaded, even...
Read more >
HTML Audio - W3Schools
The HTML <audio> element is used to play an audio file on a web page. ... tags will only be displayed in browsers...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found