Signal Lock

Thoughts, fragments, signals
The home of Colin Walker.
Written and sonic.

randomelements logo

#

The new randomelements ep "silver machine" is out now!

You can read all about it over on the randomelements site.

The title track is on YouTube:

Echoes


- today's echoes

Resonance

Anomaly

I realised there was a fundamental flaw with my podcasts view for /reader: tracking progress.

If I were to close the browser or refresh the page each audio tag would reset to 0 and I'd have to seek through until I found where I was.

Not any more...

Various attributes of the audio tag are accessible via script including, importantly, currentTime.

The page, like /reader itself, is public so I run a check to see if I'm logged in. If so, a script will periodically (every 10 seconds) check the value of currentTime and, if it has changed, write that to the database entry for that item.

Likewise, if logged in, I check against the database for the last recorded time and set that on page load. This means I will only ever be a maximum of 10 seconds out should I accidentally close the browser or navigate away.



- investigate anomaly