Page 1 of 1

Video embed code problems

Posted: Mon Dec 08, 2008 5:21 pm
by rj
this does not apply to YOUTUBE who seem to be the only ones who know what they are doing. :)

Every place serving videos has a differnt code for embedding, some are just horrible, they vary from a half a line a code to 40 lines of code. From OBJECT, to EMBED, to FRAME to IFRAME and to bad SCRIPT...

After pasting the code into the code screen <> and saving it goes as well as expected.
BUT...
If you go back to the XINHA - or htmlarea- WINDOW and then look at the code again, it is completely different. Sometimes it even disappears.
This is also true of Live Writer.
The results are usually one of these three.
It does not present on the page at all.
It has a place holder but does not present on the page.
It has a placeholder but does not work in IE.
It has a placeholder but does not work in FF.

My assumption is that SERENDIPITY is seeing bad code and trying to fix it.
But I have been wrong before! :)

thanx
RJ

Re: Video embed code problems

Posted: Mon Dec 08, 2008 6:07 pm
by garvinhicking
Hi!

No, not serendipity but the WYSIWYG components.

Code like this will never really be fully compatible with any WYSWIYG editor, since it uses internal browser routines that often mangle with it. The best way I see is to use things like extended entrypoperties to enter a video link into, so that no WYSIWYG editing is possible in those fields. Or try to put fully HTML valid code into the entries, no javascript or invalid XHTML mess (which is why it works for youtube, because they use proper code).

Regards,
Garvin

Posted: Mon Dec 08, 2008 8:25 pm
by Don Chambers
RJ - below is the most cross-browser method I have found.... but since I have seen very few embedded videos, I do not know if this will work with every streaming source you have:

Code: Select all

<!--[if !IE]> -->
<object type="application/x-shockwave-flash"
    data="PATH/TO/VIDEO"
    class="flashplayer"
    height="HEIGHT" width="WIDTH" align="center">
<!-- <![endif]-->
<!--[if IE]>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" 
    codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
    class="flashplayer"
    height="HEIGHT" width="WIDTH" align="center">
    <param name="movie" value="PATH/TO/VIDEO" />
    <param name="wmode" value="opaque" />
<!--><!---->
    <param name="wmode" value="opaque" />
    <param name="quality" value="high" />
    <param name="menu" value="true" />
    <param name="scale" value="noorder" />
    <param name="bgcolor" value="#FFFFFF" />
    <param name="loop" value="false" />
    <param name="salign" value="tl" />
</object>
<!-- <![endif]-->