getodk / collect

ODK Collect is an Android app for filling out forms. It's been used to collect billions of data points in challenging environments around the world. Contribute and make the world a better place! ✨📋✨
https://docs.getodk.org/collect-intro
Other
718 stars 1.38k forks source link

When there are 2 audio widgets on a field-list the sound which is playing has a malfunctioning seekbar when another sound recording starts. #5989

Open dbemke opened 8 months ago

dbemke commented 8 months ago

ODK Collect version

the store version 2024.1.1, the master version 8c72f975cd2239764891e99226a93cc17d3d6ced

Android version

10, 14

Device used

Redmi 9T, Pixel 7a

Problem description

It’s possible to play a recorded sound and record a sound at the same time when there are two audio widgets on a field-list and the sound which is playing gets to the moment when the other audio started recording and the slider in the seekbar moves forward and backwards. The issue doesn’t occur in the 2023.3.1 ( possible to record sound and play sound at the same time but when the sound which is playing the slider in the seekbar doesn't move forwards and backwards).

Steps to reproduce the problem

  1. Go to AllQ410withoutText form. AllQ4190withoutText.xml.txt
  2. Record sound in "audio 1” question (e.g. 20 seconds).
  3. Play the recorded sound (e.g. 5 seconds of the sound).
  4. While the sound is playing record sound in "audio 2” question.
  5. Check what happens in audio 1 question.

    Expected behavior

    When the sound is playing the seekbar shouldn't go forward and backwards.

seadowg commented 8 months ago

Reopened by revert (https://github.com/getodk/collect/pull/5999)

https://github.com/getodk/collect/pull/5992#issuecomment-1976744255 was the regression caused by the reverted PR.

seadowg commented 8 months ago

Moving this to v2024.2 rather than a hotfix as we're seeing a lot of regressions with audio and I don't want to add any pressure to this. It's likely that we need better testing in AudioClipViewModel - I'd be interested to replace the MediaPlayer mock with a fake for catching more problems with how we transition through states there.