Linked by Thom Holwerda on Fri 19th Jun 2009 15:23 UTC
Mozilla & Gecko clones We're on the verge of a serious evolution on the web. Right now, the common way to include video on the web is by use of Flash, a closed-source technology that is a massive resource hog. The answer is the HTML5 video tag, which allows you to embed video into HTML pages without the use of Flash or any other non-HTML technology; combined with open video codecs, this could provide the perfect opportunity to further open up and standardise the web. Sadly, not even Mozilla itself really seems to understand what it is supposed to do with the video tag, and actually advocates the use of JavaScript to implement it. Kroc Camen, OSNews editor, is very involved in making/keeping the web open, and has written an open letter to Mozilla in which he urges them to not use JavaScript for HTML video. Note that Kroc's website may not work properly in Internet Explorer. (Update The letter has been mirrored in the article, Read More for the full text)
Thread beginning with comment 369440
To read all comments associated with this story, please click here.
In the spec
by matto1990 on Fri 19th Jun 2009 19:55 UTC
matto1990
Member since:
2009-04-18

If you read the HTML5 spec you'll see that the JavaScript is an intended part of the <video> tag.

http://www.whatwg.org/specs/web-apps/current-work/multipage/video.h...

Beware: It's long ;)

What you need to understand is that this isn't an issue with Mozilla, it's an issue with the spec - well... in your view anyway. Personally I can't see anything wrong with requiring JavaScript. The links and buttons that will be linked to the media.play() method will likely be part of the HTML document, and therefore clickable using a screen reader or some other sort of accessibility technology. Having JavScript will not stop people clicking these links.

The only problem comes is when you don't have Javascript enabled, and almost everyone has it enabled. The only people that don't are people who know what it is; and if they know what it is they are likely to know the consequences of turning it off. Most people who browse the web have no idea what JavaScript is, so they just leave everything as the default (which is on).

Personally I see this as a non-issue. As the web evolves the technology around it has to as well. If this means one web technology (HTML) becoming strongly linked to another (JavaScript) so be it. We've had far too long where the web stood still because of lack of innovation, and we're paying the price now. The only way to innovate is to evolve, and that does mean making some changes that might not seem like a brilliant idea at the time; but as the web moves on the changes that are made will become accepted and become the new standard.

PS. sorry for the long and rambling rant ;)

Reply Score: 2

RE: In the spec
by Kroc on Fri 19th Jun 2009 20:03 in reply to "In the spec"
Kroc Member since:
2005-11-10

You misinterpret the spec (yes, I have read it).

<video> has a JavaScript interface (so that you can roll your own controls and interact with it) -- but JavaScript is not required for the video element to exist and to play video. The video element works without any JavaScript.

That is no different than changing an images size or src attributes using JavaScript. Completely optional and layered on top.

What Mozilla have published is a method of using JavaScript to detect capabilities and then write elements into the page using JavaScript. This is universally bad, regardless of the output being Video / Audio or Img.

Reply Parent Score: 2

RE[2]: In the spec
by matto1990 on Fri 19th Jun 2009 21:33 in reply to "RE: In the spec"
matto1990 Member since:
2009-04-18

I got ya. It's about a code snippet, not the implementation itself.

I did understand that the spec meant that but from the way I read your letter the first time it looked like you were objecting to that.

In that case I agree with you, as browser sniffing is never a good thing.

Reply Parent Score: 1

RE[2]: In the spec
by DrillSgt on Sat 20th Jun 2009 05:51 in reply to "RE: In the spec"
DrillSgt Member since:
2005-12-02

You misinterpret the spec (yes, I have read it).

<video> has a JavaScript interface (so that you can roll your own controls and interact with it) -- but JavaScript is not required for the video element to exist and to play video. The video element works without any JavaScript.

That is no different than changing an images size or src attributes using JavaScript. Completely optional and layered on top.

What Mozilla have published is a method of using JavaScript to detect capabilities and then write elements into the page using JavaScript. This is universally bad, regardless of the output being Video / Audio or Img.


Well, the problem is there are no released browsers at all that even support HTML 5. I do agree with your letter, however according to the Mozilla site you do not need JavaScript to run the video tag with the beta. It is not a requirement. https://developer.mozilla.org/en/Using_audio_and_video_in_Firefox

Ignore the hacks blog, as that is not from the actual developers of Firefox. What you have been reading is the thoughts of others, not how the standard will actually be implemented, nor is implemented (please try the RC's)

Reply Parent Score: 2

RE: In the spec
by boldingd on Fri 19th Jun 2009 20:03 in reply to "In the spec"
boldingd Member since:
2009-02-19

The point isn't so much using JavaScript at all, or using it to control the playing of embeded media, but using JavaScript to dynamically insert the Video element in the first place. On a site where JavaScript is being used to selectively embed the video tag when the page is rendered, browsers with JavaScript turned off (or other apps that may not be full browsers and won't implement JavaScript at all) will not see the Video element at all. I think that was his point: coding a page that will not actually have any content at all without JavaScript being enabled is a bad idea.

Edited 2009-06-19 20:05 UTC

Reply Parent Score: 3