internetarchive / internetarchive/bookreader
Buffer soundmanager audio files in TTS plugin
- Dominant language
- JavaScript
- Stars
- 1.2k
- Forks
- 491
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 3
Description
**Context**
Currently, after each chunk is read, TTS is stopped while the next audio chunk is loaded in. We should buffer these chunks so there is no pause.
**Proposal & Constraints**
- We can't call `.load()` on 2 soundmanager instances simultaneously because of mobile browser restrictions, but maybe we can `ajax` request the audio file, convert it to a `base64`, and then pass it into SM's `createSound` method as a url.
**Additional Resources**
- https://github.com/internetarchive/bookreader/pull/140/commits/ad6a36608cdf0a987df4db63472f3b94f726139a This removed buffering because of mobile browser restrictions
- http://www.schillmania.com/projects/soundmanager2/doc/technotes/#mobile-device-limitations
- http://www.schillmania.com/projects/soundmanager2/doc/
**Success Metrics**
- There is no pause between page chunks.
**Stakeholders**
@shaneriley
Contributor guide
Assessment
This issue has not been assessed yet.