iOS audio fix

pull/1011/head
Gabby Gurdin 2 years ago
parent e0960df342
commit d4e3195531

@ -136,14 +136,14 @@ class AudioPlayerState extends State<AudioPlayerWidget> {
audioPlayer.setFilePath(audioFile.path); audioPlayer.setFilePath(audioFile.path);
} else { } else {
// #Pangea // #Pangea
final data = matrixFile!.bytes; // final data = matrixFile!.bytes;
final mimeType = matrixFile!.mimeType; final mimeType = matrixFile!.mimeType;
//shouldn't have to be settting this here //shouldn't have to be settting this here
//TODO: figure out why this is necessary //TODO: figure out why this is necessary
matrixFile = MatrixAudioFile( matrixFile = MatrixAudioFile(
bytes: matrixFile!.bytes, bytes: matrixFile!.bytes,
name: matrixFile!.name, name: matrixFile!.name,
mimeType: "audio/mp3", mimeType: mimeType,
); );
debugPrint("audioType is $mimeType"); debugPrint("audioType is $mimeType");
// TODO - figure out why it's a wav at this point // TODO - figure out why it's a wav at this point

@ -114,12 +114,12 @@ class PangeaMessageEvent {
// final fileName = // final fileName =
// text.trim().replaceAll(RegExp('[^A-Za-z0-9]'), '').substring(0, 20); // text.trim().replaceAll(RegExp('[^A-Za-z0-9]'), '').substring(0, 20);
final eventIdParam = _event.eventId; final eventIdParam = _event.eventId;
final fileName = "audio_for_${eventIdParam}_$langCode"; final fileName = "audio_for_${eventIdParam}_$langCode.mp3";
final file = MatrixAudioFile( final file = MatrixAudioFile(
bytes: audioBytes, bytes: audioBytes,
name: fileName, name: fileName,
mimeType: response.mediaType, mimeType: "audio/mpeg",
); );
// try { // try {

@ -62,7 +62,10 @@ dependencies:
http: ^0.13.6 http: ^0.13.6
image_picker: ^1.0.0 image_picker: ^1.0.0
intl: any intl: any
just_audio: ^0.9.30 # #Pangea
# just_audio: ^0.9.0
just_audio: ^0.9.36
# Pangea#
keyboard_shortcuts: ^0.1.4 keyboard_shortcuts: ^0.1.4
latlong2: ^0.8.1 latlong2: ^0.8.1
linkify: ^5.0.0 linkify: ^5.0.0

Loading…
Cancel
Save