standardized xhtml code
dsp1 - January 7, 2008 - 10:39
| Project: | Embedded Media Field |
| Version: | 6.x-1.x-dev |
| Component: | Providers |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Alex UA |
| Status: | active |
Description
going to validator w3 shows errors and one discusses not using the embed tag.
they provide a link to alistapart site with the article flash satay.
maybe that method will help be more w3 compliant.
thanks for all your hard word.

#1
I'm checking this for each provider. Here are the results of the first three providers:
YouTube
I get no warning related to the embed tag, as it should not be present in the latest version. However I do get errors for the following:
- The code for "&rel=0" needs to be changed to "&rel=0"
- The tags that are not closed with need to have "/>" instead of ">" at the end of the tag, for example "" should really be ""
GoogleVideo
No errors
iFilm
- Multiple errors related to use of embed tag. I will check and see later whether the method used in the YouTube file can be used for this format.
#2
Sorry, the first YouTube error needs to be changed to
"&rel=0"#3
Blip.TV
- Multiple errors related to use of embed tag. I will check and see later whether the method used in the YouTube file can be used for this format.
Revver
* Quick note that only embed script is currently working for Revver, so I'll have to take a look into this as well.
- Validates as strict xhtml
BrightCove
- Multiple errors related to use of embed tag. I will check and see later whether the method used in the YouTube file can be used for this format.
Dailymotion
-
- The tags that are not closed with need to have "/>" instead of ">" at the end of the tag, for example "<param name="allowFullScreen" value="true">" should really be "<param name="allowFullScreen" value="true" />"I only now noticed that these tags were stripped out of the YouTube mention above, but it is the same error
MySpace
- Multiple errors related to use of embed tag. I will check and see later whether the method used in the YouTube file can be used for this format.
Jumpcut
* Not working at all for me.
LiveVideo
* Quick note that only embed script is currently working for LiveVideo, so I'll have to take a look into this as well.
- Multiple errors related to use of embed tag. I will check and see later whether the method used in the YouTube file can be used for this format.
MetaCafe
- Multiple errors related to use of embed tag. I will check and see later whether the method used in the YouTube file can be used for this format.
SevenLoad
- Multiple errors related to use of embed tag. I will check and see later whether the method used in the YouTube file can be used for this format.
I'll start going through these today to see if I can't make the A List Apart method work. On another note- why must these providers constantly change their codes! Ugh. ;-)
#4
#5
wow, thanks for all the research, alex! you rock! maybe we can find a way to standardize it across them as well as possible. i vaguely recall there's a module that helps out w/ that sort of thing, but don't remember its name right now. also, we might look into using the swfobject.js script.
aaron winborn
#6
No problem! Vacation is over, so back to work for me! ;-)
I'll look into a flash module and/or the swfobject.js script, and yeah, we definitely should standardize this one way or another. I also wonder whether we might be able to use simpletest or some other module to automatically check the contrib files (would make checking for dead contribs a lot easier).
For now, here's a patch for youtube.inc, which validates as valid xhtml. It's my first rolled patch, so you should definitely check it first! ;-)
#7
this is the code that w3c linked to from the satay article. not sure if you had a chance to look at the article.
he wrote that he did many hours of testing and this was the solution that works and is compliant. not sure if it will work with all the video sites.
<object type="application/x-shockwave-flashdata="c.swf?path=movie.swf"
width="400" height="300">
<param name="movie"
value="c.swf?path=movie.swf" />
<img src="noflash.gif"
width="200" height="100" alt="" />
</object>
#8
Yeah, thanks for the links- I actually got the youtube code from that article and will try and port the other files to it as well. The crazy thing (imo) is that all the sites in question use embed tags themselves. You'd figure they'd want as many people as possible to use their services, but I guess not...
#9
I tried the patch and it works good. If more than one youtube video is on the page the
id="VideoPlayback"causes errors. is this. $autoplay_valuereally needed?if so, is there a way to increment the number so it is VideoPlayback 1, VideoPlayback 2? the id tag needs to be unique on each page.
#10
why didn't the patch get applied to the cvs for jan 30th?
#11
I'm having problems with my CVS account- I can add new files but not update existing ones.
See: http://drupal.org/node/218060
As soon as my access gets corrected this will be committed.
#12
Actually, nevermind, it was already committed. I'll try to go over the rest in the near future (after I get rid of some other RTBC stuff)
#13
might be good to get this standardized before the final release. but if that's too much, it can wait till d6.
#14
#15
So far I have fixed both YouTube and Blip.TV so that they validate correctly. Will move on to the rest this weekend.
#16
I also fixed DailyMotion
#17
I tried to get iFilm and Brightcove to work with the ALA object method, but couldn't, do to the way they are feeding the flash to the player. If anyone has an idea on how to extract the information from these
On another note, I did find out that iFilm has changed its name to spike.com, and I changed the ifilm.inc file accordingly...
Remaining files to be tested and hopefully standardized before the move:
MySpace, Jumpcut, Livevideo, metacafe, sevenload, and possibly the hosted flash one...
#18
I just fixed & committed MySpace to the devel version (with other patches for myspacetv.com and thumbnails)
aaron
#19
I noticed that YouTube FINALLY stopped using embed for their embed code. they use the object tag instead. might want to look at that.
#20
I take it back. Looks like they have it nested inside instead. not sure how that validates.
#21
maybe the swftools module might be useful? looking at that right now.
#22
Any update on this? Subscribing.
#23
I've added support for another video provider using swfobject.
I tried to keep the changes as minimal as possible but had to add a drupal_load_js() in video_cck.module's hook_menu.
I'm wondering if this is the desired way to proceed and, if so:
- how do I get my provider support added to the module?
- I'll gladly start standardizing the other video provider includes so they all use swfobject.
On a legal note: swfobject is MIT-licensed, but #drupal let me know inclusion is permitted if certain copyright info is added.
Thanks.
#24
That would be great. What provider have you been working on?
#25
I finished GarageTV - www.garagetv.be (Belgium's largest online video host, I think), and I'm working on nr 2 as well (www.16plus.be).
I'll add a feature request for supporting garagetv and I'll include my provider include and the patch for cck_video, is that ok?
#26
YouTube still doesn't validate for me:
Line 118, Column 194: cannot generate system identifier for general entity "enablejsapi"
…youtube.com/v/OKkKD_yoTbY&rel=0&enablejsapi=1&playerapiid=ytplayer&fs
Looksm like you've still got some incorrectly encoded ampersands in there (both enablejsapi and playerapiid). Ampersands must always be encoded as & in URLs:
http://www.htmlhelp.com/tools/validator/problems.html#amp
#27
youtube should be okay now. thanks for the catch, seanr!