Canardoux / flutter_sound

Flutter plugin for sound. Audio recorder and player.
Mozilla Public License 2.0
877 stars 573 forks source link

File created as *.mp4 instead of *.mp3 #42

Closed ghost closed 5 years ago

ghost commented 5 years ago

Version of flutter_sound

flutter_sound: ^1.0.6

flutter doctor

[√] Flutter (Channel stable, v1.0.0, on Microsoft Windows [versão 10.0.17134.523], locale pt-BR) [√] Android toolchain - develop for Android devices (Android SDK 28.0.3) [√] Android Studio (version 3.2) [√] IntelliJ IDEA Community Edition (version 2018.3) [√] Connected device (1 available)

• No issues found!

Platforms you faced the error (IOS or Android or both?)

Android

Expected behavior

Save file as *.mp3

Actual behavior

File is saved as .mp4, if i change to .mp3 renaming the file, playing it works (with an audio player app)

Tested environment (Emulator? Real Device?)

Real device. Alcatel 5085N A5 Android 6

Steps to reproduce the behavior

Just follow the docs to start and stop the recorder, then test the code and see the file in the folder.

hyochan commented 5 years ago

This is a feature request related #19. Hope you can push PR if you can handle this thing.

venuxvg commented 5 years ago

I have changed null in StartRecorder and StartPlayer

String path = await flutterSound.startRecorder('/storage/emulated/0/default.mp3'); String path = await flutterSound.startPlayer('/storage/emulated/0/default.mp3');