Closed danielweck closed 4 years ago
Cool! One thing though - did the sync points change in the narration document, or is the player not respecting the clip boundaries? The original version that I posted purposely excluded the audio for "read by
Note: both demos (Marisa's own experiment, and this one which uses an existing lib) currently hard-code the CSS "active" classes. These should be declared somewhere so that a playback engine (irrespective of the implementation details) can discover what class names to use.
Note: this implementation requires a single audio resource, whereas (I think) the sync-media-narration JSON can reference different audio files (?).
The playback model in this implementation does not seem to be capable of handling clip begin and end. I other words, the injected "play head" is equivalent to clip-begin only, there is an assumption that audio clips are contiguous within a given audio stream.
Bug? The text highlight only syncs when audio playback reaches the known beginning of an audio fragment. There is stale highlighted text when scrubbing the playback bar directly in the audio controls UI.
I filed an issue here: https://github.com/thephilgray/custom-readaloud-plugin/issues/21
I filed another issue: https://github.com/thephilgray/custom-readaloud-plugin/issues/22
Note how this implementation enables keyboard navigation by setting an ARIA role
of button
and tabindex
on all synchronized elements. This behaviour should probably activated "on demand" to avoid UX issues, i.e. activate specifically during the synch'ed text/audio experience. But otherwise, I like the idea :)
Closing as this would overwrite the existing demo. Suggest putting in a different folder.
For sure. Let's delete my branch as well to avoid future housekeeping. The code diff is trivial and will be preserved in this PR for posterity anyway :)
Experiment with https://github.com/thephilgray/custom-readaloud-plugin