Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timestamp links to shownotes #41

Closed
swordfischer opened this issue Oct 8, 2013 · 18 comments · Fixed by #80
Closed

Timestamp links to shownotes #41

swordfischer opened this issue Oct 8, 2013 · 18 comments · Fixed by #80

Comments

@swordfischer
Copy link
Contributor

We talked about being able to link directly to a part in the shownotes.

This should be easy achievable by adding id="timestamp-00:00:00" to the elements, then using url/#timestamp-00:00:00 - probably even have some JS to highlight the line.

@swordfischer
Copy link
Contributor Author

Oh, apparently css has :target for that purpose.

https://steamlug.org/cast/s01e10#ts-00:04:40

@Cheeseness
Copy link
Contributor

Oh wow, nice work. Is there more that needs doing or can we close this issue?

I wonder what kind of access we can get to the audio widget. it would kinda be neat to have the shownotes scroll to what you were currently listening to.

@Cheeseness
Copy link
Contributor

Actually, @epitron in IRC put together this script for automatic timestamp highlighting https://gist.github.com/epitron/6896795

I haven't had a look at it yet.

@epitron
Copy link

epitron commented Oct 9, 2013

That gist has some bugs... I'm currently fixing it.

@epitron
Copy link

epitron commented Oct 9, 2013

Okay! Fixed!

https://gist.github.com/epitron/6896795

It's super easy to integrate. Just plop it in, as I demonstrated in the_html.html, and add the CSS classes.

@epitron
Copy link

epitron commented Oct 9, 2013

BTW, a couple of the timestamps on Episode 10 are messed up. eg: 00:04:40 Monkey Island [source] should be 05:40. (They're really obvious because they're out of order.)

@Cheeseness
Copy link
Contributor

Fixed the Monkey Island time (it was super rushed - my bad).

@meklu mentioned that this doesn't pass jslint, so we may want to do a little refactoring on it if we want to adopt it.

@epitron
Copy link

epitron commented Oct 9, 2013

I just ran my code through JSLint. These are 95% style issues. The rest are just pedantic.

Try the code! It works good!

@epitron
Copy link

epitron commented Oct 9, 2013

BTW, I wrote the code so that if there's an error, the player doesn't stop working. It's purely listening to events and highlighting the timestamps.

@Cheeseness
Copy link
Contributor

Something I was thinking yesterday was that we could use the same kind of approach to make a tool for shownote creation where keyboard shortcuts could pause, play, seek and automatically add a timestamp without removing focus from the text input area.

When I've done shownotes for SteamLUG Cast and transcribing other things, switching focus back and forth between my audio and text applications has been the biggest bottleneck, so for at least how I do things, that could have a huge impact on how quickly and efficiently that job could be done.

@epitron
Copy link

epitron commented Oct 11, 2013

Yep, that could be a nice simple little piece of Javascript.

But back on topic... are you ready to put my script on your site? :)

@Cheeseness
Copy link
Contributor

As I said originally, it might be a couple of weeks before I personally get time to review it, but I have no objections to one of the others committing it if they feel it's ready.

Edit: I do want to highlight though that I am hugely appreciative of this contribution :D

@meklu
Copy link
Member

meklu commented Oct 11, 2013

I've gone through the linting process now, and have pushed this live. Thanks @epitron!

@meklu meklu closed this as completed Oct 11, 2013
@meklu
Copy link
Member

meklu commented Oct 11, 2013

Err, I think we might want to leave this issue open after all, for the fragment stuff. "Oops."

@meklu meklu reopened this Oct 11, 2013
@epitron
Copy link

epitron commented Oct 11, 2013

Fragment stuff? Is this something I can help with?

@johndrinkwater
Copy link
Member

Whycome this is open, thought it was completed? @meklu ?

@meklu
Copy link
Member

meklu commented Jun 12, 2014

The URL doesn't get changed when you hit a timestamp, making it somewhat tedious to link to a specific point in time. You have to manually put the element id (#ts-HH:MM:SS) in the URL to do so.

@johndrinkwater
Copy link
Member

Can add something like
history.pushState( { time: this.seconds }, "Skipped to" + time.seconds, "#ts-" + (new Date(time.seconds*1000)).toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/, "$1") );
on this line
https://github.com/SteamLUG/steamlug.org/blob/master/scripts/castseek.js#L54

Each call to pushState will replace #fragment for us :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants