freelawproject / courtlistener

A fully-searchable and accessible archive of court data including growing repositories of opinions, oral arguments, judges, judicial financial records, and federal filings.
https://www.courtlistener.com
Other
553 stars 151 forks source link

Oral Argument Player Needs Speeds #1798

Open brianwc opened 3 years ago

brianwc commented 3 years ago

The embedded audio player on the CL site only allows one to playback at normal speed. Unless I'm listening to music or a movie these days, I virtually always listen and watch at 1.5x to 1.75x speed. When one merely wants to get the information out of a source and is not engaged in aesthetic appreciation of it, this is a really commonplace practice, so the player should support it.

mlissner commented 3 years ago

This would be nice. We use a open source library for this. It looks like it supports different playback rates, though I don't know if the skin they provides would support them. If not, we'd need to add buttons for this outside the player itself, I suppose, which might be tricky to make look good.

In any case, this is doable if somebody wants to take a stab at it: https://jplayer.org/latest/developer-guide/#jPlayer-option-playbackRate

j-f1 commented 1 year ago

Would it be reasonable to get rid of the audio player all together and just embed an <audio> element? HTML5 and mp3 are supported on basically every browser, and recent versions of Chrome, Firefox, and Safari support changing playback rate natively.

mlissner commented 1 year ago

Probably not a terrible idea. The other feature we hear requests for is being able to share a link at a particular moment, which our player doesn't support and I assume the built in ones don't either. Is there a page demoing the built in players somewhere?

j-f1 commented 1 year ago

If you go to the direct URL for an oral argument (like https://storage.courtlistener.com/mp3/2014/04/11/elrico_fowler_v._carlton_joyner_cl.mp3) you should get the built-in browser audio player. In terms of being able to share a link to a particular moment, a short JS snippet could set the currentTime attribute to the value of a query parameter or fragment.

flooie commented 1 year ago

Is want to add one that allows for transcripts. I built a small branch a couple months back that let you follow the transcript and jump around based on that.

flooie commented 1 year ago

Just my two cents if we’re updating it we should use one that allows for that.

j-f1 commented 1 year ago

That could be supported by watching the timeupdate event (for highlighting in the transcript if desired) and updating currentTime (when jumping around based on the transcript).