Video embed code problems

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
rj
Regular
Posts: 477
Joined: Sun Sep 10, 2006 2:53 pm

Video embed code problems

Post 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
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Video embed code problems

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Don Chambers
Regular
Posts: 3657
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Post 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]-->
=Don=
Post Reply