Closed Bug 463955 Opened 17 years ago Closed 16 years ago

Planet Mozilla should strip autoplay attribute from <video> element

Categories

(Websites :: planet.mozilla.org, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jruderman, Assigned: reed)

References

()

Details

http://www.rumblingedge.com/2008/11/09/mark-surman-interview-in-sept-08/ contains a video that starts playing right away due to having the autoplay attribute. This means loading Planet Mozilla will make noise until it falls off the bottom :( I think Planet should strip the autoplay attribute, so the video only starts if a reader wants to to play.
yeah. I agree. I don't know how to do it, but I agree that we should.
This might help: http://www.0xdeadbeef.com/weblog/?p=1127 If I'm reading Chris Blizzard's post correctly, it's feedparser in Planet software that does the stripping. Maybe contact Sam Ruby or someone else?
http://svn.mozilla.org/projects/planet/trunk/planet/vendor/feedparser.py Remove autoplay from the array that includes it as a string and that would probably do it; that said, you really want to add the controls attribute at the same time. Also, this is a bit hackish in allowing autoplay on any element, not just video/audio, but that seems to be a more fundamental problem that I wouldn't suggest tackling without doing it upstream.
Sam, can you fix feedparser upstream for this, as I bet others feel the same way.
OS: Mac OS X → All
Hardware: x86 → All
Here are my thoughts on this, welcome or unwelcome. :) 1. It's a valid attribute and is part of the spec. It's not dangerous (just annoying) so I would hate to see feedparser pull it out. (Information loss that early in a pipeline is always bad.) 2. User agents should solve this problem. I'll start a thread on platform and firefox about it. 3. Planet (not feedparser) should probably make it an option to pull it. Mostly because if you're pulling a huge page it's hard to find the video that's playing. I don't know if the planet/venus software can do #3 or not. But feedparser seems like the wrong place to make that change. Thoughts?
I've made the change: http://code.google.com/p/feedparser/source/detail?r=294 A case can be made that feed parsers shouldn't do sanitization, that should be done at a separate layer. But that's not the current approach: http://diveintomark.org/archives/2003/06/12/how_to_consume_rss_safely http://diveintomark.org/archives/2002/10/28/we_have_arrived I personally agree that sanitization should be done separately, controlled by planet config options, and since refactoring planet software is something I seem to do as a hobby, I started such a refactoring over a year ago http://intertwingly.net/blog/2007/12/19/Yet-Another-Planet-Refactoring What is slowing me down for the moment is that I really want to make this HTML5 and DOM based through and trough. What I would love to do first is to take hsivonen's parser and make it spit out C/C++ code which can be directly called by a language like Python or Ruby. Unfortunately, the current code output is very mozilla specific, and I haven't had the cycles to get back to it.
I'll pull this to Planet Mozilla in an hour or so.
Assignee: asa → reed
Not sure if this should block or depend (i guess it's up for interpretation). Regardless it's related.
Blocks: 436572
I did this the other day.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.