As of 2016-02-26, there will be no more posts for this blog. s/blog/pba/
Showing posts with label lilbtn. Show all posts

Warning

Justin.tv is gone and some links and stuff have been removed from this post. (2015-12-05T01:09:17Z)

I have known Justin.tv for years, but only recently I started watching StarCraft II gaming streams. I was bored, no blogging, gotta find something else to kill time.

Just like every websites, the stream pages have too much stuff. When you just want to watch the stream and to chat, thats all. But you get a lot of stuff you dont need, that wastes browsers resource to keep them.

Yes, you can pop out the stream and chat. However, you dont want to pop them every time you want to watch. Why not just a simple URL, bookmark it, and you can get the stream and chat? Moreover, sometimes, I open two streams and one YouTube video from my subscriptions. I need something simple.

Therefore, I started writing this Clean Justin.tv Viewer, here is a screenshot to get you the idea of what I was thinking:

http://1.bp.blogspot.com/-6lsSYP43fJ8/Thdno6phGsI/AAAAAAAACyI/oLGJg3EK-OE/s800/2011-07-09--02%253A45%253A15.png

The viewer is seen at bottom right corner. My window manager is dwm, I switched to it only for a couple of days. The web browser is Firefox with Vimperator. Everything is as cleanly as possible. You dont see the window title bar because of dwm, you dont see space waster of browsers toolbars. The only unnecessary thing you can see is the statusline of Vimperator.

Note

I discovered this channel Walking Home when I searched for cooking, its about a long walk from Arizona to Michigan. Its basically a 24/7 channel and a OK channel to use as an example. (There are many channels on Justin.tv, I dont feel OK) It might be boring for most of time, often interrupted due to poor connection, but you could see the real life. Real reality tv, not those scripted unscripted-claimed lame tv shows.

At first glance, it looks like a normal Justin.tv embed, move your mouse over below the logo, you should be able to see the controls.

I like the chat box overlays the video and I can hide the bottom bar to make the video as largely as possible.

Warning

This project is dead and some links are removed from this post. (2015-12-01T23:24:44Z)

Lightweight YouTube Player Loader is a way to reducing resource usage on client-side. Its written for bloggers mainly because some may embed many YouTube videos in just one post. This loader doesnt load Flash player by default, which is loaded currently default YouTube embed. It accesses YouTube API and shows thumbnail as well as the title and author. This is a continued work after I posted about the loading time of YouTube player. A quick test of five 720p videos in one page, the video quality isnt matter since no video is loaded after YouTube player loaded. The YouTube players take 2+ seconds, this loader only takes 0.8 seconds. The memory usage in Chromium 9, YouTube player uses less than 20MB but 70+ for Flash player. This loader uses ~30MB, only one third.

1   Current Status

Experimental. Unexpected errors may occur, they should be seen as blank page. Please report if you encounter one.

2   Features

  • Showing thumbnail and slideshows of three thumbnails when cursor stays on iframe.
  • Providing title and author information and a direct link to YouTube video page.
  • All features of new YouTube iframe embed code will still work.
  • Supports HTTPS mode.

3   How to Use

Whatever the new code is, e.g.

<iframe title="YouTube video player" width="853" height="510" src="http://www.youtube.com/embed/[VIDEO_ID]?rel=0" frameborder="0" allowfullscreen></iframe>

You simply replace www.youtube.com with lilbtn.yjl.im or lilbtn.appspot.com,

<iframe title="YouTube video player" width="853" height="510" src="http://lilbtn.yjl.im/embed/[VIDEO_ID]?rel=0" frameborder="0" allowfullscreen></iframe>
<!-- or -->
<iframe title="YouTube video player" width="853" height="510" src="http://lilbtn.appspot.com/embed/[VIDEO_ID]?rel=0" frameborder="0" allowfullscreen></iframe>

If its a HTTPS mode, then you can only use lilbtn.appspot.com at this moment,

<iframe title="YouTube video player" width="853" height="510" src="https://lilbtn.appspot.com/embed/[VIDEO_ID]?rel=0" frameborder="0" allowfullscreen></iframe>

4   How This Works

The loader reads the link and extract the video ID, then accesses API for video information. Title, author, link, and thumbnails. It will show the default thumbnail and render the title and author, also a link to video page on YouTube. If user clicks, then the loader put the original YouTube embed code on, then removes itself. When cursor stays on the loader for a while, it will change the thumbnail every a few seconds, so user can see some snapshots.

5   Source Code

You can view the source code (New BSD License) on GitHub.

6   Support

If you need troubleshooting help, please post to discussion group. Any idea or feedback also are welcome to post as well. If you find bugs or want to request a feature, please use issue tracker, instead. In any case, please prefix the subject of your post or issue with [g-yt-embed]. Unless its general to any video, say broken for any video, you must supply a YouTube video page URL which is affected, or your post or issue will be deleted and ignored.