Skip to content
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

Data Tab view using the wrong endpoint for audio attachments #4597

Open
JacquelineMorrissette opened this issue Aug 22, 2023 · 1 comment
Open
Assignees
Labels
bug Things broken and not working as expected Front end

Comments

@JacquelineMorrissette
Copy link
Contributor

JacquelineMorrissette commented Aug 22, 2023

Description

While collecting background data with Collect, an error occurs while trying to play AMR files.

Steps to Reproduce

  1. Create a new form
  2. Enable background audio
  3. Set the audio quality to Voice-Only
  4. Save and deploy the form
  5. Download the form on Collect
  6. Complete a submission with the device collecting background audio
  7. Send the submission
  8. Refresh web UI
  9. Go to the form Data tab
  10. Try to play audio and receive an error

Expected behavior

The Audio should play without issue

Actual behavior

There is an error when attempting to play the .amr file

Additional details

The /attachments endpoint loads the .amr file without issue, and the file is playable on download.
This is probably the culprit:

AMR file is not one of the supported audio files that html5 audio tag supports. Please see the list below for supported audio formats:

http://en.wikipedia.org/wiki/HTML5_Audio#Supported_audio_coding_formats

I would recommend you convert your amr file to mp3 or ogg and then upload it and play it on your server.

https://stackoverflow.com/a/27915473

We should be using the audio-conversion feature of the /attachments/ endpoint here to avoid issues like this
/api/v2/assets/{asset_uid}/data/{data_id}/attachments/?xpath=Path_to_audio_question&format=mp3

@JacquelineMorrissette JacquelineMorrissette added bug Things broken and not working as expected Front end labels Aug 22, 2023
@JacquelineMorrissette
Copy link
Contributor Author

Assigned to @magicznyleszek for delegation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Things broken and not working as expected Front end
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

3 participants