rgerum / unofficial-duolingo-stories

This project brings the official Duolingo Stories to new languages, translated by a community effort.
https://duostories.org
135 stars 28 forks source link

Intermediate hangs on iPadOS, audio sometimes stops completely #150

Closed oliverklee closed 2 years ago

oliverklee commented 2 years ago

On iPadOS 15.6.1 on an iPad Air (4th generation), the stories hang every now and then for 4-7 seconds (or sometimes even indefinitely).

Steps to reproduce

  1. go to https://www.duostories.org/
  2. click on "Dutch"
  3. play through the story

Expected results

I can smoothly play through the story without any hangs - either while listening to the audio in full length, or fast-forwarding by quickly clicking on the "next" button. The UI is always responsive.

Actual results

Every now and then, the UI completely freezes for 4-7 seconds (and sometimes indefinitely), including the audio output. It does not react to any UI clicks. After waiting fore a few seconds, I can continue.

Also, sometime the audio stops completely after the hang, even though I can continue playing through the story.

Additional information

This problems happens on iPadOS 15.6.1 using the latest Safari, Firefox and Firefox Klar without any (additional) blockers.

This problem does not happen on iOS 15.6.1 on an iPhone 7 with Safari or Firefox Klar.

It also does not happen with Firefox or Chrome on Linux, and also not with Chrome, Firefox or Safari on Mac OS.

PaoloDiBello commented 2 years ago

Just to add some testing I have done: it doesn't happen on iPad Pro 11 v12.1 on Safari

rgerum commented 2 years ago

Hmm maybe it has to do with the audio loading. I think Duolingo loads the audio directly in the beginning so avoid delays during the story. Maybe I have to find an iPad to test.

rgerum commented 2 years ago

I reworked how the audio is loaded. Now all audio files are loaded before starting the story. Also before a new audio file is played the old one is stopped. These might have caused problems. Maybe you can test again now.

oliverklee commented 2 years ago

This now works fine on my device: Both problems are gone. Thanks a lot! :heart: