Agora-Flutter-SDK icon indicating copy to clipboard operation
Agora-Flutter-SDK copied to clipboard

[Question] How do you use `playEffect` with downloaded audio files?

Open CodingAleCR opened this issue 3 years ago • 2 comments

Hi, I ran into an issue while trying to use playEffect with files downloaded to path_provider's temporary directory. Is there a way to make it properly work? If so, where can I find an example?

This is the code I tried to make it work with:

    final tempDir = await getTemporaryDirectory();
    final soundFile = File('${tempDir.path}/sound-file.mp3');

    log('Is absolute ${soundFile.isAbsolute}');
    log(soundFile.absolute.path);
    log(soundFile.resolveSymbolicLinksSync());
    log(soundFile.path);

    await AgoraClient.instance.engine.playEffect(
      99,
      soundFile.path,
      0,
      1,
      1,
      100,
      false,
    );

CodingAleCR avatar Dec 28 '21 23:12 CodingAleCR

Hello @CodingAleCR, I think it's supported.

littleGnAl avatar Mar 02 '22 07:03 littleGnAl

I tried but could not get it to work, in the end I took a different route for this: implemented the audio file processing on web app and play it for everyone in the call.

CodingAleCR avatar Mar 02 '22 07:03 CodingAleCR

I think you can make it work easily on agora_rtc_engine: ^6.0.0 by using MediaPlayer, please check https://github.com/AgoraIO-Extensions/Agora-Flutter-SDK/blob/main/example/lib/examples/advanced/media_player/media_player.dart for reference.

littleGnAl avatar Nov 15 '22 05:11 littleGnAl

Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now. If you find this problem please file a new issue with the same description, what happens, logs and the output. All system setups can be slightly different so it's always better to open new issues and reference the related ones. Thanks for your contribution.

github-actions[bot] avatar Dec 06 '22 05:12 github-actions[bot]

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please raise a new issue.

github-actions[bot] avatar Apr 28 '23 09:04 github-actions[bot]