octatone / reddit.tv

HTML5 and AJAX display of videos from reddit.com to replace reddit.tv. Includes any video embed type from reddit. Only backend is reddit.com's API, everything else is clientside.
http://reddit.tv
MIT License
64 stars 72 forks source link

Thumbnail list #5

Closed fagga closed 13 years ago

fagga commented 13 years ago

I made a list of thumbails of the videos in the current channel.

This is just a very basic concept of what I would like to have and most of the work is still to be done, but I wanted to know what you think. Are you okay with this approach? Do you have any suggestions?

octatone commented 13 years ago

Are you making thumbnail previews for all the domains? Do you have a working version I can checkout?

I'm curious how you are integrating it into the design.

fagga commented 13 years ago

I committed what I’ve done so far into my fork: https://github.com/fagga/reddit.tv (I tried to make a pul request, but github told me there is another pull request going on. No idea what’s going on there.)

Here is a screenshot: http://i.imgur.com/2hiDk.jpg

There seems to be a thumbnail for almost all videos. For the <1% without one, I’ll make a “no thumbnail” placeholder. That’s not perfect, but it still gives one a good idea about the playlist, i.e. size, position, what comes next, etc.

octatone commented 13 years ago

Yeah. that looks good, let me know when it's good to go :)

fagga commented 13 years ago

Great, I will.

fagga commented 13 years ago

Everything works so far, see my commits.

The thing missing from putting it in “production” is clickable thumbnails. To do this, loadVideo() has to take specific videos as arguments, not just “next” and “prev”. You mentioned somewhere that you are working on premalinking a specific video, which would need the same enhancement to loadVideo(), so I’m asking if you have done anything so far in that direction.

octatone commented 13 years ago

I'll push the permalinks code hopefully tomorrow (which includes updates to loadVideo to load by specifc #). Permalinks logic is in the anchor check: when a new permalink id is found in the location hash (and not set by the next/previous binds) the videos array is searched first, if found that array position is returned for loadVideo, if not found in the videos array an AJAX request is made to reddit.com to get the individual ID's embed information.

fagga commented 13 years ago

OK, I’ll wait for your commit then.

fagga commented 13 years ago

There you go. Very nice list of thumbnails.

The last commit animates the thumbnail list, which is a bit silly I think. But it was fun to play with. (: You decide if you want to pull it.

octatone commented 13 years ago

Looks good. Just needs some bug fixes before I can merge and push the commit:

With the permalink code, any ID is valid and it will be prepended on to the videos object if it is not in the current feed for example: /#/domain/youtube.com/ezmt8

Your loadVideoList is dependent on the video list being static, we need a method to prepend the thumbnail info onto your list and have it displayed properly (highlighted).

Checkout the reddit.tv master to see how a permalink outside the current reddit feed should load.

fagga commented 13 years ago

I just had a quick look at it and I’m not sure if I can come up with a fix that uses an insertThumbnail() function. Did you mean something like that?

Wouldn’t it be better to make the list of videos a named list instead of an array? A certain video could then be addressed with video['ezmt8'] and not video[17]. That should make it a lot easier to find and insert videos without screwing up the list.

octatone commented 13 years ago

Actually, found a quick and easy work around. It was just the order of logic that was breaking things. I'll be committing soon and pushing.

octatone commented 13 years ago

Just going to clean up some stuff before pushing live, probably will have the thumbnails live on the site by tomorrow.

fagga commented 13 years ago

Great!

I just fixed the mouse cursor to indicate clickable thumbnails.