3 ms·
I'm really glad you enjoyed it! I've never done that before, but it just felt like the perfect opportunity.
by StevenWaterman 6y ago
I'm really glad you enjoyed it! I've never done that before, but it just felt like the perfect opportunity.
- bsimpson 6y ago> Defeated, I just accepted there was no way to do it. I would just have to live with it like this forever. I accepted that, and I could move on. I did not believe you. > I did what anyone else would do in my position. I wrote a driver. Seriously, this is fantastic.
- vbernat 6y agoI have also enjoyed it. This is really good for accessibility. I suppose you use the "timeupdate" event and "scrollIntoView()" to sync text and audio but I would be interested to read more on how you have achieved this.
- StevenWaterman 6y agoYep, you're exactly right. The SL blog uses Jekyll, so I'm limited to just using a markdown document with some ugly hacks. Essentially, there's a div before each paragraph specifying the timestamp in its id - all done manually. I use `querySelectorAll` to get a list of those divs, extract the timestamps from the IDs, and store them in an array. In the audio's `timeUpdate`, I check which paragraph we're on, and if it has changed then scroll to the next sibling of the timestamp div. No magic bullet sadly!
- spicybright 6y agoI very much enjoyed it, keep doing this style!