Showing posts with label chromeos. Show all posts
Showing posts with label chromeos. Show all posts

Monday, November 29, 2010

Youtube ETA - Chrome extension

If you have ever tried to watch a youtube video on a slow network connection, you will know the frustration I often face. Wondering when that red progress bar will reach its end. Thanks to a chrome extension like Stop Autoplay, I can let the youtube video open in background tab and let it buffer as I browse other webpages. But still I have to go back to the youtube video's tab to find out if the video is downloaded, can I start watching it?

So I always wished someone had written an extension which will do something about this problem. After going through 3-4 pages of search results on chrome extension website with the query 'Youtube', I figured no such extension exists. This weekend, the itch became unbearable. So I peeked into the Stop Autoplay's short code and with some searching found out there exists a Javascript API to control the youtube player's behavior. It provided the API calls that were sufficient for me to calculate the speed (in bytes-per-sec) at which youtube video is downloading. Combine that with total size and total duration of the video and I had the solution I was looking for.

So I decided to write an extension out of it. You can get it from here. 

It does following things:
  1. Pauses the video at the start, i.e. disables the autoplay
  2. It calculates an estimated time it would take to download the video completely. Shows it in a red box in the top left corner.
  3. It also prepends a short version of this estimated time to the title of page. So even if you are browsing in other tabs or windows, you can tell how much longer it is going to take, without visiting the youtube page.
  4. There is an instant of time, when the video is not yet downloaded completely, but if you start watching the video after that point, you can be assured that the entire video will be downloaded by the time you reach the end. That way it is guaranteed that you won't have any interruption while watching the video. The extension smartly calculates that instant and informs you by turning the red box into orange. It also adds '*' to the timestamp in title after this point.
Give it a shot. The extension won't yet work with HTML5 player, I will fix that soon though.

Thursday, November 19, 2009

On Chrome OS

Last night (IST) Google presented the Chrome OS details and opened the source code. I did some early twits looking inside the source code. Found the bits of clutter, debian, moblin down under there. My point of view was traditional. What a long time Linux user sees in a brand new OS - Window Manager, Package manager, RPC mechanism, etc. This was as soon as @mattcutts had posted that chromium source was out and before the actual presentation even started. When I however saw the presentation (vicariously that is - through the glasses of many tweeters and Gizmodo's live report), I found that, what I was looking for in the OS was totally irrelevant ...

If you haven't seen the ChromeOS presentation videos, do check them out.

I won't go over all the features here, but this is what I liked the most

1. Security. Automatic patching of OS everytime it boots. I liked the thinking behind this model.
The basic application security model was developed 20 years ago. Right now, the application runs with “your” privileges, so if you can modify something, the app you’re running can do it also. So a rogue app can damage your data or leak your data. It also forces users to make hard decisions about whether or not you trust the application. “These are decisions that are hard for normal users to make decisions about.”

- as reported by Jason Chen of Gizmodo

2. Local file system. It is treated merely as a cache before the settings are pushed up into the cloud. It is completely encrypted, so in case of device loss, there is no fear of data theft.

3. Only SSDs. By the time first ChromeOS devices will ship, SSDs will be commonplace. Besides it seems the cloud will make local storage less important than the network connection. Also only supporting this very limited storage hardware, eases the driver support. Good move.

4. Firmware. When I first studied about the LinuxBIOS project, I came to realize how wasteful the booting process is. The BIOS initializes the hardware, reads the kernel from the storage device, starts the kernel and the kernel initializes the hardware again. The root of this setup is in the way our computers evolved and not much in the form of technical challenge. ChromeOS is going to support only specific firmware. Their boot process is tuned so that no redundant initalization steps are required, thus improving the boot time greatly. As I said, this is not a new invention. Projects like LinuxBIOS had the same implementation, but only on the hacked up devices in their labs. Now however, with Google putting its weight behind this new family of ChromeOS devices, it seems that we will be freed from the wasteful boot up process after all.

Putting things in perspective... I have liked Apple's devices. Simple, elegant, functional, work out of the box. Why is that so? Why don't they freeze once in a while or give BSOD like Windows. Why don't they have configuration problems like Linux, after all at the core they have a community developed open source kernel just like linux. The reason lies in Apple completely owning the entire OS stack. They only design, implement, test, debug and deliver for a specific set of hardware. That's why they can concentrate all their design and engineering skills into making the best computing devices in the market.

I think Google is going to do the same with ChromeOS. Except in their case, the kernel will be Linux and Google won't be "owning" the stack, but will be tightly controlling it. Most of the stack will be open source, for anyone to look at and adapt to their devices if they want to. They will however have complete control on what goes and doesn't go in the official ChromeOS, just like Android (and that is entirely fair and necessary IMO, no matter what FOSS extremists say). On top of this (and most importantly), they will have a unique cloud based computing vision in building these next generation devices.

I like the way Google uses its power in completely reinventing certain fields with their products. ChromeOS is yet another example and worthy of cheer at that.