Update: Version 0.3.
What?s new?
-
Simpler Syntax
-
Download links outside of fallback
(makes no sense otherwise) -
Working reliably on iPhone OS 3.0+ now
Hosting for the video generously provided by Chris Double of TinyVid.tv
Download Video: High Quality ?MP4? ? Low Quality ?OGG?
What?
Video for Everybody is very simply a chunk of HTML code that embeds a video into a website
using the HTML5 <video> element which offers native playback in Firefox
3.5, Safari 3 & 4, Google Chrome and an increasing number of other browsers:
This is native OGG video playback in Firefox 3.5 (you get H.264 playback in Safari). No
plugins to install. The video is played by the browser itself. It loads quickly and doesn?t threaten to crash your
browser.
In other browsers that do not support <video>, it falls
back to QuickTime.
(which allows playback on the iPhone)
If QuickTime is not installed, Adobe Flash is used:
You can host locally or embed any Flash file, such as a YouTube video.
Finally, if all else fails, the placeholder image is shown and the user can download the video using the links provided.
This is all done without JavaScript and requires only two video encodes, one OGG file for Firefox 3.5, and one MP4 file for everything else (Flash / Safari / iPhone). Instructions on how to convert your videos to these formats with the correct settings are provided further down this article.
It?s compatible with HTML 4, HTML5 (valid markup), XHTML 1 and additionally
also works when served as application/xhtml+xml.
For a full browser compatibility list, see the Video for
Everybody Test Page.
Why?
Assumptions:
The market is made up of more OSes, browsers and processor architectures than it was five years ago. More people (especially geeks) are browsing with AdBlock / NoScript / FlashBlock than ever before. We can no longer just assume people are going to have Flash and are allowing you to use it.
The same rules apply to video. If my platform / device / browser of choice cannot see your video, or you do not offer me the means to download the video to view offline, then I don?t see whatever it is you?ve got to show me.
I therefore want to help all web developers get to grips with
<video>, to make it easy for them to show video content
without having to sacrifice legacy browsers, nor ask you to install anything just to do so.
Starting Off on the Wrong Foot:
I see a problem with how people are beginning to offer HTML5 video. Whilst it is fantastic that DailyMotion and YouTube are experimenting with HTML5 there are a number of primary things content providers must satisfy for HTML5 video to adhere to the openness it is purposed for.
- Not treated like a special case
- No special page you have to visit. No extra effort should be required on your part to get video your browser already supports perfectly.
- No browser sniffing
- Implementations could turn up anywhere, in any form. OGG is open-source open-specification. Serving to only mainstream browsers like Firefox 3.5 goes against the whole point of open-video removing the requirement to be tied to one particular vendor.
- Don?t require JavaScript
-
Developers generally don?t know how to include the video tag whilst falling back to alternatives. Trying
to detect browsers using JavaScript and writing the
<video>element into the page is just going about it the wrong way.
Video for Everybody specifically solves these problems.
It:
- Allows content producers to provide HTML5 video as an equal citizen
-
The same code is used for browsers that support
<video>, as well as QuickTime and Flash. No special copy of your website has to be setup, no options have to be ticked. Video for Everybody plays the right file for the right level of support the user?s browser provides. - Degrades extremely gracefully, providing multiple levels of fallback
- Using Flash only provides you support for platforms where Flash is installed. No Flash: No Video. Video for Everybody will most of the time still play the video even if Flash is not installed. Flash is not supported on the iPhone, the ?1 platform for users accessing the web on a mobile.
- Is just plain copy & paste HTML
- Of course, you can write a server side script to insert it over and over again according to however many videos you have, but the HTML itself does not use JavaScript to insert the video or detect browsers or even provide the fallbacks. You can enhance Video for Everybody with JavaScript (it?s just the template to get you started), but the core selection of which video format plays is completely down to the browser, no JavaScript involved.
The Code
There?s nothing particularly new about this, people have been doing object-fallback for ages now, however this is an attempt at including HTML5 video into the mix, as well as trying to degrade as gracefully as possible with many levels and have very broad browser / device support (including the iPhone). See the test page for a full list.
Here follows the full source code. It?s very large because it?s fully commented.
You can easily compact this down (one such example follows afterwards).
<!-- ?Video For Everybody? v0.3
=================================================================================================================== -->
<!-- first try HTML5 playback. if serving as XML, expand `controls` to `controls="controls"` and autoplay likewise -->
<video width="640" height="360" poster="__POSTER__.JPG" controls>
<source src="__VIDEO__.OGV" type="video/ogg" /><!-- Firefox 3.5 native OGG video -->
<source src="__VIDEO__.MP4" type="video/mp4" /><!-- Safari / iPhone video -->
<!-- IE only QuickTime embed: IE6 is ignored as it does not support `<object>` in `<object>` so we skip QuickTime
and go straight to Flash further down. the line break after the `classid` is required due to a bug in IE -->
<!--[if gt IE 6]>
<object width="640" height="375" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"><!
[endif]-->
<!-- non-IE QuickTime embed (hidden from IE): the self-closing comment tag allows non-IE browsers to
see the HTML whilst being compatible with serving as XML -->
<!--[if !IE]><!-->
<object width="640" height="375" type="video/quicktime" data="__VIDEO__.MP4">
<!--<![endif]-->
<param name="src" value="__VIDEO__.MP4" />
<param name="showlogo" value="false" />
<!-- fallback to Flash -->
<object width="640" height="380" type="application/x-shockwave-flash"
data="__FLASH__.SWF?image=__POSTER__.JPG&file=__VIDEO__.MP4">
<!-- Firefox uses the `data` attribute above, IE/Safari uses the param below -->
<param name="movie" value="__FLASH__.SWF?image=__POSTER__.JPG&file=__VIDEO__.MP4" />
<!-- fallback image. download links are below the video. warning: putting anything more than
the fallback image in the fallback may trigger an iPhone OS3.0+ bug -->
<img src="__POSTER__.JPG" width="640" height="360" alt="Title of video"
title="No video playback capabilities, please download the video below"
/>
</object><!--[if gt IE 6]><!-->
</object><!--<![endif]-->
</video>
<!-- you *must* offer a download link as they may be able to play the file locally -->
<p>Download Video: <a href="__VIDEO__.MP4">High Quality ?MP4?</a> | <a href="__VIDEO__.OGV">Low Quality ?OGG?</a></p>
(If you would like your video to automatically start playing, check out the sample code on the
Test Page.)
Here?s a compacted version as an example:
(Technically, only one line break is required, to deal with an IE bug, on line 4)
<video width="640" height="360" poster="__POSTER__.JPG" controls>
<source src="__VIDEO__.OGV" type="video/ogg" />
<source src="__VIDEO__.MP4" type="video/mp4" /><!--[if gt IE 6]>
<object width="640" height="375" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"><!
[endif]--><!--[if !IE]><!-->
<object width="640" height="375" type="video/quicktime" data="__VIDEO__.MP4">
<!--<![endif]-->
<param name="src" value="__VIDEO__.MP4" />
<param name="showlogo" value="false" />
<object width="640" height="380" type="application/x-shockwave-flash"
data="__FLASH__.SWF?image=__POSTER__.JPG&file=__VIDEO__.MP4">
<param name="movie" value="__FLASH__.SWF?image=__POSTER__.JPG&file=__VIDEO__.MP4" />
<img src="__POSTER__.JPG" width="640" height="360" alt="Title of video"
title="No video playback capabilities, please download the video below" />
</object><!--[if gt IE 6]><!--></object><!--<![endif]-->
</video>
<p>Download Video: <a href="__VIDEO__.MP4">High Quality ?MP4?</a> | <a href="__VIDEO__.OGV">Low Quality ?OGG?</a></p>
You need to do a number of things to use the code:
-
Ensure your server is using the correct mime-types. Firefox 3.5 will not play the OGG video if the mime-type is wrong. Place these lines in your .htaccess file to send the correct mime-types to browsers
AddType video/ogg .ogv AddType video/mp4 .mp4 -
Replace
__VIDEO__.MP4
with the path to your video encoded to MP4-H.264 -
Replace
__VIDEO__.OGV
with the path to your video encoded to OGG -
Replace
__POSTER__.JPG
with the path to an image you want to act as a title screen to the video, it will be shown before the video plays in Flash, and as a representative image when the video is unable to play -
Replace
__FLASH__.SWF
with the path to the Flash video player you are using. I use JW Player as it can play the same MP4 that is used for everything else, but this could be any Flash resource including YouTube. Sample code for using YouTube can be seen on the Video for Everybody YouTube Test Page
It is absolutely essential that you provide download links outside of the video for two reasons:
-
You want people to view your video, right? So why would you wrap the video up in Flash, and then don?t bother providing a means to download the video? There seems to be this phobia of allowing people to actually view the video file you want to show them, like they?re going to immediately pirate it on their street corner. Unless you?ve been living in a hole, it is impossible for you to prevent people from downloading your video files, even if you lock them up in Flash and don?t provide the key. There are hundreds of apps and websites to circumvent that. Give people your video files?you want them to see the video anyway and you are fooling yourself if you think that they shouldn?t be allowed to download the video.
-
There are some instances where people will simply not be able to view the video inside the web page. Providing users the means to download the video will ensure your message gets through. This is the only way to support the Palm Pr?, for example.
Encoding the Videos
Video for Everybody uses an MP4 video file to play in Safari, in Flash and on the iPhone. Therefore the MP4 file must conform to the requirements for these three platforms. Technically Safari can play anything QuickTime can play. Flash can play H.264 and the iPhone is a little more restrictive in that it tops out at 640x480, does not support streaming, and does not support the Main H.264 profile. See Apple?s own instructions for the specifics.
The OGG file is solely for Firefox 3.5 at the moment for Firefox 3.5 and
Chrome, but more browsers may use it in the future as OGG is an open standard and can be implemented by
any vendor if they choose so. It is not patent-encumbered and therefore a cheaper choice than MP4 which requires
licensing.
For best results, I recommend including the poster image as the first frame when you encode the video. In QuickTime
and HTML5 <video>, the first frame of the video is shown until the user clicks play, giving the
users an idea of the content beforehand. You can see I?ve done this with my video examples.
I am no expert in video encoding and explaining the entire process is beyond the scope of this article, however this article explains the background technical information and extensive instructions on how to encode compatible OGG files.
Drawbacks
Limited <video> Controls
You can roll your own controls using any HTML and a bit of JavaScript. HTML5 also has the benefit that it is far more efficient than Flash, HD video in the browser is possible?without requiring a supercomputer.
A native video implementation improves as the browser improves. Upgrades are free. If a browser vendor adds
fullscreen playback to their Firefox 3.6
has built in fullscreen support, but until then there?s a
Firefox extension for it already.
It?s early days yet and if people don?t start using <video> implementation, then you get it for free.<video> then the improvements won?t
come as fast. Video for Everybody hopes to spur on the improvement of <video>
implementations.
Lastly, a current bug in Firefox 3.5 means that when JavaScript is disabled (NoScript for example) the video controls do not display. The developer of NoScript is aware of this issue and will try to come up with a solution. For now, right-click on the video for the controls, or use autoplay on your videos, or rely on users allowing your site in NoScript (the same as they have to do with Flash).
If It Doesn?t Work, It Doesn?t Work
As a raw bit of HTML, you have the issue that some browsers just don?t do things right no matter what. I?ve worked around as many bugs as possible in the most common browsers, however there are some issues that cannot be solved with HTML alone. For example, on Linux systems without Firefox 3.5, Flash or MPEG-4 codecs, the browser may attempt to play the video using the M-Player plugin which will display a blank, broken video interface (due to not having an MPEG4 decoder) instead of the fallback. Personally, I suspect the adoption of Firefox 3.5 on Linux will be rapid, and many users will already have installed either Flash or the extra codecs. Regardless, this is why it is important to always provide download links below the video.
Without JavaScript Video for Everybody can?t deal with those kinds of situations. This affects only a small number of users, however if you need to target these users you can always add JavaScript to Video for Everybody to detect the problematic browser scenarios and make adjustments accordingly. That?s perfectly fine to do as long the Video for Everybody HTML is included in the source and JavaScript enhancements are done on page-load; that way your JavaScript won?t prevent Video for Everybody working for the other 99% of scenarios.
Frequently Asked Questions
Because new ideas are confusing.
"Isn?t this 4× as much effort than just using Flash?
Video for Everybody doesn?t require 4 different video encodes! It uses only two, which supports 4× as many platforms and browsers than Flash alone does as well as reaching almost anybody who doesn?t have Flash installed or can?t install it (iPhone / Some 64-Bit operating systems).
In fact, it ends up being more effort in the long-run using a Flash only method because when a device
like the iPhone comes along and it doesn?t have Flash and it becomes very popular, you now have to
re-encode FLV files and add browser detection and new code to deal with it. New hand-held devices that are coming
out generally don?t support Flash, or only support a tiny sub-set, however they are using ports of
Webkit and Gecko that may support HTML5 <video>, and as
the mobile smart-phone market increases, HTML5 video will keep up far quicker than Adobe and who they
choose to support.
The code is too large / ugly
In an ideal world, all the browser vendors would agree upon one standard and one way of doing things and update
their old browsers to match too. Then you could just use just <video src="my_video.ogg" /> and
it?d play in any browser.
That?s not the case though. Video for Everybody is a hack, a kludge, a workaround. It is to deal with the fact we still have millstones like IE tied around our necks that just won?t get with the times. Video for Everybody deals with all of these broken browsers so that you don?t have to.
I doubt you hand-type every object tag you use. You just copy and paste a template, or use a server-side function to spit out the code each time. The size of the code is moot therefore and can be compacted to a decent size.
Going forward, in the future as HTML5 becomes standard and common, then the layers in Video for
Everybody can be dropped and we can all (hopefully) move to just the video element and be done. That won?t
happen unless we start making use of HTML5 now to help drive adoption. Maybe one day even Microsoft
will add <video> to IE and it should (unless they manage to do even that wrong)
?just work? with Video for Everybody, shedding the Flash layer and automatically
moving up to native video.
Are you saying that JavaScript is bad?
No. Video for Everybody is not aimed at bringing down JavaScript or demanding you go back to the stone age. It is a base template that can easily be enhanced using JavaScript, but does not use it itself to provide the fallback mechanisms.
Other HTML5 video embedding methods use JavaScript to detect the browser?s capabilities
and insert the appropriate <video> / Flash content, however this has the drawback
that JavaScript must be enabled or even supported?Most RSS readers do not execute
JavaScript as a security measure. With Video for Everybody, even in environments without
JavaScript the user will still either see the video or be able to download it. The more people who see
your video, the better for you.
Can I modify it?
Yes! However, just bear this in mind: Video for Everybody is designed to provide video for all browsers within reason; there are a lot of hacks in the code to make the same HTML work across many, many browsers, each tested with and without Flash and QuickTime. That?s a big matrix of testing. If you modify Video for Everybody you might?quite unknowingly?break support for some particular combinations. Please either do what testing you can, or ask me to get involved in helping to test your modifications.
"Why don?t you include Cortado, a Java applet that can play OGG video?
The user-experience is more important than the underlying technology. The problem with Java is the user-experience compared to Flash and HTML5 video. The loading of a Java applet causes a noticeable pause whilst the Java Runtime Environment loads. Even on my powerful Mac, the page loading freezes and the hard disk thrashes for a few seconds, on low powered machines I?ve seen the entire computer lock up for 10 seconds. On Windows you get a tray-icon appear an a bubble pop-up from said tray icon distracting you. This is simply unacceptable for playing a video.
Amazon did an experiment whereby they added 100 milliseconds to the load time of their page. Sales dropped 1% immediately. Google did a similar test, adding just half a second to the load time. Traffic dropped 20% immediately.
By including Cortado in Video for Everybody I would be effectively putting some customers
off from visiting your website, even damaging people?s opinion of your site because it ?slows their computer
down?. Video is used to communicate a message and that needs to be done with the minimal amount of fuss and as
much speed as possible. Until Sun Oracle improve Java to the point where it is no longer a
visual nuisance and a speed-bump then I would consider it.
You are of course free to modify Video for Everybody to include Cortado! If it serves your demographic or needs better, by all means do so.
Please Contribute
Video for Everybody is not a complete solution. It is the template for you to get started. Please help test Video for Everybody on a wide range of browsers, plugins and devices.
HTML5 video is here now, available on a very wide range of platforms and devices that stretch
well beyond what Flash can support. We need to start building the tools and the patterns to
support everybody seamlessly. Video for Everybody is my contribution to this larger movement across the
web as a helping hand to bridge the gap for developers so that they do not have to be in the position of choosing
one (Flash) or the other (<video>), but being able to choose both.
Please send anything Video for Everybody related to me at kroccamen@gmail.com and consider subscribing to the RSS for updates.
Related Projects
If you?ve modified Video for Everybody to do something else, or have created an HTML5 video related project, please let me know and if it upholds the same principles as VfE, I?ll list it here.
(I will not list projects that cannot play the video in an RSS reader. Using JavaScript to
insert <video> defeats the entire purpose.)
- Univers Video Plugin
-
A WordPress plugin that provides you a simple interface for inserting video. It uses
Video for Everybody for the base template but steps up to a custom interface if
JavaScript is available. The plugin even does server-side encoding. The Flash
interface is designed to closely mimic the look of Firefox 3.5?s native
<video>controls to provide consistency, regardless of technology used. Absolutely stunning work.
Dasein is an interactive art installation which uses a constructed space, cctv recordings, custom glass and live projections to create a unique and one time viewer experience.
Very interesting use of Video for Everybody, but what really tops
the cake is this: ![]()
Isn?t that just cute!
Update: The web developer of the site has kindly made available the original source file used to make this button. The zip file is enclosed in this article.
Kroc Camen:
?Clutter Is When You Can Hide the Entire Side Column of a Website, and Not Lose Anything of Value.?
Kroc Camen:
?I Find It Somewhat Ironic That Twenty Years Later a C64 Game on the iPhone Costs the Same as When I
My very astute friend Tanner Helland noted the contrast between my ?KrocOS? article (which is very ?anti-brand?) and my recent article on OSnews ?Five Years of Firefox: A Retrospective? which is quite the opposite, appearing very ?pro-brand?. (Due to OSnews rules I cannot republish my OSnews articles on this website until 30 days after they have appeared on osnews.com)
I can be very complicated to understand sometimes, and seem hypocritical or at odds with what I?ve said before?especially since I am so vocal about some subjects. When I contradict myself, it is because my principles are based on something that those two items share, rather than what is assumed to be my principles by what they do not share. How can I be anti-brand and pro-brand at the same time? Because my primary concern is the end-user, the regular Joe using the computer who is thrown to the lions in this unforgiving computer landscape.
A brand is only acceptable to me when it is a brand that the public take ownership of and outwardly use themselves for the public benefit. In the case of Firefox, I still feel that it would have been better if it were simply called ?Internet Browser? or ?Web Browser?, because every day I have to explain to people the difference between the ?Blue ?e?? and Firefox, and why they have to click on ?Mozilla Firefox? to get on the Internet, rather than the more aptly named ?Internet Explorer??that said, because Internet Explorer has dominated so greatly, the name Firefox has given people a way to refer to something better and to spread the word. Firefox?s grass roots movement is unequalled in computer history, it?s truly a global movement. In that sense, the public have taken it upon their selves to use the brand how they see fit and well beyond what Mozilla could have ever imagined in the first place. Other brands that fulfil this purpose are Ubuntu, for example.
Now, in the opposite corner are brands that are primarily to exert the dominance and will of the company, rather than serve public benefit. At what point, ever, have Adobe served the public benefit? Many brands of software on the computer simply abuse the end users with crap, unwanted, unwarranted software that changes settings and hijacks the machine. This sort of thing is completely unacceptable to me. This sort of use of the ?brand hammer? I hate.
(A quick search of Google seems to show that ?brand hammer? is a term unique to me, so I should explain: The brand hammer is when companies hit users with needless and heavy branding, and abusive, invasive pushing of their brand to force it into public consciousness. For example, Microsoft?s heavy handed rebranding of Live to Bing whereby they changed every search box in every single property of theirs to be Bing branded and set about changing people?s defaults to Bing with Live Messenger updates &c.)
All that?s left to say is that I basically spend every day fighting against stupid companies doing stupid things
and making end user?s lives harder with their misguided and often incompetent software & hardware and
institutionalised contempt for customers. If they ever got their act together, I would be out of a job.
They will never get their act together.
I?ve spent a week without Twitter. ?Big whoop? you may think; and I'm inclined to agree. I have not set out to prove anything to my readers, this was entirely a personal choice.
The thing is, I am concerned by how much it has affected me and I am equally concerned about me generating value for a company that gives me nothing worthwhile back in return. We crowd to these flavour-of-the-month websites, rag on about how awesome they are (belittling those who don?t understand the concept), generate a billion dollars (pinky to mouth) of value in the company, and then they sell to the suits and we all move on to the Next Big Thing?.
Where is my cut of the sale? Without our content, Twitter, Facebook &c. are empty and valueless. If I'm going to be contributing to someone?s value, I would rather that were a public benefit company such as Mozilla or the BBC.
But then, I'm not interested in making money out of Twitter either, I don?t link to my Twitter account from my website (think of all the ?SEO? I'm missing out on :P) and I mainly use Twitter as a dumping ground for thoughts that would not fill up a blog post. Mostly rants and annoyances. It was, when I started out, a one-way thing, where I would send short poems and inspirational statements. A sort of notepad to capture thoughts because of the ease of being able to text with a phone content in which I can?t do with my own site.
I think Twitter has given me the opportunity to become too bossy, too arrogant, unforgiving and generally thoughtless. Without the reflective period to ?think before I publish?, I have not found Twitter to be benefitting my personality.
But my main concern is really that the whole thing is beginning to turn sour already and I'm about ready to jump ship to the Next Big Thing?.
There was a time before ?RT?, a time when I saw maybe one or two, and wondered what on earth ?RT? stood for. I wasn?t part of the in-crowd, where such things are not explained to you, you just have to find them out. There was a time before ?Retweet this? buttons on websites. Before we counted how many tweets something had. Even before there were hashtags. Simply put, the crowd spam has become too much.
The addition of lists now adds one more number on my page that measures my worth as a person by how much of a whore
I am. What on earth have those numbers got to do with anything about the quality of my tweets content or
the quality of my personality?
I am not a number. I am a free man.
Twitter is good in the sense that we can talk to one another in a rapid and gratifying way, but since when did one company have the monopoly on conversation? It?s not that I don?t value the people I follow on Twitter, it?s just that I don?t value Twitter itself. As nice as Twitter is, I'm not Twitter and you?re not Twitter either. Twitter is a brand, where there shouldn?t be a brand. All these Twitter clients and Twitter widgets and uses of the Twitter API just perpetuate a brand rather than a means of conversation.
There is no monopoly on e-mail. No one company holds the keys to the API, e-mail is not centralised. E-mail is a standard, e-mail is not a f?cking brand.
Speaking of e-mail, I've had an e-mail address since 1996. My e-mail address is displayed on my website, on every page, unobfuscated. Contacting me has always been easy. Twitter, of course, gives us the benefit of having a conversation in public, but I liken it more to shouting across the street at each other. You can?t really hold a lengthy conversation, just shout short sound bites. I have an idea for an elegant on top (but ugly under the hood) comment system for websites but I would need some help creating it. If you?re into the open web, love PHP and optionally know about accessing and processing e-mails from within PHP, please contact me and we can start a conversation.
I cannot possibly advocate the open web and Doing Things Right whilst I use a system intent on furthering a brand, inhibiting diversity and inhibiting the choice of which company you use on the Internet in order to have a conversation with somebody else. If Twitter truly cared one iota about the public benefit, then they would be seeking ways to increase interoperability, to increase participation from all parties, to present standards by which we can all communicate without Twitter too.
Now, apparently people enjoy following me on Twitter and what I say, and would be a bit bummed by
my leaving, so I will deal you a compromise. I agree with Twitter?s principle, its concept?just not its
particular implementation. I will continue to use Twitter, but it will return to a one-way thing as I started
out. I will post to it, and I will read your replies, and I will reply to you; but I will no longer follow anybody.
If you wish to engage me, simply mention me and I?m happy to talk. If you think something should be brought to my
attention, then again, mention me in your tweet and I will pick it up.
For everything else, there?s e-mail.
Addendum
After a rough week, I decided that I managed to live fine without Twitter before it existed, and I?ll continue to be fine without it again. I can still follow people using their Twitter RSS feeds, and favourites items by bookmarking them?because that?s all Twitter basically is; RSS and hype. It?s the brand lock-in that I?m against.
- Brands Are Banned
- Applications Are Contextual
- A Better File System Hierarchy
- A Better File System and File Types
- RISC OS? Menus
- Viewing / Editing Files
- Window Management
- Application Examples
I?ve always thought about what I would do if I were able to somehow design / build ?my perfect O.S.? but it has always seemed rather pointless to publish my ideas since such an O.S. would never ever come to light. However, every time I think of a new idea or get into a heated discussion about some OS-related quirk at osnews.com I feel like I need to get these ideas off of my chest, regardless of how practical that is.
Therefore, here is?in no order?a collection of ideas of how I would go about designing my own perfect general-purpose operating system. I will add to this list as and when I think of new ideas, so it will be rather short to begin with?I just need a dumping ground for these ideas to start with.
Brands Are Banned
Brands are a barrier to transparency. Brands are forced on us beyond what is necessary, and force applications to become monolithic and bloated as they keep ahold of their brand rather than knowing when it?s wise to split the functionality out. For example, iTunes is no longer just a music player and conflicts with the other media capabilities of the O.S., forcing us to do things in one single application, and at odds with competitors? products. Why does the Zune come with its own media player, rather than just using Windows Media Player?
In my O.S. there would be no brands at all, they would not be allowed. The browser would be called ?web browser?, instead of iPhoto there would be ?photos?, iTunes would be ?music?, ?videos? &c. There are a number of benefits to having brand-less applications:
-
It encourages people to work on improving the built-in functionality, rather than implement something new for the sake of branding
-
It stops outright abuse of end-users by brands; for example, Java installing a tray icon, popping up and annoying the user, trying to install the Yahoo toolbar. It?s a freakin? programming language! I don?t expect the pipes in my plumbing to gurgle adverts when I run the bath, I expect my pipes to be dumb and the same should be of operating system components
-
It allows for new ideas to be put in the right place, instead of a single application bloating beyond what is necessary
-
It lessens end-user confusion due to marketing terms and brands being used rather than what something actually is. I don?t know a single regular end-user who could tell me what Java actually is
Because the application functionality of the O.S. would be dumb pipes that don?t try sing to you, it wouldn?t be obvious where the separation between O.S. and application lies. As such there would be no ?applications? to even speak of, this is expanded upon in the next point.
Applications Are Contextual
Again, this focus on ?applications? in current operating systems feels a lot like the plumbing is always on show (like something out of Brazil). In my O.S. applications would actually just be custom shell spaces; i.e. a more complicated version of the various custom explorer folder views in Windows (particularly Vista, 7) like the Fonts folder (which has special view options and menu items), the Control Panel and other areas that are essentially still folders on the computer, but viewed with a contextual viewer.
In my O.S., when you open your ?music? folder, the folder window would basically become something like iTunes. It would still be a folder to the hard disk, but the window would adapt to the content in that folder, taking the folder contents and displaying it in an appropriate, contextual way.
Likewise, opening the ?pictures? (or ?photos?) folder on the computer would show that folder as iPhoto. This would be instant, there would be no application icon launching, no task-bar button, no dock icon, no indication that this is an application?just viewing a folder, which is what you?re doing anyway.
BeOS kind of already does this (though I would like to see it taken much, much further). In BeOS, the mail application wasn?t really an app, so to speak, it was just a dialogue to write a new e-mail. You managed your e-mail (inbox / drafts &c.) using the normal, regular, file manager.
In my O.S. any folder you create could then be assigned a media-type that would describe which ?application? you would get when viewing that folder?s contents?music, videos, e-mail and so-on. The focus would be on the user?s contents, and not on individual applications.
There would of course be a generic folder type that would work just as we have folders now in other OSes that allow you to hold files of different types; the customised folders would only really apply where you know you would have a folder of all the same type (like for your e-mail, photos and music).
A hybrid QuickLook / dialogue-box U.I. would allow you to view any file. Custom dialogues would allow the editing of files, so for example, opening an e-mail would open that e-mail in an e-mail-looking application window, but there wouldn?t be any ?application? to speak of?just a window with a textbox with the text and a toolbar to reply, forward and so on?very spatial, like BeOS / Mac OS 9
Managing ?Applications?
Because there would be no brands and no application names (just nouns or verbs) nor icons?just folders for this and that?application management would take a very different approach. Applications themselves, physically, would be hidden away in the system folder and the user?s personal folders would just hook into each relevant application based on chosen media-type. The user would never actually see any application icons, or a list of applications like Mac OS X has.
The ?folder types? could be customised in the O.S. preferences, allowing a user to remove a folder type and thus effectively remove an ?application?.
Third party ?applications? would be downloaded and installed and then would just appear as a folder named after whatever content the application handled. For example, if someone made an e-book reading application, it would create an ?e-books? folder in the user?s home, and that folder would have the new customised shell, as well as the user being able to create a new folder anywhere that could also use this new ?folder type?.
Again, it?s important to stress that at no point an application would have a name, or brand. It is merely a folder to hold files using a customised view particular to that content?it?s the type of content that matters really.
App Folders
Okay, so I lied that there would be no applications?there would be applications, but only for tasks that do not internally store user-editable, user data and are generally not multi-instance. You can have any number of folders that use the photo application view &c. for your own data, but system preferences would be single instance (think Control Panel Applets in Windows).
This breed of application would handle the various utility tasks of the O.S. like changing configuration preferences and performing single-instance tasks. In BeOS fashion, these would be no more complicated than a dialogue window.
These would function like RISC OS and Mac OS X where a folder becomes an application (RISC OS prefixed the name with ?!? and Mac OS X suffixes with ?.app?). The application and it?s configuration data (a bit like a ?.ini? file) lie in the folder and the O.S. then displays that folder as a dialogue window however the app needs. Thus, these non user-data apps would be self contained and easy to move around and manage, much like Mac OS X. It?s important to stress that unlike Mac OS X, these kinds of apps would only be used in the case where there would be no user-generated, user-editable data (like photos, e-mail and so on) that the app would have to display.
Games would be distributed like this, so that the game and the user?s save files are completely self-contained (because the user would not be expected to edit the save-file by hand). But, for games where a lot of user managed files would be used, a folder-view would be appropriate?imagine an emulator folder-view that was effectively ?iTunes for ROMs?.
A Better File System Hierarchy
Frankly, it?s all still too hardware-centric. Why?in 2009?do we still put large icons of actual physical hard drives in operating systems? (You can even read the label on Apple?s) No end-user knows what that is, and usually has never seen the inside of their computer?not least that things like RAID, virtualisation, partitioning and storage pools muddying the very idea of ?drives?. The hardware is irrelevant to the end-user, we shouldn?t be exposing it to them.
Windows? ?My Computer? display is too hardware centric, focusing on physical devices,
rather than the user?s personal data. In my O.S. none of this would be exposed to the user. The only file system
exposed to the user would be their data, and that?s it.
Windows is particularly bad, but this even plagues Mac OS X which generally has a sensible file system layout.
Why would a regular, Joe-public user ever need to go into these folders?why are they even there!? Why are
they visible to the user? Sure, advanced users may want to enter these folders, but at the end of the day they are a
minority and they are expected to find out what option they need to change to make such folders visible if they were
hidden.
The worst offender is the user?s ?Library? folder?
The Library folder has nothing to do with books, like an unsuspecting user would expect. Why is this exposed to them? It contains nothing they can decipher or modify themselves in any way without a lot of specific knowledge that would warrant them enough skill to unhide such a folder anyway.
In my O.S. absolutely nothing that isn?t the user?s own personal data would be on display, and their hard drives would not be displayed as hard drives at all, but rather as ?home? folders to browse. No allusion to the hardware would be made (for internal hardware).
For externally added hardware, like USB drives and CDs, these would appear on the desktop much like Mac OS X or Amiga OS but the desktop would expand upon this notion and be used for all externally plugged in hardware. It?s about time we went back to printers being on the desktop (so we can use drag-and-drop printing like we had in the ?80s). The ?printer? would just be a print-queue custom folder view of the print-job files.
Remember?throughout this article, my O.S. uses a spatial file manager, not a navigational file manager. Double clicking on a file or folder will open a new window, like Mac OS 9, BeOS and Amiga OS.
A Better File System and File Types
A lot of the time, I end up copying BeOS, because it mostly had things right, especially for the time. The file system should be metadata-centric. Application specific databases are bad, bad things, and would be banned. The file system is the database, and a fast query-based file system engine would power the custom folder views, letting you search as easily as you can in iTunes, but doing so using the file metadata already on the files.
With my O.S. this would be taken one step further, by introducing new generic file types. File extensions are a bad way of determining type, but let?s imagine?for the sake of making it easy for you to imagine?that my O.S. had ?.image?, ?.audio?, ?.video? and ?.email? file types.
Whenever a file entered the computer from an external file system (such as FAT, NTFS and
from web pages), it would be converted copied to an appropriate generic media file type and all the meta
data that could be ascertained would be extrapolated from the file into the extended attributes of the file system.
For example, if you downloaded an MP3 file, that MP3 file would immediately have its ID3 tags and other attributes moved into the extended attributes of the file system so that the file could be searched based on artist, album, bit rate, BPM and anything else the importer could determine about the file. The audio data would then be saved as a ?.audio? file, though there would be no need to actually convert / transcode the sound from MP3, it would still be MP3 data (think of ?.audio? as a generic container that can hold any codec).
E-mails for example would be ?.email? files that would contain the text of the e-mail, but all the e-mail headers would be moved into the extended attributes so that you could search, filter and create smart-search-folders of them &c. (remember that the e-mail app is nothing but a folder containing e-mail files and any other folders you want).
These generic file types would then allow us to maximise integration with the system and use the power of the query based search to manage files in innovate ways.
Ah, but what about when you need to transfer a file to another computer, which wouldn?t support ?.audio?? Whenever a file is being moved to an alien file-system, the O.S. automatically reconstructs that file back into a compatible file format. If you were to copy that ?.audio? file onto a FAT-formatted USB stick, then the O.S. would transparently reconstruct an MP3 file, taking the sound data and adding the extended attributes as tags (since you may have edited the extended attribute information since).
But that same file, copied to a more advanced file system that does already support metadata, would have the extended attributes preserved! That way we wouldn?t be needlessly crippling files just for the sake of FAT. Security permissions could even be transparently mapped to NTFS or Unix according to file system you?re copying to!
This would also allow advanced users to selectively customise how a generic file type like ?.image? would be converted into a more common file type on an alien file system. You could choose to output a PNG, or a JPEG from your ?.image? file according to your tastes.
Because all this conversion would be done transparently by the O.S., it would also mean that users accessing the machine from an SMB network connection would just see JPEGs instead of ?.image? files, but the owner of the computer could just as easily change a setting so that images were always provided as PNGs to outsiders instead. Due to the idea of applications being folder views, this could even be on a per-folder basis.
RISC OS? Menus
There?s no other way to say this really, RISC OS had the best menu system in any O.S., ever. The functionality has never been matched. You should read this web page to get a proper understanding. There were a number of flaws in the implementation (it was the early ?90s, mind), but I think all of those could be smoothed out in my O.S., the core ideas are sound.
All menus were context-menus in RISC OS. Whilst I wouldn?t use the quirky three-button mouse system from RISC OS, I like the idea that a huge amount of the U.I. needed for any situation, including entire print dialogues, could be hidden away behind one convenient mouse button would be grand.
This would allow the folder views to keep a focus on user data, and display things with a Mac OS 9 / BeOS level of simplicity and spatiality.
Where did all the bloat go!? I love the utter simplicity. I would aim for something not too dissimilar to this, with a lot of polish. That way, when you go from a generic folder, into an app-view folder you would not be going from one complex U.I. to an entirely different complex U.I.
Whenever you context-clicked on an object, that object would be tinted (as most OSes do) so that you know what the context-menu is for, except that this would happen everywhere in the O.S. and for everything?context-click on the desktop and the whole desktop image will tint but not the foreground windows &c. so that it?s clear that the context menu is specifically for the desktop. Context-clicking on a window will tint the whole window, but doing the same on an icon will tint just the icon, and so on. I?ve always seen regular users struggle with context menus, the whole ?context? bit just isn?t clear enough.
Viewing / Editing Files
So far I?ve described how files would be managed, but not how something as simple as an image would be actually viewed or edited. An O.S. is no good if it could be very simple to use, but never be capable of anything as complex Photoshop at the end of the day.
Files are viewed / edited by one or more file-handlers. These display the file in its own window with whatever U.I. is both relevant to that file type, and which specific file-handler is in use.
For example, double clicking on an image file?be that in a generic folder view, or in the custom photo-app view?would bring the image up on screen in a way similar to quick look. This would be a simple file-handler to appropriate that file, but other file-handlers could be used, from something as simple as something like MS Paint up to something as complicated as Photoshop. Using the context menu for a file object would let you choose an alternative file-handler, just as you can with the ?open with? functionality in many OSes.
There is only one important thing to note though: as you understand there are no application names or brands, so ergo, there is no concept of an encompassing application that stays open even after you?ve closed all the documents. That?s a no-no in this O.S. When you open / view / edit a file, a single window wrapped around that file appears with the necessary toolbar and widgets and the file?s name occupies the window?s title.
What file-handler you get (and how you recognise one from another) is down to the verb used to launch that file-handler. Each file-handler can register a verb for the file-types it understands, so that when you open the context-menu for, say an audio file, you would get menu items for ?Play? (e.g. play in a standalone player), ?Edit? (e.g. bring up an audio editor like Audacity) or ?Burn? (e.g. the CD-burning interface) and so on.
Window Management
The problem with spatial file managers?at least how I see it, is that window management quickly becomes a chore. I
don?t know how I lived before Exposé, even now, when using a Windows computer, I keep accidentally jamming my
mouse in the corner of the screen and getting annoyed at why it isn?t working :P
I don?t have answers to all the problems yet, but here are a few ideas I?m throwing up:
Essentially, in my O.S., there are only three types of windows on show?1. a folder (be that generic, or an app-view), 2. a file being viewed / edited and 3. a dialogue coming from an app (such as write-new-mail, or an ?Okay / Cancel? message box). Additionally, being a spatial window manager, windows are a parent and / or a child of some other window. This means we have a number of types and relationships by which we can group windows.
Exposé can show all windows, the windows of a particular app, or the desktop. Exposé in Snow Leopard adds to this letting us order windows alphabetically or by type.
With a spatial file manager, as you drill into folders you are left with a chain of windows for each folder on the way. We could map this chain, like so: (Please excuse just how rough this is, I was most surprised to discover that Pages / Keynote have no auto-diagramming function!)
With my Exposé, invoking the command to view the child windows of an ?app? (F10 in OS X), would show the ?app? in the centre, and then radiating outward, the files you have open that come from that folder.
Imagine in this instance that you opened your ?pictures? folder, which brings up the iPhoto-like app view and you have chosen to view / edit four different photos here. The ?pictures? folder appears in the middle, and the child windows surround it.
These sorts of ideas really need exploring though. However, I know for sure that I want to avoid any need for minimise and maximise. These are U.I. relics as old as menus and need obsoleting. Being a spatial window manager, when you resize and position a window, it will save its size and position when you close it (unless you hold down a modifier key when click the close button). The folder app-views can choose default, sensible sizes and positions for themselves. I would set a web browser window to 1024x768 pixels by default, for example.
I don?t know about having tabs in a browser, if the window management were good enough, it might not need them (or just go hybrid). For example, if we spawned a new window, instead of tab, then particular websites could have their own remembered window size and location?quite handy; and the Exposé function would chain the windows together so it would be like some kind of cross between browser history and Exposé. Who knows.
Application Examples
Here are some brief examples of how I would go about implementing some typical applications in this O.S..
- Calendar
-
The calendar would be, on disk, just a folder with a bunch of files in it for the events, a bit like: Mac OS X:
However, the ?calendar? folder in your home, would use a custom app-view so that that folder would appear, when you opened it, basically like iCal. Adding / editing events would modify the files in the folder, but you would be viewing that folder as a calendar application. Because the O.S. allows you to have as many folders as you want, anywhere, appear as calendars as you so choose, then additional calendars (like you have in iCal), would just be (on disk) a subfolder! The calendar app-view would present you that folder and its subfolders as iCal does though. The colour for that calendar?s events would be chosen by the label colour of the subfolder, just as you can set label colours of files & folders in generic folder views. Elegant above and below the hood!
- Instant Messenger / VOIP
-
Well there?s no reason an IM app couldn?t look and function just like a perfectly normal IM app, despite being a folder under the hood. Each contact would be a file on disk, the metadata would contain their account names, avatar and any other details, and the file itself would be the chat log for that person. The IM folder app-view would just display this folder of files like a traditional IM app, hiding people offline and so forth. The person?s online status would be an extended attribute on their file, and a live search query would simply find ?people who are online??using the file system itself to display the user list. BeOS already did this with IMKit :)
Talking to someone would be?to the O.S.??editing? that user file (you double-clicked on a file, after all). It would open the IM chat window (same as any other decent messenger), but you are effectively viewing / ?editing? the chat log via a special U.I. (that same chat log could be opened in a text editor instead, for example).
This would likely somehow be centralised through the address book (described below) though, I would have to think the details through more, but you get the gist.
- Address Book
- A folder of VCard files, shown in the U.I. of Address Book on Mac OS X. Simple, really. Just like the address book on Mac OS X allows you to do smart-folders, this would be implemented with equally simple saved-search sub-folders in the address book folder (?show me all the people whose birthday is in 6 days time? &c.)
- RSS Aggregator
-
A folder with an ?.OPML? file, and the RSS files downloaded?displayed as an
RSS reader U.I.
(See how easy this is when you think of apps as nothing but viewing files in a folder in a custom way?) - Integrated Development Environment
- Simpler than you would think. Just an app folder view for your project folder. You create a folder for your programming project that will hold your source files, then set the folder view to IDE and when you open the folder, it?s an IDE with the project tree on show. In other OSes, you open the IDE application, and then choose the project?on my O.S. you would just double click on the folder for your project and there?s your IDE.
Hopefully these examples will begin to demonstrate the concepts of this O.S., whereby everything is a folder, just viewed in a custom way, and everything else is a file, just viewed and edited with a particular U.I. that is abstract to the file at hand.
I?ll expand this list as I think of more concepts, if you want to suggest an application I should describe, or have questions as to how this or that would work, please contact me.
"
Walked into a mobile phone shop for the first time in a year.
Yup, it?s obvious why Apple will dominate this market.
Apple only sell one phone?the iPhone. There may be different models, but there is only one brand. Where is ?the Sony phone?? I literally could not count how many handsets are available out there, that they replace with a whole new set every six months. They are throwing what little brand strength they gain by trying to constantly entice the user with something new.
The phone shop looked like a team of under twenty years old designers had been let loose, all creating their idea of a good phone. There was zero cohesion, no single statement. Just blinding amounts of design ideas and no one guiding principle.
Unless Sony change to a single handset?they will positively be forced out of the market.
"If I was releasing a commercial game, I would upload the torrent to the piratebay myself to ensure some 14yo twit didn?t do it wrong.
Kroc CamenImplementing any anti-piracy measures is basically saying that pirates are more important to you than your actual, paying customers.
If I were about to release a mainstream PC / XBox / PS3 &c. game, then I would upload the torrent myself to piratebay so that I knew pirates would at least be getting a decent rip that was virus free. All I would include with the game is an ?.NFO? file (with ANSI art, no less) with a Pay Pal e-mail address where people could make a voluntary donation.
I think this idea would actually make money, and boost retail sales.
