Hey everyone,
I'm writing on behalf of YSTV; we're looking at providing embed options for our videos, and I've got a quick question.
We can obviously provide embed code to users such as
<embed height="360" width="480" flashvars="backcolor=0xffffff&autostart=false&file=http://ystv.york.ac.uk/static/videos.php?file=1040&amp;autoscroll=false&amp;displayheight=360&amp;width=480&amp;height=360&amp;type=video&amp" allowfullscreen="true" quality="high" name="ystvplayer" src="http://ystv.york.ac.uk/static/flash/mediaplayer4.swf" type="application/x-shockwave-flash" />
which is what every (ok, so not every, but the vast majority) video sharing site does (YouTube, Break, Vimeo etc).
However, somebody's pointed out that we could also provide a JavaScript embed link as follows:
<script type="text/javascript" src="http://full.path/to/embed.js"></script>
Where embed.js contains
document.write('EMBED_TAG_PROVIDED_ABOVE');
What's the disadvantage of the JS embed option? The advantage is obvious, it's a nicer URL for the user, less characters to place in their site. I'm worried about security here, as somebody who doesn't know JavaScript; is this an inherently insecure way of doing things? And if the JavaScript URL is fine, how come none of the well-known sites do it?
Cheers,
Alex